2.1.27: 100% CPU infinite loop on --continue / --resume / session listing

Status Fixed / completed
Reported on v2.1.27
Maintainer reply None cached
Activity 4 comments · opened Jan 31, 2026 · closed Jan 31, 2026

Description

Claude Code 2.1.27 enters an infinite loop with 100% CPU and rapidly growing memory (11+ GB) when loading or listing sessions. Fresh starts (claude with no flags) work fine. The issue is specific to any operation that scans or loads existing session files:

  • claude --continue
  • claude --resume
  • /resume from within a running session

Reproduction

  1. Have a project directory with session history (100+ sessions in ~/.claude/projects/)
  2. Run claude --continue or claude --resume
  3. Process immediately spikes to 100% CPU and memory grows unbounded
  4. Must be force-killed (kill -9)

Environment

  • macOS 26.2 (Sequoia), Apple Silicon (M4 Pro)
  • Claude Code 2.1.27 — broken
  • Claude Code 2.1.25 — works fine with the same session files
  • Node versions tested: v25.5.0 and v22.22.0 (same behavior on both)
  • ~130 session files in the affected project directory (~160MB total)

Key observations

  • claude --version and claude --print "test" work fine on 2.1.27 (no session scanning)
  • Fresh claude (no --continue/--resume) launches normally on 2.1.27
  • Downgrading to 2.1.25 immediately fixes the issue — --continue and --resume work with the exact same session files
  • Not caused by MCP servers, plugins, statusLine config, or project-specific settings (all tested independently)
  • Auto-updater aggressively overwrites the symlink back to 2.1.27 on each launch, making it difficult to stay pinned to 2.1.25

Workaround

# Delete 2.1.27 and pin to 2.1.25
rm ~/.local/share/claude/versions/2.1.27
ln -sf ~/.local/share/claude/versions/2.1.25 ~/.local/bin/claude

Note: The auto-updater will eventually re-download a newer version, so this needs to be repeated if a fixed version hasn't been released.

View original on GitHub ↗

4 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/22057
  2. https://github.com/anthropics/claude-code/issues/22059
  3. https://github.com/anthropics/claude-code/issues/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

tbharthur · 7 months ago
github-actions[bot] · 6 months ago

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.