Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.227 Home All releases olderv2.1.226 v2.1.228newer
Claude Code v2.1.227

Headless mode reports fatal errors instead of dying quietly

You'll notice
Useful4 Signal2
Headless Mode

Headless runs now print a real reason to stderr and exit 1 instead of dying silently.

What

Failures writing to the output stream, and rejections from a headless run, no longer end the process silently. Claude now prints a truncated human-readable reason to stderr, emits it as a stream-json message where applicable, and exits with code 1.

Details
  • A tengu_headless_fatal_error event records where the failure happened, the message type, the control subtype, how many messages had been drained, how many stdout bytes were still outstanding, and whether stdout had already been destroyed.
  • Applies to every headless (-p) run, no flag required.
Evidence

tengu_headless_fatal_error

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Related

Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.

See this entry in the whole of v2.1.227 →