[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
- Work on a multi-step implementation task
- Claude completes all tasks and outputs a summary
- Status shows "Churned for Xm Ys" (in my case: 22m 13s)
- Then UI switches to "Generating... (esc to interrupt · 8m 22s · ↓ 0 tokens)"
- Token counter stays at 0, no progress is made
- 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
27 Comments
Update: This has happened multiple times this morning (Jan 22, 2026). Appears to be consistently reproducible after completing multi-step tasks with TodoWrite tracking.
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.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Correction to previous comment:
The flow is:
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.
Another reproduction (same session, different task):
This time the spinner said "Moonwalking..." instead of "Generating..." but same behavior:
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.
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.
Reproduction #4+ (same session):
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:
i have the same issue
Reproduction #5:
After a 2h 22m task, user asked "Are you done?" and got:
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).
Reproduction #6:
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.
ESCALATION - Complete freeze (Reproduction #7):
Previous reproductions could be interrupted with Esc. This time:
This is a more severe variant - not just a phantom spinner state, but a full UI deadlock.
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.
Seeing this on MacOS as well including the escalation
Reproduction #8 (Jan 23):
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.
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.
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.
This is happening for me too.
We reverse-engineered
cli.jsacross 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
Adding a noise comment to prevent this from being closed.
Adding a noise comment to prevent this from being closed.
We've seen this exact symptom in an IDE plugin built on the Claude Agent SDK
and traced it to the
claude-memplugin'sStophook.claude-mem(v10+) installs a synchronousStophook that runs asummarizejob 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-memis installed(
~/.claude/plugins/cache/thedotmack/claude-mem/). If so, disable the Stophook by setting
"Stop": []in itshooks/hooks.json. If the phantom"Generating..." state disappears, this confirms
claude-memas the cause.Related upstream issues: thedotmack/claude-mem#1601, #1707, #1716
Adding a noise comment to prevent this from being closed.
Adding a noise comment to prevent this from being closed.
Adding a noise comment to prevent this from being closed.
Adding a noise comment to prevent this from being closed.
Adding a noise comment to prevent this from being closed.
Adding a noise comment to prevent this from being closed.