Skip to content

[Bug] Claude Code's advisor_20260301 server tool is dropped on the translated Messages path #8448

Closed

Description

@fivetaku

Client or integration

Claude Code

Area

Tools / MCP / web search

Summary

Recent Claude Code builds declare Anthropic's Advisor server tool on /v1/messages:

{"type": "advisor_20260301", "name": "advisor", ...}

They send it with the anthropic-beta: advisor-tool-2026-03-01 header. That beta is on the allowlist (src/adapters/anthropic/beta-allowlist.ts), but the tool declaration does not reach an Anthropic destination on the translated Messages path. The model never sees advisor. Calling the same Anthropic-compatible upstream directly, without the proxy, works.

Expected: when the destination is first-party-compatible Anthropic, the typed advisor_* server tool travels out of body like web_search_* / web_fetch_*. Alternatively, the proxy could document that it is unsupported.

Reproduction

Code path on dev (2.100.0, a1d7d05):

  1. src/claude/inbound-content-options.ts toolsToResponses keeps only web_search* and tools with name + input_schema. advisor_20260301 has no input_schema, so it falls into "Other server tools … have no routed equivalent: drop."
  2. declaredAnthropicServerTools only matches /^web_(search|fetch)_\d+$/, so _anthropicServerTools never carries it, and src/adapters/anthropic.ts cannot re-append it.
  3. The managed native Messages lane is off by default (protocols.rollout.managedMessagesNative is false unless an account pool is enabled), so a key-auth Anthropic provider takes this translated path.

Direct probe against the module on dev:

const tools = [{ type: "advisor_20260301", name: "advisor", model: "…" }, { name: "Read", input_schema: { type: "object", properties: {} } }];
toolsToResponses(tools)?.map(t => t.name)   // ["Read"]
declaredAnthropicServerTools({ tools })     // undefined
hasNativeOnlyTool({ tools })                // true

End to end: Claude Code to ocx (provider with adapter: "anthropic", API key) to an Anthropic-compatible upstream. The model reports no advisor tool. The same client pointed directly at the upstream gets the Advisor.

Version

Observed on 2.99.0; code path unchanged on dev 2.100.0 (a1d7d05).

Operating system

macOS (arm64)

Provider and model

adapter: "anthropic" provider (API-key auth), Claude Opus model.

Logs or error output

No error: the declaration is silently dropped.

Notes

  • The native Messages lane (managedMessagesNative: true) was not tested.
  • Carrying the typed tool would need a decision on how it coexists with the proxy-side Advisor's synthetic advisor function tool (same wire name). Today sidecar-execution.ts already lets the synthetic tool own the name for a turn.
  • Separate from the replay-config factory lookup bug fixed in fix(advisor): resolve the factory for the Claude replay config #8449. That bug kept the proxy Advisor's own synthetic tool off /v1/messages.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. coderabbitai commented on Nov 9, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #7374 - fix(combo): stop the prompt-cache usage leak — replay native Messages on Anthropic children [closed]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added
    bug
    account-pool
    tools
    on Nov 9, 2026
  3. lidge-jun commented on Nov 10, 2026

    @lidge-jun
    Owner

    Checked on dev df0e6ccc4. The report holds, and it is larger than the server-tool regex.

    • declaredAnthropicServerTools (src/claude/inbound-content-options.ts:106) admits only web_(search|fetch)_N, so advisor_20260301 is dropped before the Anthropic adapter.
    • Widening that regex alone would not work end to end. The translated path maps Anthropic server blocks back only for web_search/web_fetch (src/adapters/anthropic.ts:1450, src/claude/outbound.ts:283-328), and history replay accepts only those two names (src/claude/inbound-content-options.ts:132). An Advisor server_tool_use and its result block would have no Responses representation on the way back to Claude Code, and the next turn could not replay them.
    • The wire name collides with the proxy Advisor's synthetic advisor function. withAnthropicServerTools (src/adapters/anthropic.ts:965) already lets a same-named function win, so a rule exists, but it has not been chosen for this tool.

    This needs an owner decision before implementation:

    1. Document it as unsupported on the translated Messages path (docs-only). The managed native Messages lane is the route that can carry it; that lane is still untested for this tool.
    2. Carry the typed tool for first-party-compatible Anthropic destinations. Admit advisor_N, map its server_tool_use and result blocks through the Responses layer and back in claude/outbound.ts, and extend replay. The proxy Advisor's synthetic tool keeps the name whenever it is active for the turn (the existing withAnthropicServerTools rule). Non-Anthropic destinations drop it, as they do web_fetch today.

    Recommendation: do 1 now and 2 as its own PR after #8484 settles the proxy Advisor's Messages path, because 2 depends on which side owns advisor on that path.

  4. added
    needs-design
    on Nov 10, 2026
  5. lidge-jun commented on Nov 11, 2026

    @lidge-jun
    Owner

    Decision: option 2. Carry the typed advisor_* tool out of body to anthropic-adapter destinations whose credential domain is first-party Anthropic by default, and to Anthropic-compatible gateways only through a per-provider opt-in. The proxy Advisor's synthetic advisor tool keeps the name when it is active for the turn. server_tool_use and advisor_tool_result (both advisor_result and advisor_redacted_result) round-trip unchanged. Destinations that do not receive it drop it without blocking combo children.

  6. removed
    needs-design
    on Nov 11, 2026
  7. added a commit that references this issue on Nov 11, 2026
    07376a7
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

    account-poolbugtools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions