Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#7,040 0 comments 0 reactions 0 assignees View on GitHub

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

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

bug provider
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lidge-jun/opencodex

All issues in lidge-jun/opencodex

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.