Context file
Each chat with a project's agent keeps one Markdown file, its context file. Every request to the model is made of three things: the fixed system text, the tools, and one message that holds the context file followed by the new message. Earlier turns are not replayed one by one; they are written into the file.
Sections
The file has four sections, in this order, each under its own level-1 heading:
| Heading | What it holds |
|---|---|
# Brief | The chat's title, its project, the role and your standing instructions for the agent. |
# Working memory | The agent's notes: what it is doing, what it has learned, what comes next. Up to 12,000 characters. |
# Earlier | Older turns, folded to one line each. See Folding old turns. |
# Previous turns | The most recent turns in full. |
After the file comes the new message, under # New message from the owner, or under # New board event when the board started the turn (an answered decision or a changed document).
A turn in full looks like this:
## Turn 12 · 2026-12-06 10:17 UTC · 48 s · 31k in (28k cached), 1.2k out · claude-sonnet
**Owner:**
> Add a reset button
**Tools (3):**
- run `npm test` · ok · 6.1 s · 2.4k chars
- run `git commit -am "Reset button"` · ok · 0.4 s · 210 chars
- view_image `shots/timer-390.png` · ok · 0.2 s · 96 chars
**Reply:**
> The reset button is in, and the tests pass.
Each tool call is one line: its name, its main input (a command, a path, an address), the outcome (ok, timeout or the first line of the error), the time it took and the size of its output. The output itself is not kept in the file.
The notes
The agent's notes are the # Working memory section. The agent rewrites them with its checkpoint tool, at any point in a turn, not only at the end. The same tool can fold older turns or rewrite # Earlier.
You can read and change the whole file from the Context button in the chat. The editor saves up to 400,000 characters.
When changes apply
The opening of a turn never changes while the turn runs, so the provider can cache it and each further step costs less. A rewrite of the notes, by the agent or by you, is saved to the file at once and is read at the start of the next turn. The one exception is a turn that comes close to the model's limit; see Folding during a turn.
Documents are separate
The context file is the chat's memory. Plans, specifications and reports belong in the project's documents, which are files in the project's repository.