[Bug]: Native Claude client identity rejects the Agent SDK sdk-ts entrypoint (betas dropped, output_config 400)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend-api-design
Research direction
Start with src/adapters/anthropic/client-identity.ts:24 and trace how the entrypoint is validated and how the captured identity selects beta headers. Add regression coverage for a complete sdk-ts identity, missing headers, and malformed User-Agent values, as described in the issue. Done means sdk-ts identities are accepted with existing validation intact and the regressions pass.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.3k
- Avg merge
- 5h 7m
- Merged PRs (30d)
- 617
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lidge-jun/opencodex
-
[Bug]: ocx doctor reports a false history integrity failure when state_5.sqlite is WAL without -shmOpenbug cli
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
account-pool enhancement needs-design proxy
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
lidge-jun/opencodex#6737 · 1 comment ·
Maintainers usually reply within 1 day
-
bug catalog provider tools
Difficulty 4/5 3-5 days Newbie friendliness 38/100
lidge-jun/opencodex#7049 · 1 comment ·
Maintainers usually reply within 1 day
-
account-pool bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
lidge-jun/opencodex#7046 · 1 comment ·
Maintainers usually reply within 1 day
-
account-pool bug platform service
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
All issues in lidge-jun/opencodex
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NaturalIntelligence/fast-xml-parser#890 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zsviczian/obsidian-excalidraw-plugin#3000 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pnpm/get.pnpm.io#68 ·
-
[BUG] Cloudflare KV binding 模式下 kvDriver.list() 沿用 EdgeOne 语义,字段名不匹配导致 key 格式下初始化 500 并耗尽 list 配额Possibly taken @wumingzhinu claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
OpenListTeam/OpenList-Worker#125 ·
Maintainers usually reply within 2 days
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
margelo/react-native-vision-camera#4217 ·
Maintainers usually reply within 4 days