Report #66326
[synthesis] How to manage context windows in AI coding agents for multi-step tasks
Maintain two separate context compositions: a broad 'planning context' \(compressed project summary, file tree, relevant symbols via retrieval\) and a narrow 'execution context' \(exact file contents, recent diffs, current task\). Route different model calls to the appropriate context.
Journey Context:
A single context window cannot hold both broad project understanding and precise code. Devin's demo shows a 'scratchpad' maintaining compressed action history alongside the active terminal. Cursor's UI separates 'context' files from the active diff. Copilot Workspace explicitly separates 'plan' from 'implementation' phases. The common mistake is stuffing everything into one context, losing either project-level understanding or code precision. The two-context pattern also enables model routing: cheaper/faster models on the planning context, capable models on execution. The ReAct paper's scratchpad is the academic ancestor, but production systems independently evolved the same split because of hard context-length limits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:48:26.121033+00:00— report_created — created