X-12Observation Compression

/context/observation-compression

Shape tool output before it enters the window: the errors, the tail, the counts, and a pointer to the rest.

Step-by-step walkthrough6 steps
  1. A single test run returns twelve thousand tokens. Most of it is “ok, ok, ok”.
  2. It does not go straight into the window. Something between the tool and the context decides what matters.
  3. Keep the failures — the whole reason the agent ran this.
  4. Keep the tail, where stack traces and summaries live, and the counts that say how bad it is.
  5. Keep a pointer to the full log. Elision the model can see through beats elision it cannot.
  6. Six hundred tokens carry the signal of twelve thousand — and the loop can afford another twenty steps.
Key insight

Previous actions and observations are the largest slice of a mature agent’s window — bigger than the system prompt, the tools and the retrievals combined. Shaping them is the highest-leverage context work available, and it is harness code, not prompting.

Failure mode

Blind truncation to a character limit. It cuts mid-traceback and keeps the passing tests, which is the exact inverse of what the agent needed.

Further reading

Elsewhere in the atlas