Skip to content

[Bug]: Native Claude client identity rejects the Agent SDK sdk-ts entrypoint (betas dropped, output_config 400) #7040

Closed

Description

@flokosti96

Client or integration

Claude Code

Area

Provider adapter

Summary

Claude Code started through the TypeScript Agent SDK (for example embedded in T3 Code) sends User-Agent: claude-cli/<ver> (external, sdk-ts). src/adapters/anthropic/client-identity.ts:24 only accepts the entrypoints cli, sdk-cli and sdk, so the identity is rejected and the request falls back to the first-party beta list. Native-client betas (per-turn-control, advisor-tool, inline-tools, prompt-caching-scope, mid-conversation-system, …) are dropped for every Agent SDK session.

Reproduction

Offline against unmodified 2.84.0 source:

const headers = new Headers({
  "User-Agent": "claude-cli/2.1.296 (external, sdk-ts)",
  "X-App": "cli",
  "X-Claude-Code-Session-Id": "00000000-0000-4000-8000-000000000001",
  "X-Stainless-Lang": "js",
  "X-Stainless-Runtime": "node",
});
captureAnthropicClientIdentity(headers); // undefined

Changing only sdk-ts to sdk, sdk-cli or cli produces an identity.

Live: T3 Code Claude sessions through an ocx hub returned 400 messages.1.output_config: Extra inputs are not permitted. After locally adding || entrypoint === "sdk-ts" to the check, the same hub served 446×200 and no 400 over the following three hours.

Version

@bitkyc08/opencodex 2.84.0, Claude Code 2.1.296

Operating system

macOS 27 (Apple Silicon)

Provider and model

anthropic (OAuth pool), claude-fable-5-1 / claude-opus-5-5

Logs or error output

status=400 surface=claude
messages.1.output_config: Extra inputs are not permitted

Redacted configuration

Hub mode, Claude Code via ocx claude and via T3 Code (Agent SDK).

Proposed fix

Accept sdk-ts in client-identity.ts:24, keeping all required-header and bounded-value checks, and add regressions for a complete sdk-ts identity, missing headers, and malformed User-Agent values.

Screenshots and supporting files

No response

Checks

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

Activity

  1. added
    bug
    provider
    on Oct 13, 2026
  2. lidge-jun commented on Oct 13, 2026

    @lidge-jun
    Owner

    Fixed on dev by #7059 (39f5654): the Agent SDK entrypoint sdk-ts is now accepted as a native Claude client identity, with every other required-header and bounded-value check unchanged. It ships in the next release after 2.84.0.

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

    bugprovider

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions