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.246 Home All releases olderv2.1.245 v2.1.247newer
Claude Code v2.1.246

Non-interactive runs retry a response that was cut off mid-stream

You'll notice
Useful4 Signal3
Headless Mode

A cut-off streaming reply in claude -p is now retried automatically, asking the model to resume.

Feature flag
tengu_truncated_response_recovery Not enough to say

Nothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.

This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.246: off

Read once, for one account on one subscription tier, against v2.1.246. It isn't a statement about your account. What a flag value here can and cannot tell you

claude -p
What

If a streaming reply dies after the model has already produced output (idle timeout, mid-stream server error, dropped connection, laptop sleep), a claude -p run now re-sends the turn with a note telling the model its response was cut off and to resume from where it stopped, up to a fixed number of attempts. Controlled by tengu_truncated_response_recovery, which defaults to on. Interactive sessions are unchanged and still show the partial reply plus the error line.

Details
  • The synthesized API-error message carries a new truncatedAfterOutput flag, set when output had already been yielded and the stop reason was not tool_use.
  • The retry only fires for non-interactive sessions on the main thread, not in subagents or sidechains.
  • The injected meta user message says "Your response above was cut off mid-stream." and asks the model to continue.
  • Each retry is recorded under query_truncated_response_recovery as nudged with an attempt number, or exhausted once the cap is hit, after which the error message is yielded as before.
  • The re-issued turn is tagged transition: { reason: "truncated_response_recovery" }.
Evidence

tengu_truncated_response_recovery

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.246 →