[BUG] empty stdout from `claude -p --resume` on a refusal-fallback turn
What happened. In six sessions, a turn that was rerouted by model_refusal_fallback (claude-fable-5 to claude-opus-4-8, apiRefusalCategory: cyber, scope: session) produced no stdout from claude -p --resume <id>, exit code 0. The session transcript shows the response: an empty assistant row whose content is a single fallback block, immediately followed by a second assistant row with 7,430 to 11,772 characters of text, then the system row with subtype: model_refusal_fallback. In 13 other rerouted turns in the same kind of sessions the second row's text was delivered to stdout as usual.
What differs. In the six empty cases the response began with the expected one-word answer and then continued into a fabricated user turn and an invented next section of the document (the behavior in #94218). In the 13 delivered cases the response was an ordinary note. I cannot tell from the outside whether the print-mode result picks the first (empty) assistant row in some condition, or whether the fabricated content is filtered on the way out.
Expected. Either the text of the final assistant message on stdout, or a non-zero exit, or an explicit marker in the output that the turn was rerouted. Silent empty stdout with exit 0 looks like "the turn did not land" to a caller, and re-sending the turn into a resumed session duplicates the input.
Environment. Claude Code 2.1.259 to 2.1.286, macOS 26.x, claude -p --resume <id> --tools "" --strict-mcp-config --setting-sources project, plain text output. The sessions are an automated review pipeline that feeds a long internal document one section per turn. Dates: 2 Sep, 8 Sep, 10 Sep, 11 Sep, 13 Sep (two).
Repro. Not deterministic. The six cases all sat late in a 190 to 210 turn session, on a turn whose expected answer was a single word, after a cyber refusal fallback. Transcript line numbers and usage figures available on request.