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
In Code Mode, with a connection routed through the OpenAI Responses adapter, the model cannot load any deferred tool. Its first exec call fails before any tool runs:
Because discovery fails, ScheduledTask (and every other deferred tool) is unreachable in that session. The user's request ("create a scheduled task for 10:00 today") ended with no task created.
Root cause. OpenAI Responses reserves tool_search, so #3958 renames the provider-bound tool to maka_tool_search (model-adapter.ts, startStream) and also rewrites every \btool_search\b in the system prompt via remapProviderToolNamesInText. In Code Mode the provider only sees exec; tool_search is nested inside it and bound in the QuickJS cell as tools.tool_search (code-mode.ts / nestableToolSnapshot). The prose rewrite still reaches the Code Mode catalog prompt (renderCodeModeCatalogPrompt, "After tool_search, …" plus the JSON catalog), so the model is told to call a name the cell never binds.
The existing Code Mode backend test (code-mode-backend.test.ts) does not use a Responses runtime, so it does not cover this combination.
What happened
In Code Mode, with a connection routed through the OpenAI Responses adapter, the model cannot load any deferred tool. Its first
execcall fails before any tool runs:{ "ok": false, "error": { "kind": "execution_error", "message": "not a function" }, "toolCalls": [] }Because discovery fails,
ScheduledTask(and every other deferred tool) is unreachable in that session. The user's request ("create a scheduled task for 10:00 today") ended with no task created.Root cause. OpenAI Responses reserves
tool_search, so #3958 renames the provider-bound tool tomaka_tool_search(model-adapter.ts,startStream) and also rewrites every\btool_search\bin the system prompt viaremapProviderToolNamesInText. In Code Mode the provider only seesexec;tool_searchis nested inside it and bound in the QuickJS cell astools.tool_search(code-mode.ts/nestableToolSnapshot). The prose rewrite still reaches the Code Mode catalog prompt (renderCodeModeCatalogPrompt, "After tool_search, …" plus the JSON catalog), so the model is told to call a name the cell never binds.The existing Code Mode backend test (
code-mode-backend.test.ts) does not use a Responses runtime, so it does not cover this combination.How to reproduce
tools.maka_tool_search(...)insideexecand getsnot a function;toolCallsis empty.Environment
apache/main@fef5b937aLogs, screenshots, or additional context
Both conditions are required: Code Mode alone keeps
tool_search; Responses alone exposesmaka_tool_searchas a real provider tool.