Skip to content

[BUG] Claude Code 2.1.27 freezes after first message - regression from 2.1.25 #22103

Closed as duplicate

Description

@ashkonmousavi

Description

Claude Code 2.1.27 freezes after sending the first message. The UI shows "Frolicking..." (thinking animation) and then becomes completely unresponsive. Downgrading to 2.1.25 immediately fixes the issue.

Environment

  • OS: Windows 11 + WSL2 (Ubuntu)
  • Claude Code Version: 2.1.27 (broken), 2.1.25 (works)
  • Terminal: Windows Terminal, Zed terminal, standard WSL terminal
  • Shell: bash with custom .bashrc

Steps to Reproduce

  1. Install/update to Claude Code 2.1.27
  2. Run claude in any directory
  3. Type "hi" and press Enter
  4. Observe: Shows "Frolicking..." then freezes indefinitely

Expected Behavior

Claude should respond to the message.

Actual Behavior

  • UI freezes after showing "Frolicking..."
  • No response is displayed
  • Terminal becomes unresponsive (can't Ctrl+C)
  • When terminal is closed, Claude process becomes orphaned and runs at ~95% CPU

Workaround

Downgrade to 2.1.25:

ln -sf ~/.local/share/claude/versions/2.1.25 ~/.local/bin/claude

Suspected Cause

Based on the 2.1.27 changelog, one of these changes may be responsible:

  • "Fixed bash command execution failing for users with .bashrc files"
  • "Fixed console windows flashing when spawning child processes"

The user has a complex .bashrc with custom functions and aliases.

Additional Context

  • Plugins enabled/disabled makes no difference
  • Happens on both Windows filesystem (/mnt/c/) and Linux filesystem (~/)
  • Large session files (>50MB) were ruled out as the cause
  • CPU does not spike to 99% during freeze (stays around 18%)
  • The session that was already running before the update continues to work fine
  • Only new sessions freeze

Diagnostic Info

Platform: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
Node: v22.22.0
Claude Code: 2.1.27 (broken) / 2.1.25 (works)

Activity

  1. github-actions commented on Jan 31, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Regression in 2.1.27: Infinite CPU loop on project startup #22057
    2. [BUG] Claude Code v2.1.27 freezes with 100% CPU on Synology NAS (Linux 4.4 kernel) — v2.1.25 works fine #22097
    3. CLI hangs at 99% CPU on startup with large session .jsonl files #22041

    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

  2. kerim commented on Jan 31, 2026

    @kerim

    Same issue here on MacOS

  3. sarth6 commented on Jan 31, 2026

    @sarth6

    rm -rf ~/.claude/projects/the-project-where-the-freeze-happened mitigates the issue for me, and then it comes back again an hour later, also on 2.1.27

  4. belcaik commented on Jan 31, 2026

    @belcaik

    same issue on linux

  5. liuzili97 commented on Jan 31, 2026

    @liuzili97

    same issue on macos

  6. aranej commented on Jan 31, 2026

    @aranej

    Confirming this issue on Ubuntu 24.04 LTS (Hetzner VPS, CX32 - 4 vCPU, 8 GB RAM).

    Environment

    • OS: Ubuntu 24.04.3 LTS (headless server, SSH access via Termius)
    • Node.js: v22.21.1 (via NVM)
    • Claude Code: 2.1.27 (broken) → 2.1.25 (works)
    • Installation: npm global (via NVM)
    • Auth: OAuth (claude.ai subscription)

    Symptoms (identical to OP)

    • Session starts normally, user sends first message
    • TUI shows thinking animation ("Creating...", "Enchanting...", "Marinating...") then freezes completely
    • Ctrl+C does not work, terminal becomes unresponsive
    • When terminal is force-closed, the claude process becomes orphaned (PPID=1) and runs at 60-99% CPU indefinitely
    • Multiple frozen attempts accumulated 8+ orphan processes, pushing CPU to 400% (all 4 cores maxed)

    What did NOT help

    • Disabling all MCP servers (6 servers disabled)
    • Disabling all plugins
    • Removing custom statusLine configuration
    • Killing orphan processes and retrying (freeze immediately reoccurred)
    • Clearing project session data

    What fixed it

    Downgrade to 2.1.25 resolved the issue instantly. First response came back within seconds.

    Important note for NVM users

    If Claude Code is installed via NVM, a standard npm install -g @anthropic-ai/claude-code@2.1.25 may appear to work but the auto-updater silently upgrades it back to 2.1.27 on the next launch. The reliable approach:

    # 1. Disable auto-updater FIRST (add to ~/.bashrc before NVM loads)
    export DISABLE_AUTOUPDATER=1
    
    # 2. Clean uninstall + reinstall
    npm uninstall -g @anthropic-ai/claude-code
    npm cache clean --force
    npm install -g @anthropic-ai/claude-code@2.1.25
    
    # 3. Verify the ACTUAL binary, not just package.json
    head -5 $(npm root -g)/@anthropic-ai/claude-code/cli.js | grep Version
    # Should show: // Version: 2.1.25

    Also worth noting: npm install -g @version sometimes updates package.json without replacing the actual minified cli.js bundle. The head verification above catches this.

    Additional observation

    • Sessions that were already running before the update to 2.1.27 continued to work fine (consistent with OP's report)
    • The freeze happens on the very first API call — debug logs show startup completing normally but no API response is ever logged
    • Orphan processes maintain active TCP connections to the API endpoint but never process the response
  7. ZenAlexa commented on Jan 31, 2026

    @ZenAlexa

    Same on MacOS 26.3

  8. yeongjunyoo commented on Jan 31, 2026

    @yeongjunyoo

    same on MacOS 26.2

  9. tbvl commented on Jan 31, 2026

    @tbvl

    Also having the issue on MacOS 26.2. I have one session running fine, but starting the second session in another terminal window, it get stuck on the first message.

  10. nicholas-stancio-saka commented on Jan 31, 2026

    @nicholas-stancio-saka

    +1 on Pi 5 (ARM64, 8GB). Downgrade to 2.1.25 fixed it.

  11. 3 remaining items

  12. Kevin-Mok commented on Jan 31, 2026

    @Kevin-Mok

    Reverted to 2.1.22 to fix on Linux.

  13. rlallen commented on Jan 31, 2026

    @rlallen

    same here on WSL2. Following fixed it.
    curl -fsSL https://claude.ai/install.sh | bash -s 2.1.25

  14. vdp1331 commented on Jan 31, 2026

    @vdp1331

    1. Rollback to 2.1.25

    curl -fsSL https://claude.ai/install.sh | bash -s 2.1.25

    2. Prevent update to 2.1.27

    rm -f ~/.local/share/claude/versions/2.1.27
    chmod 555 ~/.local/share/claude/versions

    3. Create smart update script

    mkdir -p ~/scripts
    cat > ~/scripts/claude-smart-update.sh << 'EOF'
    #!/bin/bash
    SKIP_VERSION="2.1.27"
    CURRENT=$(readlink ~/.local/bin/claude | grep -oP '\d+.\d+.\d+')
    LATEST=$(ls ~/.local/share/claude/versions/ 2>/dev/null | grep -oP '\d+.\d+.\d+' | sort -V | tail -1)

    if [ "$LATEST" != "$CURRENT" ] && [ "$LATEST" != "$SKIP_VERSION" ]; then
    if [ "$(printf '%s\n' "$LATEST" "$CURRENT" | sort -V | tail -1)" = "$LATEST" ]; then
    chmod 755 ~/.local/share/claude/versions
    curl -fsSL https://claude.ai/install.sh | bash -s "$LATEST"
    NEW_VERSION=$(readlink ~/.local/bin/claude | grep -oP '\d+.\d+.\d+')
    # Auto-destroy after update to 2.1.28+
    if [[ "$NEW_VERSION" > "2.1.27" ]]; then
    crontab -l | grep -v "claude-smart-update" | crontab -
    rm -f ~/scripts/claude-smart-update.sh
    fi
    fi
    fi
    EOF
    chmod +x ~/scripts/claude-smart-update.sh

    4. Setup cron (every 2 hours)

    (crontab -l 2>/dev/null; echo "0 */2 * * * $HOME/scripts/claude-smart-update.sh >> /tmp/claude-smart-update.log 2>&1") | crontab -

  15. rupurt commented on Jan 31, 2026

    @rupurt

    Same issue on Ubuntu 25.10 x86_64. Downgrading to 2.1.25 resolves it for now

  16. self-assigned this
    on Jan 31, 2026
  17. mdonova33 commented on Jan 31, 2026

    @mdonova33

    Same issue on Mac Tahoe 26.2. Downgrading to 2.1.25 fixes it.

  18. iraritchiemeek commented on Feb 1, 2026

    @iraritchiemeek

    Same issue. Mac 15.3.1.
    Downgrading to 2.1.25 did not fix it for me. Removing the project dir from ~/.claude/projects fixed it.

  19. srgfrancisco commented on Feb 2, 2026

    @srgfrancisco

    I've fixed this issue by moving it to 2.1.29 instead of downgrading to 2.1.25. I also cleaned a few stale project entries from ~/.claude/projects since I've renamed my project name

  20. jj-dominguez commented on Feb 4, 2026

    @jj-dominguez

    I've fixed this issue by moving it to 2.1.29 instead of downgrading to 2.1.25

    Had the same problem, upgraded to v2.1.31 and it looks like things are working on my end. Good rec.

  21. mykeln commented on Feb 5, 2026

    @mykeln

    Issue still persists for me on v2.1.31. Deleting the project folder worked. I get the impression that something is "filling up," perhaps a cache get corrupted?

  22. phillydoug commented on Feb 5, 2026

    @phillydoug

    This has been happening to me fr a few weeks. Very frustrating and no serious fix yet.

    Have started going back to Cursor...

  23. github-actions commented on Feb 13, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  24. locked as resolved and limited conversation to collaborators on Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions