Broken permission-request stream retried ~128 times with no backoff

Open 💬 1 comment Opened Jul 8, 2026 by missioncitypm

Summary

While analyzing our local Claude Code session transcripts (JSONL under ~/.claude/projects/), we found one session where a tool permission request failed with Tool permission request failed: Error: Stream closed and the harness then retried the identical permission request ~128 times in a row with no visible backoff, burning the session's turn/token budget on a dead stream.

Evidence

  • One session transcript contains exactly 128 occurrences of the string Tool permission request failed: Error: Stream closed (verified with grep -c against the raw JSONL).
  • All occurrences are the same underlying incident retried, not independent failures — they are consecutive and identical.
  • Environment: Claude Code CLI on macOS (darwin), session ran in a git worktree; the failure began mid-session while a permission prompt was outstanding.

Expected behavior

  • Bounded retries with backoff when the permission-request stream breaks, then a clear surfaced error to the user (e.g. "permission channel lost — restart the session"), instead of an unbounded retry loop.

Impact

A single broken stream can silently consume a large share of a session's budget and leave the user with a session that appears alive but cannot make progress.

Happy to provide redacted excerpts of the transcript pattern if useful.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗