Repository navigation
[Other] A tool call written as text is shown as not run - #4447
Closed
xvcezrqpbxtpzblrt wants to merge 1 commit into
Closed
xvcezrqpbxtpzblrt wants to merge 1 commit into
xvcezrqpbxtpzblrt wants to merge 1 commit into
Conversation
Contributor
Author
|
Superseded by #4606, which carries this change with the rest of the 0.2.7 branch. Closing so the review has one place. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A model can put a tool call in the text channel instead of calling the tool. A real session (session-82188d88, 4 turns, 373 steps) has this at seq 1328:
Then step/end and urn/end follow: the command never ran and the turn was over. The chat showed the raw XML as the answer, so nothing told the person that the work was not done.
The same session has 3,772 ordinary ool/call events, so this is the model's slip, not a broken parser.
Result
Validation
node --test tests/agent-events.test.mjs→ 18 pass (3 new: whole call, split across chunks plus a quoted block, a half-written tag at the end of a message).node --test tests/agent-turn-guard.test.mjswith the installed Harness, against a scripted model that answers with the same text → 10 pass, including the new end-to-end case: no raw XML in the deltas, one card withargs.command = "python -m py_compile a.py", the note is the last delta, the turn ends normally.node --test tests/languages-and-catalog.test.mjs tests/french-catalog.test.mjs tests/locale-gaps.test.mjs tests/functional-fixes.test.mjs→ pass; the catalogs have the same 3,532 keys in every language and French keeps its typography.EPERMcases, unchanged), 108 skipped.Limits