← All materials Article

How ChatGPT and Codex receive instructions and memory

AI Systems12 min2026-09-01

Listen0:00 / --:--

narrated edition · russian · ~23 min · Qwen3-TTS (Apache-2.0)

A modern LLM agent does not "remember" a conversation — it reassembles its context from instruction layers every single turn. The first mistake is to imagine one vertical hierarchy. In practice three independent circuits are at work, and they interact without replacing each other.

Circuit one — the authority hierarchy

The first circuit decides which instructions can override which. The system prompt outranks project instructions; project instructions outrank whatever the model recalls from memory. This is a chain of authority, and it is deliberately one-directional: memory can remind you that you work in an agency, but memory cannot issue a mandatory rule. An AGENTS.md file can demand that tests run before every commit, yet it cannot cancel the platform-level constraints of the provider. A config.toml can choose a sandbox, but choosing a sandbox does not promote it into a higher instruction for the model.

The system prompt is never shown to the user verbatim, yet it shapes every single generation.

What belongs here: anything that answers "what must be obeyed". Authority is about precedence, not about usefulness.

Circuit two — context and memory

The second circuit is retrieval, not storage. "Memory" is a protocol for what gets surfaced into the next context window: saved preferences, past decisions, project summaries. It can suggest, remind, and bias — it can never command. When memory contradicts an instruction of higher authority, the instruction wins and the memory is simply noise.

Memory is not a warehouse; it is a recall protocol.

What belongs here: facts that should survive across sessions — preferences, names, ongoing goals. What does not belong here: mandatory rules. A rule that lives only in memory is a suggestion waiting to be forgotten.

Circuit three — execution configuration

The third circuit is the configuration of the runtime: which models, tools, permissions, and files the agent loads at start-up. Configuration selects capabilities; it does not make the model more obedient. A sandbox setting changes what the agent can do, not what it should do.

How the circuits interact

The circuits cooperate but do not merge:

A practical test for placement: if a statement can be revoked by a higher instruction, it is memory. If it survives every generation untouched, it is authority. If it only changes what tools are available, it is configuration.

What not to do

Do not treat the system prompt, memory, project instructions, AGENTS.md, and permissions as five rungs of one ladder. They are different materials. Mixing them produces agents that ignore rules one day and cling to stale reminders the next — not because the model failed, but because the instruction was filed in the wrong circuit.