Interactive CLI loses completed shell results after worktree transitions on Windows

Status Open
Reported on v2.1.263
Maintainer reply None cached
Activity 1 comment · opened Aug 27, 2026

Summary

On Windows, the interactive CLI can fail to deliver a completed shell tool result after tool_dispatch_end outcome=ok, especially around session and worktree context transitions. The underlying command completed successfully; the interactive loop remains busy without a matching tool_result or subsequent model turn.

This issue is separate from #92934, which covers a bounded delay caused by a synchronous PostToolUse hook with a persistent child process.

Evidence

In Claude Code 2.1.263 on Windows 11, a PowerShell tool call that created a git worktree logged successful completion:

2026-09-07T19:38:42.198Z [INFO] [Stall] tool_dispatch_start tool=PowerShell toolUseId=toolu_01J7bPw5ZW4YSjTkJRCwtZDM permissionDecisionMs=1174
2026-09-07T19:38:45.356Z [INFO] [Stall] tool_dispatch_end tool=PowerShell toolUseId=toolu_01J7bPw5ZW4YSjTkJRCwtZDM outcome=ok durationMs=3158

The worktree was created, but the session transcript ended at the assistant tool_use: no matching tool_result was persisted, no subsequent model request started, and no shell child remained alive.

A separate post-transition Bash probe also started and finished normally, but its completed result was not persisted. The issue therefore affects both Bash and the native PowerShell tool.

Earlier workflow-subagent runs showed the same user-visible outcome after worktree transitions: their first Bash tool use had no result for 9–22 minutes, then succeeded immediately after TaskStop and workflow resume.

Scope

  • Interactive CLI only in the observed controls; equivalent claude -p controls succeeded.
  • Reproduced around session start, EnterWorktree, and ExitWorktree.
  • The available evidence rules out the shell command itself, Git/GitHub authentication, SSH, and the local proxy as the demonstrated cause.
  • The exact implementation fault remains unknown. The failure occurs after the successful dispatcher log and before the result reaches the interactive conversation.

Environment

  • Claude Code 2.1.263
  • Windows 11 Pro 10.0.26100
  • PowerShell 7 and Git Bash
  • Interactive CLI

Requested behavior

A completed tool invocation must either persist and deliver its tool_result, or surface a bounded error/retry path instead of leaving an interactive session permanently busy.

View original on GitHub ↗

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