anthropics / anthropics/claude-code

[BUG] Claude Code hangs with zero output on Ubuntu VM under Proxmox (all commands except --version)

Open
#95,691 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:cli bug has repro platform:linux
Dominant language
TypeScript
Stars
147k
Forks
24k
PR merge metrics
PR metrics pending

Description

Preflight Checklist
  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code
What's Wrong?

claude, claude setup-token, and claude -p "<prompt>" all hang indefinitely with zero output (no text, no error, no spinner) on a specific Ubuntu VM running under Proxmox (KVM). The process must be killed with Ctrl+C. This happens even in non-interactive mode (-p) with stdin explicitly closed (< /dev/null), and even with a valid CLAUDE_CODE_OAUTH_TOKEN already exported.

claude --version and claude --help work instantly and correctly.

What Should Happen?

claude setup-token should print the OAuth authorization URL to stdout within milliseconds of generating the PKCE parameters, as it does on other machines (confirmed working normally on a Windows machine with the same account). claude -p should return a response instead of hanging silently forever.

Error Messages/Logs
strace output (from `strace -f -o /tmp/strace_output.log claude setup-token`, canceled after ~20s):

- Process executes, initializes Node/V8 normally, spawns the standard JSCWarmUp and mi-scavenger V8 threads (all within the same second).
- Two getrandom() calls are made with 48 and 32 byte buffers (consistent with PKCE code_verifier/code_challenge generation for OAuth).
- After that, no write(1, ...) to stdout ever appears in the entire log, and no connect(), socket(), or getaddrinfo() call ever appears either.
- The rest of the log is background V8/libuv worker threads idling on futex with the standard 30s timeout, until killed with SIGINT.

This suggests the hang happens in application code between "generate PKCE parameters" and "print login URL / open network connection."
Steps to Reproduce
  1. Fresh Ubuntu VM on Proxmox (KVM), kernel 5.15.0-191-generic
  2. Install Node via nvm, then npm install -g @anthropic-ai/claude-code
  3. Run claude (interactive) → hangs with no output at all, nothing drawn to the terminal
  4. Run claude setup-token → hangs with no output (no login URL ever printed)
  5. Run claude -p "hello" < /dev/null (with a valid CLAUDE_CODE_OAUTH_TOKEN already exported) → still hangs with no output
  6. claude --version → returns instantly and correctly (2.1.278 (Claude Code), ~16ms)

Already ruled out:

  • Network: curl -v to api.anthropic.com, platform.claude.com, console.anthropic.com all succeed immediately (200/405, correct TLS). claude.ai returns a Cloudflare bot-challenge (403) to curl only, which shouldn't affect the CLI since login happens in a real browser on a separate machine.
  • IPv4 vs IPv6: NODE_OPTIONS="--dns-result-order=ipv4first" made no difference.
  • Node version: reproduced identically on Node 20.20.2 and 22.23.2.
  • Terminal rendering: reproduced with TERM=xterm-256color, wide terminal (261 cols), and inside script -c (log file was empty for the entire hang).
  • stdin: reproduced with stdin redirected from /dev/null.
  • User/config: reproduced under a brand-new, freshly created Linux user with no prior config.
  • Locale: LANG=en_US.UTF-8, nothing unusual.
  • AppArmor: only standard Ubuntu profiles loaded (snapd, dhclient, man, nvidia), none related to Node/Claude Code.
  • CPU/steal time: vmstat shows 0% steal, ~99% idle CPU.
  • Entropy: /proc/sys/kernel/random/entropy_avail = 256 (normal).
Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.278 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Kernel: 5.15.0-191-generic
Virtualization: KVM VM under Proxmox
Node.js: reproduced identically on v20.20.2 and v22.23.2 (installed via nvm)
Terminal: VS Code Remote-SSH integrated terminal (TERM=xterm-256color, also tested with 261-column width)
Auth: reproduced both with no token configured and with a valid CLAUDE_CODE_OAUTH_TOKEN

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing claude setup-token and claude -p "hello" < /dev/null on the specified Ubuntu VM, then compare their behavior with claude --version. Read the supplied /tmp/strace_output.log pattern around PKCE generation and verify the environment differences already listed. Done means normal commands produce output instead of hanging, while --version continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.