Skip to content

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

Closed

Description

@tbharthur

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.

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] /resume hangs at Loading conversations... #22059
    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. alexn-tinwell commented on Jan 31, 2026

    @alexn-tinwell
  3. tbharthur commented on Jan 31, 2026

    @tbharthur
    Author

    Duplicate of #22042

  4. github-actions commented on Feb 7, 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions