fix(reply): a one-step turn whose model skips the tool twice is planned and guarded
After the one nudge, a second answer without the tool no longer goes out as it is: the turn takes the planned path (the planner runs then, one extra call only on this failure) and the skipped-tool guard runs the planned tool, so a made-up "24 degrees" answer cannot reach the user. A plan that needs no tool (a question back to the user) still lets the answer go out. Evals (qwen3:8b, EVAL_COMPACT_PROMPT=1 EVAL_INTENT_JUDGE=1, 3 runs): the five tool-skip/weather/screen/follow-up/router files 72/84 (71/84 on 0.1.20, same known failures); Possessor director-then-filmography 0/3, also 0/3 on 0.1.20 (qwen3:8b stops after one search; webSearch turns are still planned). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -234,8 +234,11 @@ direct execution runs the plan.
|
||||
Without a plan the skipped-tool guard above has nothing to run, so these turns get a nudge instead:
|
||||
when the chat model answers in words before any tool ran in this reply, the answer is dropped (no
|
||||
later turn sees it) and a note asks the model to call that tool first, or to ask the user for a
|
||||
missing detail. The nudge is sent at most once per reply; a second answer without the tool (a
|
||||
question back to the user, say) is delivered.
|
||||
missing detail. The nudge is sent at most once per reply. When the model answers without the tool
|
||||
again, that turn falls back to the planned path: the planner runs then (one extra planner call, only
|
||||
on this failure), and the skipped-tool guard above treats the second answer as on any planned turn.
|
||||
A plan naming the tool runs it and the made-up answer never goes out; a plan that needs no tool (a
|
||||
question back to the user, say) lets the answer go out, the planner judging that as before.
|
||||
|
||||
Measured on Strata (Qwen3.6, 2026-11-16 16:45-16:58, the engine log): the planner averaged 2.5 s
|
||||
(9 calls), one after the other before the answer on every tool turn, while the router runs during
|
||||
|
||||
Reference in New Issue
Block a user