fix(reply): never deliver the tool-less answer when the planned call cannot run
When the skipped-tool guard could not run the planned call (not a literal call, or arguments the tool does not take) it delivered the answer it had held back, which was given without the tool and could be a made-up value. The planned call is now recorded as a failed tool result and the model answers from that, so the user hears that it could not check or do it. M0 kit: a case passes only when the final answer uses the tool result (13 degrees, not a made-up 24) or, for the no-tool request, says it cannot do it; the no-tool request now counts. The kit mirrors the engine's failed-result path, and a failing model moves on to the next candidate on these stricter checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -183,10 +183,13 @@ The engine consumes the plan in two phases.
|
||||
against the tool's input schema. An LLM resolver could "repair" a wrong
|
||||
step into a valid but unwanted call (a timer request planned as
|
||||
`setBroadcast duration=5 minutes` was turned into starting the broadcast).
|
||||
- Fail-open: if the first planned step cannot be run as written, the
|
||||
engine delivers the answer it held back, without a second chat call. The
|
||||
guard fires at most once per reply and never in text-tool mode (that mode
|
||||
already direct-executes every plan).
|
||||
- If the first planned step cannot be run as written, the held-back answer
|
||||
is still never delivered (it was given without the tool, so it may be a
|
||||
guess). The engine records the planned call as a failed tool result
|
||||
("could not be run, nothing was fetched or done") and the chat model
|
||||
answers from that, which under the tool honesty rules means saying it
|
||||
could not check or do it. The guard fires at most once per reply and never
|
||||
in text-tool mode (that mode already direct-executes every plan).
|
||||
- In native mode the direct-exec result is a `role=tool` message answering
|
||||
the synthetic assistant `tool_calls` message, and no progress nudge is
|
||||
appended.
|
||||
|
||||
Reference in New Issue
Block a user