Advanced
Open
Pro
Fitting a 300k-Line Repository into a 200k-Token Window
Your coding agent has a 200,000-token context window. The repository it works in has ~300,000 lines of code, and a typical task takes 30–60 tool calls. In early testing, sessions routinely hit the limit halfway through a task, and answer quality degrades well before that.
- Explain what is filling the window and why quality drops before the hard limit.
- Design the context-management strategy: what goes into the prompt, in what order, and the techniques you use to keep usage low.
- Describe how you would implement compaction so that it does not destroy the information the agent needs to finish the task.
Share this question