You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6d6d2ec
Browse filesBrowse the repository at this point in the historyBrowse files
fix(run): place text relative to the failure, quote the diagnostic as data, keep transport errors
Bot review on #1345.
- A "Let me check…" preamble streamed before the failing call is not an
answer, but its text part is finalised at the end of its step — after the
tool error event — so a run-level flag saw it as one and the follow-up never
fired. Steps are now counted; only text from a step after the failure counts
- `lastToolFailure` is recorded before the JSON-mode `emit`, so `--format json`
runs name the tool and error too
- The directive quotes the tool's diagnostic inside `<<<…>>>` (stripped from
the text itself) and says it is data, not instructions; "Do not retry that
tool" only when there is one
- A reply turn that died in transport has recorded its own cause: silence
after it is no longer attributed to the model nor written over that error
- Tests: text-before-failure through a subprocess (new `llm.textTool` harness
step: text then a tool call in one response); delimiter escaping; error
text survives truncation; no-failure directive names no tool
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012Q51zFUmPg1WwtS5CrGJE6
// A reply turn that died in transport (stream or send failure) has already
1504
+
// recorded its own cause; silence after that is not the model's, so it is
1505
+
// neither attributed to it nor allowed to overwrite the real error.
1506
+
if(!assistantTextSeen&&!accounting.fatal){
1485
1507
constline=lastToolFailure
1486
1508
? `No answer was produced: the turn ended after \`${lastToolFailure.tool}\` failed (${lastToolFailure.error.replace(/\s+/g," ").trim().slice(0,300)}).`
1487
1509
: "No answer was produced: the turn ended without a reply."
0 commit comments