Skip to content

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

Description

@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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions