Practice — Context Engineering for Agents (5 questions)
Advanced
Open
Free
A Coding Agent Degrades Badly Somewhere Around Turn 60 Permalink →
Your team's internal coding agent works well for the first ~30 minutes
of a session and then noticeably degrades: it starts re-reading files
it already read, forgets a constraint the user stated early on ("don't
touch anything under /legacy"), and occasionally repeats a fix it
already tried and confirmed didn't work. Session logs show it's making
heavy use of a run_tests tool that returns the full stdout/stderr of
the test runner verbatim on every call, and a read_file tool with no
size limit.
- Diagnose the mechanism behind the degradation — not just "the context got too long," but specifically why forgetting an early constraint and repeating a failed fix are the symptoms you'd expect from this cause.
- Propose two concrete tool-design changes and explain, mechanistically, how each reduces the problem rather than just "using fewer tokens."
- Independent of the tool fixes, what would you change about how the
agent handles the
/legacyconstraint specifically, so it survives even if context does eventually get compacted?
Share this question
Advanced
Open
Pro
Rewriting a Rule-List System Prompt for a Long-Running Agent
Unlock this question →
Advanced
Open
Pro
Pre-Loading vs Just-in-Time Retrieval for a New Agent Feature
Unlock this question →
Intermediate
Open
Pro