Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.274 ·

Headless/stream-json errors gain a structured startupFailureReason field

Headless mode's startup-failure errors now include a structured reason code

TierUnder the hoodhow much it should matter to you
Useful2my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaHeadless Modewhat it touches
KindImprovementsin v2.1.274,
Under the hood

Headless mode's startup-failure errors now include a structured reason code

What

When Claude Code fails to start in headless mode (running without an interactive interface, using stream-json output), the error-reporting helper now accepts a startupFailureReason and a resultIndex, and includes both in the emitted stream-json error object. One concrete reason value is session_held_by_background, used when a session is already held by a background process.

Why

This gives tools and scripts consuming stream-json output a structured way to detect and handle specific headless startup failures, such as a session being locked by another background process, instead of just seeing a generic error.

See this entry in the whole of v2.1.274 →

Feedback