claude-code - 💡(How to fix) Fix [BUG] 2.1.143 background agents crash exit 1 before init on macOS arm64

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

After upgrading from 2.1.1422.1.143 on macOS 26.4.1 (arm64, T6020), every background-spawned agent (both via the native daemon's agent view and via cmux) crashes within 60-200ms with exit 1 before init. Foreground sessions are completely unaffected. Rolling back the symlink to 2.1.142 restores normal behavior immediately without restarting the daemon.

Root Cause

After upgrading from 2.1.1422.1.143 on macOS 26.4.1 (arm64, T6020), every background-spawned agent (both via the native daemon's agent view and via cmux) crashes within 60-200ms with exit 1 before init. Foreground sessions are completely unaffected. Rolling back the symlink to 2.1.142 restores normal behavior immediately without restarting the daemon.

Fix Action

Workaround

rm ~/.local/bin/claude
ln -s ~/.local/share/claude/versions/2.1.142 ~/.local/bin/claude
# next bg-agent spawn picks up the new symlink — no daemon restart needed

Code Example

# Symlink the bad version
ln -sfn ~/.local/share/claude/versions/2.1.143 ~/.local/bin/claude

# Spawn any background agent — instantly crashes
~/.local/bin/claude --print --agent claude "OK"
echo "exit=$?"   # → exit=1, ~60-200ms

---

state: crashed
detail: exit 1 before init —
  …at uSK (/\$bunfs/root/src/entrypoints/cli.js:9092:233)
   at async SKO (/\$bunfs/root/src/entrypoints/cli.js:19558:68)
   at async h4O (/\$bunfs/root/src/entrypoints/cli.js:19595:313)
  Bun v1.3.14 (macOS arm64)
backend: daemon
respawnFlags: ["--agent","claude"]

---

rm ~/.local/bin/claude
ln -s ~/.local/share/claude/versions/2.1.142 ~/.local/bin/claude
# next bg-agent spawn picks up the new symlink — no daemon restart needed
RAW_BUFFERClick to expand / collapse

Summary

After upgrading from 2.1.1422.1.143 on macOS 26.4.1 (arm64, T6020), every background-spawned agent (both via the native daemon's agent view and via cmux) crashes within 60-200ms with exit 1 before init. Foreground sessions are completely unaffected. Rolling back the symlink to 2.1.142 restores normal behavior immediately without restarting the daemon.

Repro

# Symlink the bad version
ln -sfn ~/.local/share/claude/versions/2.1.143 ~/.local/bin/claude

# Spawn any background agent — instantly crashes
~/.local/bin/claude --print --agent claude "OK"
echo "exit=$?"   # → exit=1, ~60-200ms

The same command works when the symlink points to 2.1.142.

Crash detail (as surfaced by the daemon)

state: crashed
detail: exit 1 before init —
  …at uSK (/\$bunfs/root/src/entrypoints/cli.js:9092:233)
   at async SKO (/\$bunfs/root/src/entrypoints/cli.js:19558:68)
   at async h4O (/\$bunfs/root/src/entrypoints/cli.js:19595:313)
  Bun v1.3.14 (macOS arm64)
backend: daemon
respawnFlags: ["--agent","claude"]

The visible frames are all in the outer wrapper — the real throw is swallowed, so the trace alone can't identify the failing module. The crash happens before any init log line is emitted.

Environment

FieldValue
Claude Code (broken)2.1.143
Claude Code (works)2.1.142, 2.1.141
Bun bundlev1.3.14
macOS26.4.1 (build 25E253)
KernelDarwin 25.4.0, xnu-12377.101.15~1/RELEASE_ARM64_T6020
Archarm64
Backend exhibiting crashnative daemon agent view, cmux agent view
Foreground REPLworks fine on 2.1.143

Workaround

rm ~/.local/bin/claude
ln -s ~/.local/share/claude/versions/2.1.142 ~/.local/bin/claude
# next bg-agent spawn picks up the new symlink — no daemon restart needed

Possibly related

  • #59561 — same 2.1.143 + Bun 1.3.14 bundle on Windows: Chrome native host crashes with ERR_INVALID_ARG_TYPE binding named pipe. Different platform, but both look like child-process / IPC channel init regressions in the same bundle.
  • #50267 — prior bg-subagent regression (2.1.114) shows this surface area has regressed before.

Happy to attach more raw daemon log lines or run `dtruss` on a re-symlinked 2.1.143 if helpful.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] 2.1.143 background agents crash exit 1 before init on macOS arm64