mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 01:35:36 -04:00
ebd2332db4
Found the reason yesterday's tool-retrieval drop wasn't taking effect: in _build_agent_prompt, when relevant_tools was provided, it computed tool_names = set(ALWAYS_AVAILABLE) | set(relevant_tools) which silently re-added every tool get_tools_for_query had just deliberately discarded. So when a 'save this for <person>' query dropped manage_memory from the retrieved set, the prompt builder put it right back, and the model saw both tools again. Trust the relevant_tools set. get_tools_for_query already starts from ALWAYS_AVAILABLE — any discard there is intentional and should propagate. Only force-include ask_user and update_plan here as belt- and-suspenders since the agent loop relies on those for its own control flow. Other callers (task_scheduler) already union ALWAYS_AVAILABLE or ASSISTANT_ALWAYS_AVAILABLE into relevant_tools before passing it in, so they're unaffected.