[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

  1. Session approaches context limit during complex multi-agent work
  2. Context limit reached — 'Context limit reached · /compact or /clear to continue' shown
  3. /compact attempted — fails (API call itself hits the limit)
  4. @AgentName message attempted — also fails at the context limit
  5. Session is completely dead. All work in progress lost.

Compounding failure pattern

This has been observed compounding with API 529 overloaded_error in sequence:

  1. API Error 529 overloaded_error (3m 50s churn, no response)
  2. Same prompt → 529 again (another 3m 55s wasted)
  3. Model switch attempted
  4. Next prompt → context limit hit
  5. 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)

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗