Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
Headless ModeArea: what it touches
ImprovementsKind: in v2.1.274,
ImprovementsSection of the release
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.