mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
1.5 KiB
1.5 KiB
01.2 — Unknown-tool recovery via RunPolicy
Crate RunPolicy.unknown_tool now has UnknownToolPolicy::{Fail, ReturnToolError, Rewrite { tool_name }} plus an AgentEvent::UnknownToolCall
variant — the sentinel is deletable.
Current status (2026-07-02): run_policy_for sets
UnknownToolPolicy::ReturnToolError, OpenhumanEventBridge projects
AgentEvent::UnknownToolCall into grep-friendly diagnostics, and the old
sentinel/middleware symbols are gone from source.
Steps
- Done:
run_policy_forsetsRunPolicy.unknown_tool = UnknownToolPolicy::ReturnToolError, preserving the legacy "model corrects itself" behavior with the original requested name). - Done: no wording-only sentinel shim remains in
tinyagents/middleware.rs. - Done:
AgentEvent::UnknownToolCallreachesOpenhumanEventBridgeand is projected distinctly from "tool executed and failed" in debug logs.
Deletions
- Deleted:
UNKNOWN_TOOL_SENTINEL+ sentinel tool registration insrc/openhuman/tinyagents/tools.rs. - Deleted:
UnknownToolRewriteMiddlewareinsrc/openhuman/tinyagents/middleware.rs(+ its tests, rewritten as RunPolicy behavior tests).
Acceptance
- Hallucinated tool name -> recoverable tool error, run continues; event stream records the original requested name; no sentinel appears in transcripts or advertised schemas.
- Sub-agent and top-level tests accept TinyAgents' fixed recoverable-tool-error wording while preserving the original requested tool name in events/logs.