mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4447] [CLOSED] [Other] A tool call written as text is shown as not run #5053
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5053
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4447
Author: @xvcezrqpbxtpzblrt
Created: 10/28/2026
Status: ❌ Closed
Base:
main← Head:agent/text-call-027📝 Commits (1)
ed85bf8[Other] A tool call written as text is shown as not run📊 Changes
17 files changed (+237 additions, -15 deletions)
View changed files
📝
apps/host/server/agent/agent-bridge.mjs(+2 -0)📝
apps/host/server/agent/events.mjs(+127 -5)📝
apps/host/server/agent/preset.mjs(+1 -0)📝
apps/host/server/agent/turn-guard.mjs(+3 -0)📝
apps/host/src/locales/de.json(+5 -1)📝
apps/host/src/locales/en.json(+5 -1)📝
apps/host/src/locales/es.json(+5 -1)📝
apps/host/src/locales/fr.json(+5 -1)📝
apps/host/src/locales/ja.json(+5 -1)📝
apps/host/src/locales/ko.json(+5 -1)📝
apps/host/src/locales/pt.json(+5 -1)📝
apps/host/src/locales/ru.json(+5 -1)📝
apps/host/src/locales/zh.json(+5 -1)📝
apps/host/tests/agent-events.test.mjs(+36 -0)📝
apps/host/tests/agent-turn-guard.test.mjs(+14 -0)📝
apps/host/tests/functional-fixes.test.mjs(+4 -1)📝
apps/host/tests/helpers/scripted-worker.mjs(+5 -0)📄 Description
## 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.