[BUG] Phantom 'Generating...' state - UI stuck after task completion, 0 tokens consumed

Open 💬 27 comments Opened Jan 22, 2026 by ThatDragonOverThere

Description

After completing a task, Claude Code gets stuck in a phantom "Generating..." state. The UI shows it's working but consumes 0 tokens indefinitely.

Reproduction

  1. Work on a multi-step implementation task
  2. Claude completes all tasks and outputs a summary
  3. Status shows "Churned for Xm Ys" (in my case: 22m 13s)
  4. Then UI switches to "Generating... (esc to interrupt · 8m 22s · ↓ 0 tokens)"
  5. Token counter stays at 0, no progress is made
  6. User must press Esc to interrupt

Evidence from Session

● V9.57 Implementation Complete!
  [... detailed summary of completed work ...]

✻ Churned for 22m 13s

✶ Generating… (esc to interrupt · 8m 22s · ↓ 0 tokens)

The "↓ 0 tokens" indicates nothing is actually being generated despite the UI claiming it is.

Expected Behavior

After completing a task and outputting a summary, Claude Code should:

  • Return to the input prompt, OR
  • Actually generate content if there's more to do

It should NOT hang in a "Generating..." state indefinitely with 0 token consumption.

Environment

  • Claude Code CLI on Windows
  • Model: claude-opus-4-5-20251101
  • Session involved multi-step implementation with ~5 tasks

Impact

  • Wastes user time waiting for "generation" that never happens
  • Forces user to manually interrupt
  • Unclear if any work was lost or if session state is corrupted after interrupt

View original on GitHub ↗

27 Comments

ThatDragonOverThere · 5 months ago

Update: This has happened multiple times this morning (Jan 22, 2026). Appears to be consistently reproducible after completing multi-step tasks with TodoWrite tracking.

ThatDragonOverThere · 5 months ago

Additional detail: When I manually typed a message asking "Are you done?", Claude immediately responded confirming all tasks were complete.

This confirms Claude had actually finished - it just didn't transition the UI back to the input prompt. The "Generating... 0 tokens" state was purely a UI hang, not Claude actually doing work.

The work was done ~30 minutes before the UI acknowledged it.

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/15519
  2. https://github.com/anthropics/claude-code/issues/20048
  3. https://github.com/anthropics/claude-code/issues/19999

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

ThatDragonOverThere · 5 months ago

Correction to previous comment:

The flow is:

  1. Claude completes task, outputs summary
  2. Shows "Churned for 22m 13s"
  3. UI gets stuck on "Generating... (8m 22s · ↓ 0 tokens)" - doing nothing
  4. User must press Esc to interrupt the phantom state
  5. User types "Are you done?"
  6. Claude immediately confirms it was done

So the interrupt (Esc) was required to break out. Claude was finished but the UI wouldn't return to the input prompt without manual intervention.

This has happened multiple times today in the same session - not a one-off.

ThatDragonOverThere · 5 months ago

Another reproduction (same session, different task):

✻ Churned for 12m 49s

✢ Moonwalking… (esc to interrupt · 2m 31s · ↓ 0 tokens)

This time the spinner said "Moonwalking..." instead of "Generating..." but same behavior:

  • Task complete, summary output
  • UI stuck in phantom spinner state with 0 tokens
  • User must interrupt to continue
  • Claude immediately confirms done when asked

Additional symptom: Some output appears duplicated during the hang (table rows repeated, agent completion message shown twice). Possible UI render issue during the stuck state.

This is now the 3rd+ reproduction today in the same session.

ThatDragonOverThere · 5 months ago

Continues to reproduce consistently. Every completed task today is hitting this bug. User reports it "keeps happening" - this is now a blocking UX issue requiring Esc interrupt after every task completion.

ThatDragonOverThere · 5 months ago

Reproduction #4+ (same session):

✻ Worked for 28m 8s

❯ are you done?

This time the spinner text was "Worked for" (past tense - task was done) but UI still didn't return to input prompt. User had to manually type to break the state.

Pattern now confirmed:

  • Happens after EVERY task completion this session
  • Different spinner text each time ("Churned", "Moonwalking", "Worked", "Generating")
  • Always requires user intervention to continue
  • Claude immediately responds when prompted, confirming work was done
d7laungani · 5 months ago

i have the same issue

ThatDragonOverThere · 5 months ago

Reproduction #5:

After a 2h 22m task, user asked "Are you done?" and got:

❯ Are you done?

* Topsy-turvying… (esc to interrupt · thin

Note the truncated output ("thin" cut off). UI is stuck again with a whimsical spinner ("Topsy-turvying").

This bug is now affecting 100% of task completions in this session, including after very long-running tasks (2+ hours).

ThatDragonOverThere · 5 months ago

Reproduction #6:

✻ Churned for 15m 55s

* Computing… (esc to interrupt · 29m 24s · ↓ 0 tokens)

Stuck in "Computing..." state for 29+ minutes with 0 tokens consumed. User had to interrupt and manually request verification.

This is the longest hang observed so far. The phantom state can persist indefinitely until user interrupts.

ThatDragonOverThere · 5 months ago

ESCALATION - Complete freeze (Reproduction #7):

Previous reproductions could be interrupted with Esc. This time:

  • UI completely frozen
  • Esc does nothing
  • No token movement at all
  • Requires force-kill of the process

This is a more severe variant - not just a phantom spinner state, but a full UI deadlock.

nerdx86 · 5 months ago
After completing a task, Claude Code gets stuck in a phantom "Generating..." state. The UI shows it's working but consumes 0 tokens indefinitely.

Same thing for me, AND it's started occasionally HANGING in this state without Ctrl-C or esc being able to abort.. (same as ESCALATION - Complete freeze (Reproduction https://github.com/anthropics/claude-code/issues/7))

Using Powershell on Windows LTSC 2019.

ryanmish · 5 months ago

Seeing this on MacOS as well including the escalation

ThatDragonOverThere · 5 months ago

Reproduction #8 (Jan 23):

✻ Sautéed for 26m 32s

✻ Contemplating… (esc to interrupt · 12m 13s · ↓ 0 tokens)

Stuck in "Contemplating..." for 12+ minutes with 0 tokens. User had to interrupt and manually type next request.

New spinner variants observed: "Sautéed", "Contemplating"

This bug continues to affect 100% of task completions. Now at 8+ documented reproductions across 2 days.

jhscheufen · 5 months ago

This has been happening for several days coinciding with upgrade to 2.1.17. It happens multiple times during a session. Hitting ESC snaps claude out of it and returns to responding to input again.

fsc-eriker · 5 months ago

Apparent duplicate of https://github.com/anthropics/claude-code/issues/15519 but this one has much more information and the old one is about to get closed for lack of activity.

nullbio · 4 months ago

This is happening for me too.

kolkov · 4 months ago

We reverse-engineered cli.js across 12 npm versions and analyzed 1,571 sessions (148,444 tool calls, 8,007 orphaned) to find the root causes of this and related hang/orphan issues.

Full analysis with code offsets and fix proposals: #33949

fsc-eriker · 3 months ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 3 months ago

Adding a noise comment to prevent this from being closed.

jhaan83 · 3 months ago

We've seen this exact symptom in an IDE plugin built on the Claude Agent SDK
and traced it to the claude-mem plugin's Stop hook.

claude-mem (v10+) installs a synchronous Stop hook that runs a summarize
job after every assistant turn. This hook blocks the CLI process for 3-7
seconds (or up to 110 seconds when the worker pool is saturated — see
thedotmack/claude-mem#1601). During this time, the UI shows "Generating..."
with 0 tokens because no actual generation is happening — the process is just
waiting for the hook to complete.

The reporter's environment (Windows, multi-step task with 22+ minutes of work)
matches the pattern where the worker pool gets saturated and the Stop hook
blocks for much longer than usual.

Diagnostic: Check if claude-mem is installed
(~/.claude/plugins/cache/thedotmack/claude-mem/). If so, disable the Stop
hook by setting "Stop": [] in its hooks/hooks.json. If the phantom
"Generating..." state disappears, this confirms claude-mem as the cause.

Related upstream issues: thedotmack/claude-mem#1601, #1707, #1716

fsc-eriker · 2 months ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 2 months ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 1 month ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 1 month ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 24 days ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 3 days ago

Adding a noise comment to prevent this from being closed.