v2.1.23+ causes 100% CPU hang with multiple parallel instances and hooks
Open 💬 8 comments Opened Jan 31, 2026 by Marcel-Bich
Description
Claude Code hangs with 100% CPU usage when running multiple parallel instances with hooks enabled. This regression was introduced somewhere between v2.1.22 and v2.1.23.
Environment
- OS: Linux (WSL2, Ubuntu)
- Claude Code version: 2.1.27 (also affects 2.1.25)
- Installation: Native client (not npm)
- Profile: Custom config directory via
CLAUDE_CONFIG_DIR
Steps to Reproduce
- Enable hooks in settings (
disableAllHooks: false) - Have multiple plugins with hooks enabled (e.g., PreToolUse hooks for Bash, Write, Edit)
- Start 2+ Claude Code instances in parallel
- One or more instances will hang at 100% CPU
Expected Behavior
Multiple parallel instances should work without hanging, as they did in v2.1.22.
Actual Behavior
- Instances hang with ~100% CPU usage
- Even simple commands like
/plugincause hangs - The UI becomes unresponsive
- Process must be killed with
kill -9
Workaround
Using v2.1.22 resolves the issue completely:
CLAUDE_CONFIG_DIR=$HOME/.claude-work /path/to/versions/2.1.22
With v2.1.22, everything works perfectly - all hooks, all plugins, multiple parallel instances.
Potentially Related Changes
Looking at the changelog, these changes between 2.1.22 and 2.1.27 might be relevant:
- v2.1.27: "Content-level
asknow takes precedence over tool-levelallow" - permission handling change - v2.1.23: "Fixed race condition causing 400 errors with prompt caching scope" - might have introduced new race conditions
- v2.1.23: "Fixed per-user temp directory isolation on shared systems"
Hook Configuration
The hooks are standard PreToolUse/PostToolUse hooks that return JSON with permissionDecision. Example hook output:
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}
Additional Context
- The issue does NOT occur with v2.1.22 regardless how many sessions in parallel and regardless which hooks are enabled or disabled
- CPU usage stays at around 90-100% until the process is manually killed
- No error messages are displayed before the hang
- The issue does occur on the first user prompt then it hangs completely
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗