[BUG] Claude Code 2.1.27 spikes to 100% CPU and becomes unresponsive; .claudeignore not respected

Resolved 💬 6 comments Opened Jan 31, 2026 by mfitzhenry Closed Jan 31, 2026

Preflight Checklist

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

What's Wrong?

Environment:

Claude Code version: 2.1.27
OS: macOS (Apple Silicon)
Installation method: Native installer at ~/.local/bin/claude

Description:
Claude Code 2.1.27 immediately spikes to 100% CPU upon receiving any prompt (even "hello") in projects with node_modules present. The process becomes unresponsive and does not respond to Ctrl+C or Escape. Multiple zombie processes accumulate that must be force-killed.
Steps to Reproduce:

Clone any Node.js project
Run npm install
Run claude
Type any prompt (e.g., "hello")
Observe 100% CPU spike and no response

Expected behavior:
Claude should respond to prompts normally, respecting .claudeignore to skip indexing node_modules/.
Actual behavior:

Process spikes to 100% CPU immediately
No response to prompts
Ctrl+C and Escape do not terminate the operation
Multiple processes accumulate requiring kill -9
.claudeignore file with node_modules/ entry is not respected

.claudeignore content:
node_modules/
.next/
coverage/
Workaround:
Downgrading to 2.1.23 resolves the issue:
bashnpm install -g @anthropic-ai/claude-code@2.1.23
Additional notes:

Fresh clone without node_modules works fine in 2.1.27
Running npm install in fresh clone triggers the bug
Same .claudeignore file works correctly in 2.1.23

What Should Happen?

Claude should respond to prompts normally, respecting .claudeignore to skip indexing node_modules/.

Error Messages/Logs

Steps to Reproduce

  1. Create a new directory and initialize a Node.js project:

mkdir claude-bug-test
cd claude-bug-test
npm init -y

  1. Install some dependencies to create a typical node_modules:

npm install express typescript @types/node

  1. Create a .claudeignore file:

echo "node_modules/" > .claudeignore

  1. Run Claude Code 2.1.27:

claude

  1. Type any prompt, e.g.: hello
  1. Observe:
  • CPU immediately spikes to 100% (visible in Activity Monitor)
  • No response is returned
  • Ctrl+C and Escape do not work
  • Process must be force-killed (kill -9 or Activity Monitor)
  1. Downgrade to 2.1.23:

npm install -g @anthropic-ai/claude-code@2.1.23

  1. Repeat steps 4-5:
  • Claude responds normally
  • .claudeignore is respected
  • No CPU spike

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.23

Claude Code Version

2.1.27

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗