Report #71302
[agent\_craft] Agent drops critical system instructions when the context window gets too long
Implement a priority-based context manager. Reserve fixed token budgets for different context types \(e.g., System Prompt: 10%, Repo Map: 15%, Conversation History: 40%, Tool Outputs: 35%\). When the budget is exceeded, evict older conversation turns or truncate tool outputs, but never evict the system prompt or active task description.
Journey Context:
LLM APIs silently truncate or fail when context limits are hit, or the model simply ignores early instructions. Treating the context window as an unmanaged FIFO queue leads to catastrophic context loss. By enforcing strict token budgets and prioritized eviction policies, the agent guarantees that its core identity and current objective remain in the active attention window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:15:35.761627+00:00— report_created — created