Skip to content

Native Anthropic OAuth leaves deferred tool references unrenamed #6531

Closed

Description

@clairernovotny

Client or integration

Claude Code

Area

Provider adapter

Summary

OpenCodex 2.76.0 native Anthropic OAuth renames declared custom tools and tool_use blocks but leaves tool_reference.tool_name unchanged. Resuming a Claude Desktop Code session with deferred MCP tool references returns HTTP 400. Expected references and declarations to use consistent wire names without modifying the conversation or cache markers.

Reproduction

  1. Configure an anthropic provider with OAuth to api.anthropic.com.
  2. Enable protocols.rollout.managedMessagesNative and managedMessagesNativeOAuth; use one eligible account.
  3. Build a Messages request with tool lookup, tool_result.content containing {"type":"tool_reference","tool_name":"lookup"}, and native cache_control markers.
  4. The outgoing tool is custom_lookup but the reference is lookup.
  5. Anthropic rejects the unmatched reference. A local regression reproduces the wire mismatch without credentials or paid calls.

Version

OpenCodex 2.76.0; Claude Code 2.1.288

Operating system

macOS 27.2

Provider and model

Anthropic OAuth / claude-opus-5-5

Logs or error output

400 Tool reference 'lookup' not found in available tools

The public reproduction uses a synthetic tool name; private session content is omitted.

Screenshots and supporting files

Offline fixture and regression will be linked in the companion PR.

Redacted configuration

{"protocols":{"rollout":{"managedMessagesNative":true,"managedMessagesNativeOAuth":true}}}

Checks

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

Activity

  1. added
    bugSomething isn't working
    account-poolOAuth, credentials, Codex pool, quota, failover, plans
    providerProvider adapters, OpenAI-compat presets, upstream API quirks
    toolstool_calls, MCP, web-search / sidecar tools
    on Oct 3, 2026
  2. lidge-jun commented on Oct 4, 2026

    @lidge-jun
    Owner

    Fixed on dev through #6552, merged as 0455845.

    Native OAuth declarations, typed deferred references and supported inline tool changes now use consistent wire names while opaque arguments/schemas, cache metadata and original input remain preserved. The original nested-reference regression remains, with additional declaration-order/collision coverage and complete-builder tests for the caller-requested inline-tools beta. Independent code/security and integration reviews passed, and final-head CI37179575281 passed against the actual accepted dev base before landing.

    This closes the tool-name consistency defect. No live Anthropic account or installed-runtime verification is implied, and separate pooled-session/cache acceptance remains tracked in #6532. The fix is on dev and is not part of the already-published2.77.0 release.

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-poolOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't workingproviderProvider adapters, OpenAI-compat presets, upstream API quirkstoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions