claude -p hangs after completing work in 2.1.69 (regression from 2.1.68)

Resolved 💬 3 comments Opened Mar 5, 2026 by joshuawwy Closed Mar 9, 2026

Bug

claude --dangerously-skip-permissions -p "..." completes all tool calls, commits files, updates progress files, but the process never exits. Requires manual kill or ctrl-c. Happens with single sessions — concurrency is not required.

Repro

# This works fine (short session):
claude -p "Say hello"

# This hangs (longer session with multiple tool calls):
claude --dangerously-skip-permissions -p "@file1.md @file2.md Do a task that involves reading files, writing files, and committing with git."

The CLI does all the work correctly — files are written, git commits are made — but the process sits at 0.1-0.7% CPU with no child processes and never returns control to the shell.

Environment

  • Affected version: 2.1.69
  • Working version: 2.1.68
  • Platform: macOS (Darwin 25.1.0, Apple Silicon)
  • Shell: zsh

Evidence

All 4 sessions completed their tasks but hung indefinitely:

PID  %CPU  ELAPSED
23225  0.2%  45:57   # No child processes, work done 30+ min ago
23653  0.7%  45:15   # Same
24163  5.4%  44:13   # Had one zombie child
24882  0.1%  27:48   # Same

Progress files were updated, git commits were made, but result=$(claude -p ...) never returned.

Workaround

Pin to 2.1.68:

ln -sf ~/.local/share/claude/versions/2.1.68 ~/.local/bin/claude
export CLAUDE_AUTO_UPDATE=0

2.1.68 loops correctly in the same script with the same prompts.

View original on GitHub ↗

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