Four Kinds of Context
Open the input of one call an agent makes in the middle of a long task and read it top to bottom. Near the top: "we are moving the claims archive to the new store this quarter". A few lines down: "never write to the payments ledger without an approved ticket". Further on: "the intake agent owns rows 1 to 400; I own the rest". At the bottom, forty lines of a log file it read two calls ago. To the model these are all tokens in one input, with the same standing. To the work they are four different kinds of context, with different owners and lifetimes, and handling one kind as another is how things break. The payments rule, written as prose, is weighed against everything else in the window and can lose. The quarter's objective, written into a file that loads whole, keeps saying "this quarter" after the owner moves it.
Thesis: A common way for context to fail is one kind of context handled as another: a hard rule written as prose, an agent's guess read as a decision, one agent's notes leaking into another's. This site sorts context into four kinds (direction, law, coordination and working context) by who may write each one, who must obey it, how long it lives and how it is checked again. Type every piece of context before deciding where it lives, and give each kind the writer, the home and the checking rule its kind requires.
Context Is Not One Thing
What Context Engineering Means set out three decisions made on every call: what the model sees, what lives outside the window and how it is brought in. Those decisions answer where a piece of context sits. They do not answer what the piece is, and two pieces side by side in the same window can be completely different things.
The four lines in that call are four kinds of thing, and every call also carries a fifth block that is none of them:
- Direction: the objective, the intent behind it, and the decisions in force. It tells the agent what the work is for.
- Law: the rules the work must obey whatever the direction says. Policies, guardrails, hard limits.
- Coordination: what several agents share to stay aligned. Who owns what, what is done, what was decided between them.
- Working context: what one agent holds for its next step. Tool results, scratch reasoning, the files it has read, its guesses.
That fifth block is the tool definitions and the agent's identity in the system prompt. They are standing capability, what the agent is and can do, rather than something said about the work. Govern them like law: a reviewed owner, an allowlist, and a change only on purpose.
The model cannot tell them apart by looking. Every one of them is text, and the model re-reads all of it on every call (Anatomy of a Turn). If the kind is not visible in where the text lives, who wrote it and how it is checked, it is not visible at all.
Four Questions Sort Them
What separates the kinds is not topic. It is four properties of the piece itself, and the four questions below test for them; they are not a second list.
- Who may write it. The owner of the work, a governance or platform team, whichever agent owns that item, or the agent itself.
- Who must obey it. Every agent on the work, the harness itself, the agents in one work stream, or nobody but the next step.
- How long it lives. Until the objective changes, until a reviewed change, for the life of a work stream, or for one step.
- How it is checked again. At every change of plan, by review and tests, by working it out from a log at the moment it is read, or by going back to the source.
The first two questions are about ownership: who stands behind a piece of context. The last two are about trust over time: how long a reader may rely on it before checking it again.
A Worked Example: Typing One Call
Here is the call from the opening, a little fuller. The agent is migrating a claims archive to a new store, and a second agent handles intake. The labels in brackets say where each block came from; the model sees none of them.
[system prompt] You are the migration agent for the claims archive.
Tools: read_file, run_sql_readonly, copy_batch, append_event.
[project file, loaded whole] We are moving the claims archive to the new
store this quarter.
[project file, loaded whole] Never write to the payments ledger without an
approved ticket.
[user] Carry on with the migration.
[tool result: shared ledger] intake agent owns rows 1-400; migrator owns
rows 401-1200.
[assistant] Batch size 1,000 timed out at row 812. Trying 500.
[tool result: read_file] copy_batch.log, 40 lines ... ERROR timeout after
30s at row 812 ...
Put each block through the four questions and its kind falls out.
| Block | Who may write it | Who must obey it | How long it lives | Checked again | Kind | Where it belongs |
|---|---|---|---|---|---|---|
| "You are the migration agent", the tool list | The platform team, through review | The harness | Until a reviewed change | By review | Standing capability | The system prompt, as it is |
| "Moving the claims archive this quarter" | The owner of the work | Every agent on it | Until the objective changes | At each change of plan | Direction | A decision record, re-read each call |
| "Never write to the payments ledger without an approved ticket" | Governance | The harness, whatever the model thinks | Until a reviewed change | By review and tests | Law | The ledger tool's code or a permission rule; the prose line stays only as the reason |
| "Intake agent owns rows 1-400" | The lead who assigns the work | Both agents | This migration | Worked out from the ledger when read | Coordination | The shared ledger, where it already is |
| "Batch size 1,000 timed out. Trying 500." | The agent | Nobody but its next step | One step | Re-tested | Working context | The window; a scratch file if it must outlive the step |
| The log excerpt | The tool | Nobody | Until it has been read | Fetched again if needed | Working context | The window, then cleared |
Two blocks were in the wrong place. The rule about the payments ledger is law written as prose in a file that loads whole, so the model weighs it against everything else in the window; it should be enforced where the model cannot argue with it. And this quarter's objective sits in the same always-loaded file, which cannot hear its own reversal: when the owner moves the migration to next quarter, the file keeps saying this quarter until someone remembers to edit it. Both mistakes are invisible from inside the window. The table is how you see them.
The Same Kinds in Other Words
The four kinds are this site's grouping, not a standard list, and they sort by authority rather than by subject. The words you will meet elsewhere sort by what the text is about or where it is stored. LangChain's context engineering post (2025-07-02) sorts context into instructions, knowledge and tools. The CoALA paper (Sumers et al., 2023) splits an agent's memory into short-term working memory and long-term episodic, semantic and procedural memory. Working context is close to working memory. The rest cut across: a line of "instructions" can be direction or law, and an episodic memory of a past decision is direction while the decision is in force and history once it is not. Neither list has a slot for coordination, the kind that exists only when several agents share work. Use the public words for what the text says, and these four for who may change it.
One name needs a warning. Direction here is not the Direction layer from Model, Harness, Agent, the harness layer where the system prompt, project files, rules and skills live. That layer is a place in the harness; this kind is what a piece of text is. So the Direction layer usually holds more than direction. A rule written there is law written as prose, and the rule you least want ignored belongs in the Boundaries layer, enforced by a permission or a hook, which is where that chapter moved it.
The Comparison
| Direction | Law | Coordination | Working context | |
|---|---|---|---|---|
| Authority | Binds judgment: what to aim for, which option to prefer | Binds actions, whatever the direction says | Binds the agents sharing it, for now | None beyond this agent's next step |
| Writer | The owner of the work; an agent may draft, the owner approves | A governance or platform owner, through review | One writer per item, or an append-only log | The agent itself |
| Reader | Every agent on the work | The harness enforces; the model is told why | Every agent in the work stream | That agent only |
| Lifetime | Goals long; decisions until superseded | Long, versioned | The work stream | One step, one task |
| Checked again | At every change of plan: is this still in force? | On change, by review and tests | Worked out from the log when read | Re-read from the source |
| Failure when mistyped | Enforced as law, it goes rigid and outlives its reversal | Written as prose, it is weighed like direction and loses | Kept as a summary doc, it drifts from the work | Read as direction or shared, a guess becomes the plan |
| Where it lives in a harness | A short written record, re-read after compaction | Permissions, tool allowlists, code, a narrow hook | A ledger, an ownership table, the ticket itself | The window, a scratch file, tool results |
The row that matters most is the sixth. Each kind fails in a predictable way when it is handled as another.
Direction Yields; Law Does Not
The line between direction and law is not how firmly a sentence is worded. It is what happens when it conflicts with something. Law says "never", and it holds whatever the objective says. Direction says "aim here", and it yields: to law, and to newer direction. When an agent meets a case its decisions did not anticipate, direction is what it reasons from; law is what it may not reason past.
They also end differently. Law changes by review: someone edits the rule on purpose. Direction changes by being superseded, often in one sentence in the middle of a conversation. Put a decision where rules live, in an always-on rules file or a flat statement in the system prompt, and that sentence never reaches it: the agent keeps defending last month's decision as if it were a rule. Put a hard limit in prose and the reverse happens: the model weighs it against everything else in the window, and sometimes it loses. Hard limits belong where the harness enforces them: in permissions, the sandbox or code, with a hook for one narrow refusal. Hooks Are a Channel, Not a Rule draws that line.
Direction therefore needs a home outside the conversation; When Context Turns Against You builds it.
Working Context Goes Stale on Arrival
Working context is the largest kind by volume and the smallest by authority. A tool result describes the world at the moment it was fetched; the world moves and the copy in the window does not. A hypothesis is a candidate. A plan for the next three calls is a plan for the next three calls.
Two habits follow. For anything that can change, the step that depends on it fetches it again rather than trusting the copy. And what must outlive the step is written to a file before the next boundary; The Files Are the Memory is that pattern.
Failures That Come From Mistyping
Working notes treated as direction. An IT operations agent reads one log, sees connection-pool timeouts and writes "likely cause: pool size too small". Twenty calls later, after a compaction, the summary says "root cause: pool sizing" with no trace that it was a guess, and the fix that follows does nothing. The note gained authority without anyone deciding it should.
One agent's working context leaking into another's. A reviewing agent writes its hunch into a shared file, and the next agent reads it as a fact. The mirror image is two agents with no shared record at all, each keeping its own view of the facts while the contradictions between them go unresolved; Shared State Needs One Writer shows what that costs.
Coordination state kept as a document. A status page that every agent rewrites is the classic case. Status must be worked out again whenever it is read. Written into a document that reads like direction, it stays confidently wrong.
Step 1 of 4
Working context.
The agent writes in its scratch file: "copy_batch times out above 500 rows; 500 works." It is a guess from one run, and it binds nobody.
Read this figure as text
along both routes
- Working context.: The agent writes in its scratch file: "copy_batch times out above 500 rows; 500 works." It is a guess from one run, and it binds nobody.
- Promoted to coordination.: Nobody has decided anything yet; a fact with a source is now shared.
- Ratified as direction.: The claims lead reads the finding and decides: "batch size is 500 for the rest of the migration." That line goes into the decision record as a decision in force, on the lead's word.
- Direction changes by being superseded: When the new store is upgraded next month and larger batches work, the decision is superseded, with the old wording kept, the way When Context Turns Against You shows.
without the routes
- Now run the same note without the routes.: The agent writes in its scratch file: "copy_batch times out above 500 rows; 500 works." It is a guess from one run, and it binds nobody.
- Working notes treated as direction.: The agent's guess sits in the transcript, a compaction summarises it as "batch size must be 500", and three weeks later both agents obey a rule nobody made, which nobody can find the reason for, and nobody knows they may change.
- Read as direction or shared, a guess becomes the plan: The note gained authority without anyone deciding it should.
The fence
- Direction: objective, decisions in force
- Law: rules, guardrails
- Coordination: ownership, shared decisions
- Working context: tool results, scratch
- Working context to Coordination: promoted on purpose
- Coordination to Direction: ratified by the owner
- Law to Direction: bounds
Figure: The legal routes to authority. Working context becomes coordination only when an agent promotes it on purpose, coordination becomes direction only when the owner ratifies it, and law bounds direction.
Two words in the figure need pinning down. To promote a note is to copy it from one agent's working context into the shared record, with the evidence behind it, so other agents may build on it. To ratify a finding is for the owner of the work to approve it as a decision that binds everyone. The arrows are the only legal routes by which text gains authority. Law's one arrow is to direction because direction is what law overrides; law also bounds every action directly, through the harness, which the figure leaves out. Working context reaches the shared record only when an agent promotes it on purpose, with its evidence. A shared finding becomes direction only when the owner ratifies it. Law bounds direction and never the reverse. Every failure above is a piece of text that crossed a line without taking one of those routes. Whether mistyping causes the wrong action, rather than travelling with it, is a claim this post states, not one it measures.
A Worked Example: One Note, Promoted Twice
Follow the migration agent's batch-size note along both routes.
- Working context. The agent writes in its scratch file: "copy_batch times out above 500 rows; 500 works." It is a guess from one run, and it binds nobody.
- Promoted to coordination. The intake agent is about to copy batches too and will hit the same timeout. So the migration agent appends one event to the shared ledger: a finding, its author, and its evidence ("copy_batch.log, run 14, rows 801 to 1,800"). The intake agent reads it and builds on it. Nobody has decided anything yet; a fact with a source is now shared.
- Ratified as direction. The claims lead reads the finding and decides: "batch size is 500 for the rest of the migration." That line goes into the decision record as a decision in force, on the lead's word. When the new store is upgraded next month and larger batches work, the decision is superseded, with the old wording kept, the way When Context Turns Against You shows.
Now run the same note without the routes. The agent's guess sits in the transcript, a compaction summarises it as "batch size must be 500", and three weeks later both agents obey a rule nobody made, which nobody can find the reason for, and nobody knows they may change.
What It Looks Like on Disk
Typed context is mostly a matter of where each kind is kept. Here is the claims migration, laid out so the kind is visible from the path alone:
claims-migration/
CLAUDE.md standing: who the agent is, how to run the scripts
.claude/settings.json law the harness enforces: permission rules
tools/payments.py law in code: refuses a ledger write with no approved ticket
docs/decisions.md direction: objective, decisions in force, superseded
ledger/events.jsonl coordination: append-only, each agent writes its own events
scratch/migrator.md working context: this agent's notes; no other agent reads it
Law appears twice because it is enforced twice. A permission rule in Claude Code's settings, such as "deny": ["Bash(psql *)"] in the form its permissions documentation shows as of November 2026, stops the agent opening a database shell at all, so the payments ledger can only be reached through the tool, and the tool checks the ticket. The project file loaded on every call names neither the objective nor the rule's details. It points at the decision record and says why the rule exists.
When the Opposite Wins
Typing context is overhead, and for a lot of work it is overhead with no return. A single agent on a short task with no shared state and no hard limits has one kind of context worth the name, its working context, and the rest is a prompt. Early exploratory work is another case: while the objective is still forming, pinning decisions in a record freezes guesses into commitments.
The categories also blur at the edges. A decision that has held for a year starts to behave like law; a finding every agent depends on starts to behave like direction. A label nothing reads is ceremony. If no writer, reader or checking rule would change, the label is not earning its keep. Type the context where getting it wrong has already cost you, and leave the rest alone.
What to Do Next
- Type one real call. Take a call your agent made yesterday and mark every block of its input as direction, law, coordination or working context. The blocks you cannot type are the first ones to fix.
- Find your mistyped law. List the rules in your always-on prompt that must never be broken. Each one that exists only as prose is a candidate for a hook, a permission or a check in code.
- Keep decisions out of rules files. A decision in a rules file cannot hear its own reversal; move it somewhere it can be superseded.
- Label guesses as guesses. Have the agent write a hypothesis with what would confirm it, so a later reader, or a summary, cannot mistake it for a finding.
- Draw the promotion routes. Decide how a working note becomes a shared finding and who ratifies a finding as direction. If there is no route, a note will find its own.
Next: Direction Is Not Law, the first kind on its own: what direction holds, how a decision ends by supersession, and who may write it. Related reading: Hooks Are a Channel, Not a Rule for where law belongs; The Files Are the Memory for working context kept as scratch; and When Context Turns Against You for how superseded direction keeps steering.