The previous fix regenerated the MCP config per call but still pulled the tool set from pi.getAllTools(), which depends on the runtime binding being scoped to the right AgentSession. Engine-spawned triage/executor sessions register custom tools (fn_review_spec, fn_review_step) and pi-ai already passes those to the provider via Context.tools — that's the authoritative per-session list and bypasses any binding ambiguity. Falls back to pi.getAllTools() when the caller doesn't populate Context.tools. Also logs the tool names on refresh so missing tools are diagnosable from stderr. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5.6 KiB
5.6 KiB