CLI freezes during background agent execution (Task tool)
Resolved 💬 2 comments Opened Feb 7, 2026 by dimitriu Closed Feb 7, 2026
Description
Claude Code CLI froze (became completely unresponsive) during a session where multiple background agents were spawned via the Task tool. The session could not be recovered -- no keyboard input was accepted, requiring a force kill.
Reproduction Context
- Claude Code version: 2.1.34
- OS: macOS (Darwin 25.2.0, arm64, Apple M2 Pro)
- Model: claude-opus-4-6
- Session type: Interactive terminal
Steps Leading to Freeze
- Ran a custom slash command (
/dev-start) which bootstraps a git worktree - The command spawns background agents via the Task tool (
run_in_background: true) - While agents were running in the background, the CLI became completely unresponsive
- No error output, no crash report -- just a hard freeze
- Had to force-kill the process; session state was lost
Expected Behavior
The CLI should remain responsive while background agents are running, or at minimum produce an error/crash report if it encounters a fatal condition.
Additional Context
The workflow involves spawning multiple Task agents that perform file reads, writes, and bash commands in a git worktree. The freeze happened mid-execution with agents still running.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗