Preflight Checklist
What's Wrong?
Every agent view background session crashes immediately when hooks in settings.json fire.
Workaround is to remove SessionStart hooks from project .claude/settings.json when using agent view.
What Should Happen?
Claude with Agent View session starts normally.
Error Messages/Logs
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)
Daemon log pattern — supervisor spawns worker, worker crashes within ~50ms, repeated for every session:
[bg] bg spare spawned host pid=XXXXX
[bg] bg claimed-spare XXXXXXXX (fleet)
[bg] bg spare spawned host pid=XXXXX
[bg] bg settled XXXXXXXX (crashed)
Steps to Reproduce
- Add any
SessionStart hook to a project .claude/settings.json, e.g.:
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "echo test"
}
]
}
]
}
- Run
claude agents from that project directory
- Dispatch any session
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.1.143
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
What I Ruled Out
- Not the hook script content — even
echo test as the command reproduces it
- Not the
matcher field — removed it, still crashes
- Not a path/quoting issue — tested with absolute paths and simple commands
- Not the global settings — clearing
~/.claude/settings.json entirely fixes it
- Removing the hook entirely fixes the issue immediately
Preflight Checklist
What's Wrong?
Every agent view background session crashes immediately when hooks in settings.json fire.
Workaround is to remove
SessionStarthooks from project.claude/settings.jsonwhen using agent view.What Should Happen?
Claude with Agent View session starts normally.
Error Messages/Logs
Steps to Reproduce
SessionStarthook to a project.claude/settings.json, e.g.:claude agentsfrom that project directoryClaude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.1.143
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
What I Ruled Out
echo testas the command reproduces itmatcherfield — removed it, still crashes~/.claude/settings.jsonentirely fixes it