Plans, findings, and file lists live in notes outside the model. The model context holds only the current working slice.
External notes survive summarisation and restarts. Reviewers can read the same facts the run used.
Store | What lives there | Why |
|---|---|---|
Plan file | Steps, order, and done conditions | The run resumes from the same plan. |
Findings log | Per-step results and pointers | Later steps quote evidence, not recall. |
Artifact list | Paths of changed and read files | Review covers exactly what the run touched. |
Each loop step appends observations to the context. Ten steps of 800 tokens on a 2000-token start reach 10000 tokens, as the calc block shows.
Token counts are approximate and tokenizer-dependent. Common tokenizers use about 3 to 4 characters per token for English prose, with fewer characters per token for code, numbers, hex, and non-Latin text.
In the basic form, attention cost grows with the square of the sequence length, and efficient variants exist. Long-context use is less reliable than short-context use, and models tend to use information at the start and end of long inputs better than the middle, a tendency reported in studies rather than a law.
start = 2000 tokens, appended per step = 800 tokens, steps = 10 (stated example values)
total = 2000 + 10 x 800 = 2000 + 8000 = 10000 tokens
summary = 1500 tokens = 1500 / 10000 = 0.15 = 15%
saving = 10000 - 1500 = 8500 tokens = 85%
check: 15% + 85% = 100%A summary keeps decisions, open items, and file paths. It drops raw logs and keeps pointers to them.
Summarise on a fixed cadence or size threshold. What survives a summary varies by model: measure it on the task.
Keep in the summary | Drop or point to |
|---|---|
Decided facts with values | Raw tool output beyond the quoted lines. |
Open items and next step | Completed step detail already in the log. |
File paths and versions | Full file contents; link the path. |
Stop reasons and counts | Per-token debug traces. |
10000 tokens. It is 2000 plus 10 times 800, which is 2000 plus 8000.
15% kept and 85% saved. 1500 of 10000 is 0.15, and 15 plus 85 is 100.