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

  1. Ran a custom slash command (/dev-start) which bootstraps a git worktree
  2. The command spawns background agents via the Task tool (run_in_background: true)
  3. While agents were running in the background, the CLI became completely unresponsive
  4. No error output, no crash report -- just a hard freeze
  5. 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.

View original on GitHub ↗

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