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
PFormat tool-call syntax dropped from parser while ~10 builtin prompts still teach it #4465
Part of the v0.58.7 → HEAD TinyAgents-migration audit (see parent issue).
Problem
The legacy parser (v0.58.7 harness/engine/parser.rs) accepted PFormat positional tool calls (tool_name[arg1|arg2]). The migrated parse path (src/openhuman/tinyagents/model.rs:162-194 → src/openhuman/agent/harness/parse.rs) kept the XML/JSON/markdown/GLM grammars but dropped PFormat — while ~10 built-in agents' prompts still teach the syntax (src/openhuman/agent/harness/subagent_runner/ops/runner.rs:761 and the agent prompt files). A model that follows its own instructions emits calls that are now logged as "malformed" and silently lost — the turn continues as if no tool was called.
Fix plan
Decide one of:
(a) Restore PFormat parsing in parse.rs and wire it into the fallback chain in model.rs (port the legacy grammar + its tests), or
(b) Remove PFormat from all prompts: strip the name[a|b] teaching from the ~10 builtin agent prompts and runner.rs:761, replacing with the supported XML/JSON form.
Recommendation: (b) unless there's evidence local/small models rely on PFormat for reliability — the fewer grammars the parser speaks, the fewer ambiguity bugs; but whichever way, prompts and parser must agree.
Either way: add a lint-style test that greps builtin prompts for tool-call syntax examples and asserts the parser accepts each one (prompt/parser contract test), so drift can't recur.
Acceptance criteria
Every tool-call syntax taught by any builtin prompt round-trips through the live parser.
Resolved by merged PR #4495 ("TinyAgents migration parity & bug fixes (#4451–#4469)") + follow-up #4504 — both present in main. Part of the completed #4470 cluster; closing as done. (Reopen if a residual remains.)
Activity
fix(agent): restore P-Format tool-call parsing in migrated parse path (…
fix(agent): don't advance JSON cursor for P-Format tags in parse (tin…
M3gA-Mind commentedon Jul 7, 2026
Resolved by merged PR #4495 ("TinyAgents migration parity & bug fixes (#4451–#4469)") + follow-up #4504 — both present in
main. Part of the completed #4470 cluster; closing as done. (Reopen if a residual remains.)