Skip to content

Session death loop on Anthropic overloaded_error — no fallback, no retry limit, zombie state #58348

Description

@henritheowl

Summary

The session enters an unrecoverable death loop when Anthropic returns overloaded_error responses. The session retries the same failing request indefinitely (97 error responses logged in one incident), never falls back to alternative models, and never gives up. The session appears "alive" to the gateway (no crash) but stops processing new user messages entirely.

Version: OpenClaw 2026.3.28 (f9b1079)
Severity: HIGH (recurring, user-facing, no auto-recovery)
Occurrences: 4+ times over 9 days

Reproduction

  1. User sends a message in a Discord channel session
  2. Anthropic API returns overloaded_error for claude-opus-4-6
  3. Session retries same request → gets same error → retries again
  4. Loop continues indefinitely (97+ retries observed over ~30 min)
  5. Session stops processing ANY new incoming Discord messages
  6. Gateway restart (SIGUSR1) does NOT fix it
  7. Full launchd restart does NOT fix it either
  8. Only /new (session reset) in the channel recovers

Error Payload (every retry)

{
  "type": "error",
  "error": {
    "details": null,
    "type": "overloaded_error",
    "message": "Overloaded"
  }
}

Evidence

Session transcript shows:

  • 08:28:40 — Last successful response (stopReason=stop)
  • 08:30:43 — First overloaded_error (0 tokens in/out)
  • 08:31:33 — Retry with partial thinking (10 output tokens) then error
  • 09:01:36 — Still retrying (retry Discord: fix Clawdis not sending "typing" notifications in replies #97+), all stopReason=error
  • Session file stops growing after retries exhaust — zombie state

All 97 error responses logged as stopReason: "error" with input: 0, output: 0, totalTokens: 0.

Four Bugs

1. No fallback on overloaded_error

Agent has a full fallback chain configured (Opus 4-5 → Sonnet 4-5 → Haiku 4-5 → Sonnet 4-6 → GPT-5.4 → Codex → DeepSeek → Gemini Flash), but overloaded_error never triggers fallback. The session keeps hammering the same dead primary model.

2. No retry limit / circuit breaker

97 retries with no cap. Should give up after 3-5 retries and either fall back or post an error message.

3. Session zombie state after error loop

After exhausting retries, the session enters a state where:

  • Gateway considers it "active" (no crash reported)
  • New Discord messages are received by gateway but NOT routed to the session
  • Session file stops growing
  • Gateway restart does not recover it
  • Only /new fixes it

4. Silent failure — no user feedback

The bot simply stops responding. No error message, no typing indicator, nothing. User has to discover the problem themselves and go to another channel to ask.

Suggested Fixes

  1. Classify overloaded_error as fallback-eligible — After N retries (3?), trigger fallback to next model
  2. Add retry limit — Max 5-10 retries before giving up on a turn
  3. Post error to channel — After exhausting retries + fallbacks, send a visible message: "⚠️ Having trouble right now, try again in a moment"
  4. New messages should cancel retry loop — Incoming user message should abort the current retry and process the new message instead
  5. Session health monitoring — 10+ consecutive errors → flag in openclaw status

Workaround

From another session, use message(action=send, target=chat, message="...") to push a reply through. Then /new in the affected channel to reset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions