[Bug] Background agent workers crash with "exit 1 before init" on spawn

Resolved 💬 3 comments Opened May 16, 2026 by a4xrbj1 Closed May 19, 2026

Bug Description
Every background-agent worker crashes exit 1 before init immediately on spawn — claude --bg, the Agents view, resuming bg chats, and even blank pre-warmed spares all fail. Interactive claude / claude -p work fine. 100% reproducible with claude --bg "anything". Crash from ~/.claude/jobs/<id>/state.json: exit 1 before init — …at uSK (cli.js:9092:233) at async SKO (cli.js:19558:68) at async h4O (cli.js:19595:313) Bun v1.3.14 (macOS arm64) Env: Claude Code 2.1.143 (also seen on 2.1.142), macOS arm64. Ruled out: not auth (separate auth_required issue fixed; fresh daemon authenticates, workers still crash), not a version regression (started on 2.1.142), not system Bun (updating it changed nothing). Also: the state.json crash detail is truncated (leading ) so the real error message is never visible.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.143
  • Feedback ID: 765aa9e1-f193-4ba0-b828-64b8ad177503

Errors

[]

View original on GitHub ↗

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