Skip to content

400 "Missing namespace for function_call" for deferred/tool-search tools (e.g. extensions_manage) on 1.0.80 #4519

Description

@ms-jb

Describe the bug

Description

On Copilot CLI 1.0.80, calls to tools discovered via deferred tool search intermittently fail with:

Execution failed: CAPIError: 400 Missing namespace for function_call '<tool_name>'. It does not exist in the default namespace. Round-trip the model's function_call item with its namespace field included. (Request ID: )

Observed against:

  • A locally installed extension tool: agenttools-prwatch_pool (plugin prwatch:prwatch)
  • A built-in tool: extensions_manage

Both are (or can be) discovered via deferred tool_search_call rather than eager loading, and the model's function_call item appears to lose its namespace field when round-tripped back to CAPI on a subsequent turn, producing the 400 above.

Impact

Any session that discovers the affected tool via deferred tool search becomes unable to invoke it at all, with no recovery path other than avoiding the tool. This is not scoped to third-party extensions — it also hit a built-in tool (extensions_manage), suggesting the root cause is in the deferred-tool-search/round-trip serialization path itself.

Root cause (as best diagnosed locally)

Workarounds applied locally

  1. Per-extension: set defer: "never" on our own extension's tools so they're eagerly loaded (doesn't help built-in tools).
  2. Global: set "toolSearch": false in ~/.copilot/settings.json to disable deferred tool search app-wide. After this, both extensions_manage and the previously-failing extension tool succeeded with no further namespace errors.

Neither is a real fix — (1) doesn't cover built-ins, (2) disables a supported performance feature entirely.

Expected behavior

Deferred tool calls should retain their namespace field when round-tripped back to the model/CAPI on subsequent turns, regardless of whether the tool is built-in or from an installed extension, so toolSearch can stay enabled without risking a 400 on invocation.

Environment

  • Copilot CLI version: 1.0.80
  • OS: Windows
  • Reproduced with: a locally installed plugin extension (prwatch:prwatch) and a built-in tool (extensions_manage)

Related

Suggested fix direction

Cache the call_id → namespace mapping (as captured in serverTools.functionCallNamespaces) and reattach namespace when serializing/replaying the corresponding function_call item on the next request, instead of relying on the model to carry it forward verbatim.

Affected version

1.0.80

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

Activity

  1. added theissue type on Aug 18, 2026
  2. MilkyWay008 commented on Aug 18, 2026

    @MilkyWay008

    Your root cause read looks right, toolSearch: false is the documented escape hatch so that's a legit workaround, not a hack. Worth linking this to codex#23839 since they share the same namespace round-trip bug, whoever lands that fix can cover both, your call_id \u2192 namespace cache idea is exactly the shape of it. btw, I keep a portable Hermes OTG on a USB as my rescue agent for poking at CLI internals like this, check it, imo it may help you diagnose quicker. https://github.com/MilkyWay008/Hermes-OTG

  3. added
    area:modelsModel selection, availability, switching, rate limits, and model-specific behavior
    area:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
    and removed on Aug 19, 2026
  4. copilot-cli-bot commented on Oct 5, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.91. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:modelsModel selection, availability, switching, rate limits, and model-specific behaviorarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions