Session hangs indefinitely with spinning thinking indicator — 3 confirmed variants (+ /btw MCP teardown)

Resolved 💬 9 comments Opened May 7, 2026 by larro1991 Closed Jun 18, 2026

Environment

  • OS: Windows 11 Home (Build 10.0.26200)
  • Claude Code: v2.1.132 (latest as of 2026-05-06)
  • Shell: PowerShell
  • MCP Servers active: crucible, claude-toolkit, desktop-copilot

Description

The thinking indicator spins indefinitely across at least 3 distinct scenarios, with a 4th related data point involving /btw window teardown. In all cases pressing Esc is the only recovery, and Claude's post-interrupt response indicates it was either idle or had already completed its work — meaning the spinner failed to clear.

This is distinct from the v2.1.126 fix ("Fixed a hang where the assistant could finish thinking but show no output after a run of empty turns") — that was an output rendering issue. These bugs involve the spinner persisting with no pending work, or the session genuinely blocking on a hung background operation.

---

Incident 1 — 2026-05-04 | Background agent hung for 4h 51m

Session: UAI development (Brave CDP driver + Windows UIA driver), background agents active via run_in_background: true.

JSONL evidence from conversation log:

13:11:14Z  last assistant message
13:33:05Z  {"type":"queue-operation","operation":"enqueue"}  ← user msg queued; session "busy"
17:24:29Z  {"type":"queue-operation","operation":"dequeue"}  ← triggered by Esc
17:25:38Z  Claude: "...was just waiting for you to respond"

Queue-operation entries confirm session was stuck: user's message could not be delivered for 4h 51m because the session never completed its current turn. No timeout, no error, no UI indication.

---

Incident 2 — 2026-05-06 | Background agent error, spinner stays on

User sent /btw: "are you still working, you look hung?"

Claude on interrupt: "Yes — the log audit agent hit an internal error. The main session is still live, nothing lost. Just respond and it'll kick back into gear."

Agent failure did not propagate to main thread. Spinner continued running after the error. No error shown in UI.

---

Incident 3 — 2026-05-06 | Fully idle session, spinner still running

User sent /btw: "still working? I only ask because it seems to be a bug"

Claude on interrupt: "Idle — no active work running. The main agent has been responding to your questions but hasn't actually been executing the plan autonomously. No commands have run since the last exchange."

Cleanest repro signal: no background agents, no tool calls, zero activity — spinner still showing. Pure UI state management failure, no underlying hang.

---

Incident 4 — 2026-05-06 | /btw window closed mid-MCP-call, state dumped to main

User closed a /btw window while it had an active claude-toolkit MCP call in progress. The following output appeared on close:

❯ yes
  Called claude-toolkit (ctrl+o to expand)
──────────────────────────────────────────────────────
❯
──────────────────────────────────────────────────────
● Calling claude-toolkit… (ctrl+o to expand)
✶ Whatchamacalliting… (9s · ↓ 179 tokens)

The /btw session did not cleanly cancel the in-flight MCP call on window close. Suggests shared MCP server state may be left dirty, potentially blocking subsequent tool calls in the main session.

---

Summary

| # | Scenario | Spinner duration | Post-interrupt response |
|---|----------|-----------------|------------------------|
| 1 | Background agent hung | 4h 51m (JSONL confirmed) | "was just waiting for you" |
| 2 | Background agent threw internal error | unknown | "agent hit internal error, just respond" |
| 3 | Session fully idle between turns | unknown | "Idle, no active work running" |
| 4 | /btw window closed mid-MCP-call | 9s+ at close | state dumped, MCP call abandoned |

Incidents 1 and 3 may be separate bugs sharing the same symptom:

  • Incident 1: session-level block waiting on a hung background operation
  • Incident 3: UI state failure with no underlying hang

Expected Behavior

  • Spinner clears when turn completes or agent errors
  • Background agent errors surface to UI
  • /btw window close cancels in-flight MCP calls cleanly
  • Timeouts exist for hung background operations

Actual Behavior

  • Spinner persists indefinitely regardless of whether work is happening
  • No error shown when background agent fails
  • /btw close abandons in-flight MCP calls silently
  • Only recovery is pressing Esc

Workaround

Press Esc. Dequeues pending user messages and restores session to responsive state.

View original on GitHub ↗

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