Where is it stuck? Read the screen, then the process
# in the session
Esc # cancel the current tool or turn
Ctrl+C (twice) # abort the turn / exit
# from another terminal
ps aux | grep -E "claude|node" | grep -v grep # child processes still running?
top -o cpu # is claude spinning or idle?
claude --debug # next time: timestamps for every request and tool call
claude -c # resume the last session after a kill
Idle CPU with a frozen prompt means it is waiting on something external: a network stream, an MCP server, a child process, a prompt you cannot see. Pinned CPU means it is working on something internal: parsing a huge tool result, a regex backtracking, a large session being loaded. Memory climbing steadily means a tool result or session file is being swallowed whole.
Known causes on the tracker
- `/rewind` hangs, `Ctrl+C` ignored, `kill -9` needed (#53011, 21 reactions, on sessions of any size in the 2.1.1xx builds). An Anthropic engineer could not reproduce on 2.1.233, so update first; on an older build, kill the process and resume with
claude -cinstead of rewinding. - Remote Control sessions freeze mid-execution and only a local `Esc` revives them (#51267, open). Any tool or subprocess that blocks freezes the whole remote session with no remote cancel; keep such sessions short, and avoid tools that may prompt.
- MCP authentication prompt hangs on `Enter` (#42707, open). Authenticate the server from a separate
claude mcpcommand or the browser, then restart the session. - `grep` through the embedded matcher eats all memory (#54394): on native builds every shell
grepruns inside aclaudeprocess with its own V8 heap; a backtracking regex over a long minified line balloons to gigabytes and the OOM killer takes the session with it, on WSL2 and Linux alike. Avoid unbounded regexes over minified files, exclude build output andnode_modules, or install systemripgrepand call it explicitly. - Stuck retry loop on `400 thinking blocks cannot be modified` (#63231) — the conversation history is invalid and every retry fails the same way.
/rewindto before the turn, or/clear; see the 400 guide. - **Cloud / scheduled runs stuck on *Setting up a cloud container*** (#53691, #54528) — service-side; nothing local, cancel and check status.claude.com.
- Large session resume takes minutes — the transcript is replayed at start. Resume the specific session you need (
claude -r) rather than the largest, and let compaction shrink monsters.
Hangs at startup
A blank screen right after claude with no prompt is usually the first API call not returning: a proxy variable pointing at a dead proxy, a VPN, DNS, or an unreachable ANTHROPIC_BASE_URL. Run the curl check from the connection errors guide, then claude doctor. Slow startups with a prompt eventually appearing are MCP servers being launched; claude mcp list and remove the ones that time out.
Child processes that never exit
A shell tool that opens an editor, waits for a password, tails a log or starts a dev server never returns, and the turn waits for it. Tell the agent to run servers in the background and to add --no-pager, -y or < /dev/null where a command might prompt. If it has already happened, Esc cancels the tool; if the child ignores that, kill it by PID from another terminal and the turn continues with the error.
High memory and CPU
- Tool results are kept in memory and on disk for the session; reading a 200 MB file is a 200 MB session. Read the parts you need.
- Many parallel subagents multiply everything;
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY=2on small machines. - Terminal emulators with slow rendering (some Windows consoles, remote tmux over a thin link) make streaming output look frozen;
claude --debugshows whether tokens are still arriving. - If memory climbs while idle, look for leftover
claudeprocesses from crashed IDE sessions and kill them (process exited with code 1 covers the Windows orphan case).
When it is the API, not the client
A session that hangs on every turn at the same point, with a small spinner and an eventual retry line, is a slow or dropping API path rather than a client bug: 529 overloaded, server-side throttling or a reset connection. Through a gateway (ANTHROPIC_BASE_URL=https://aiprimetech.io) a saturated upstream account is failed over to another, which shortens exactly these stalls.
Tired of fighting this one?
Run Claude Code through the AI Prime Tech gateway instead: the same Claude models on the gateway's own upstream accounts, two environment variables to switch, and new accounts get $5 in free API credit with code FIXIT — no card.
export ANTHROPIC_BASE_URL=https://aiprimetech.io
export ANTHROPIC_API_KEY=your_keyFrequently asked questions
Why is Claude Code stuck and not responding?
It is waiting on something: an API stream, a tool it launched, an MCP server, or an approval prompt off-screen. Press Esc to cancel the tool, Ctrl+C twice to abort; if nothing reacts, kill the process and resume with claude -c.
How do I fix Claude Code hanging on /rewind?
Update to a current build; the hang was reported on 2.1.1xx and Anthropic could not reproduce it on 2.1.233. On an old build, kill the process and use claude -c instead of /rewind.
Why does Claude Code use so much memory?
Large tool results and session transcripts are kept whole, subagents multiply them, and on native builds a backtracking grep regex runs inside a claude process with a large V8 heap. Read less, exclude build output, lower concurrency.
Claude Code hangs on startup with no prompt. What do I check?
The first API request is not returning: proxy variables, VPN, DNS or an unreachable ANTHROPIC_BASE_URL. Run a curl against the endpoint, then claude doctor, and remove MCP servers that time out.
Run Claude Code on the gateway
Same models, two environment variables, credits at 7.69× face value — or a flat-rate unlimited plan. New accounts: $5 in free API credit with code FIXIT.
Get an API key See unlimited plansAI Prime Tech is an independent API gateway and is not affiliated with, endorsed by, or sponsored by Anthropic. “Claude” and “Claude Code” are trademarks of Anthropic. Claude Code features described here follow Anthropic’s public documentation at the time of writing and change frequently; prices and model lists on this page are read from this gateway’s live settings.