mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-21 03:39:54 +00:00
ba7248c669
Fixes #1802 The v0.3.0 refactor split child agent construction (_build_child_agent) and execution (_run_single_child) into separate functions. This created a scope bug where _saved_tool_names was defined in _build_child_agent but referenced in _run_single_child's finally block, causing a NameError on every delegate_task call. Solution: Move the save/restore logic entirely into _run_single_child, keeping the save and restore in the same scope as the try/finally block. This is cleaner than passing the variable through and removes the dead save from _build_child_agent.