Windows CLI: tool result delivery silently fails — agent loop hangs indefinitely with no error surfaced

Resolved 💬 3 comments Opened May 14, 2026 by giuliohome Closed May 14, 2026

Summary

The Windows CLI (claude 2.1.141 on Win11) intermittently fails to deliver tool results back to the main agent. When this happens the session enters an indefinite hang: the timer keeps advancing, no error or rejection ever surfaces, and ESC (or Ctrl+C) is the only way out. There is no spinner state change, no permission prompt, no visible error — nothing distinguishes the failure from an ordinary long inference.

The User rejected tool use sentinel that eventually appears in the transcript is not spontaneous: it is the text the harness emits in response to the user's ESC. Without ESC, the hang continues indefinitely.

Environment

  • Claude Code: 2.1.141
  • OS: Windows 11 Pro 10.0.26200
  • Node: v22.13.1
  • Shell wrapper: PowerShell 7 (pwsh) + Git Bash available
  • Model: claude-opus-4-7 (1M context)
  • Permission mode: default
  • Permissions: not running as admin

Reproduction observed

  1. Model calls PowerShell running a benign multi-section Get-ChildItem over a few directories under %USERPROFILE%\.claude.
  2. No output reaches the transcript. The session becomes idle for several minutes with no indicator the model is doing anything — the timer just keeps counting up.
  3. User intervenes with ESC; only at that point does the cancelled-tool-use sentinel appear and the session becomes responsive again.
  4. On a previous turn in the same session, [Tool result missing due to internal error] had appeared in the transcript as the tool result text — a separate undelivered call the model had absorbed and tried to continue past.

Expected

  • An undelivered tool result must not leave the agent loop hanging indefinitely. There should be either a timeout + retry, or at minimum a visible error state that distinguishes "tool delivery failed" from "model is thinking".
  • A failed tool delivery should surface as a distinguishable error (e.g. internal_error: tool result undeliverable), and the user-rejection sentinel should be reserved for actual user actions (real permission denial, not "ESC during a hang").

Workarounds

  • Prefer short, narrowly scoped tool calls over wide recursive inspections that may trip the delivery bug.
  • ESC / Ctrl+C in the Claude Code terminal, then claude --continue to resume.

Impact

Silently breaks long-running multi-step workflows. The user has no way to tell whether the assistant is thinking, blocked, crashed, or waiting for them; the assistant has no way to tell whether it was vetoed or whether the harness ate the call.

Happy to attach session traces / debug logs from %USERPROFILE%\.claude\debug if useful.

View original on GitHub ↗

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