How agent harness context windows work: append-only for caching and reasoning

PawelHuryn · x · 2026-11-05

Step 3 of the Mini Harness series explains the context window: models remember nothing between calls, so the harness resends everything each step — a fixed top written once per session (instructions, AGENTS.md, tool manuals, 8K tokens in practice) plus an ever-growing conversation. The key rule: never edit what was already sent, because Claude seals its reasoning to everything above it and the provider caches the prefix — editing breaks both reasoning and cache hits.

Original post →

More from coding & agent

coding & agent channel →