[BUG] Context limit lockout — @mention agent also fails, session completely unrecoverable
Resolved 💬 5 comments Opened Apr 1, 2026 by ThatDragonOverThere Closed Jun 21, 2026
Summary
When a session hits the context limit, the session becomes completely unrecoverable. Not only does /compact fail, but using @mention to invoke an agent also fails at the limit. The only escape is /clear which destroys all session context.
Behavior
- Session approaches context limit during complex multi-agent work
- Context limit reached — 'Context limit reached · /compact or /clear to continue' shown
/compactattempted — fails (API call itself hits the limit)@AgentName messageattempted — also fails at the context limit- Session is completely dead. All work in progress lost.
Compounding failure pattern
This has been observed compounding with API 529 overloaded_error in sequence:
- API Error 529 overloaded_error (3m 50s churn, no response)
- Same prompt → 529 again (another 3m 55s wasted)
- Model switch attempted
- Next prompt → context limit hit
- Total session dead: two 4-minute overload churns + context limit lockout in sequence
By the time the context limit hits, the session has already burned 7+ minutes on failed API calls with nothing to show. The combined failure is worse than either bug alone.
Expected behavior
@mention invocation should work at context limit (it invokes a fresh subagent, not a continuation). /compact should have a fallback when the full history can't be sent.
Environment
- Claude Code v2.1.87
- Windows, Max plan
- Reproducible during heavy multi-agent sessions (6+ parallel agents, complex trading system pipeline work)
Related
- #3138 (resume flag fails after context limit)
- #2038 (context low loop with parallel sub-agents)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗