update the claude entrypoint identifier for accuracy #28410
main fromrefs/pull/28410/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubClaude processes started by T3 Code identify themselves with CLAUDE_CODE_ENTRYPOINT. Today that value is the Agent SDK default sdk-ts, or a value inherited from the host. For example, it is claude-desktop when T3 Code is started from inside a Claude Code session.
Change#
mergeClaudeProcessEnvironmentinClaudeHome.tssetsCLAUDE_CODE_ENTRYPOINT=t3-codefor the Claude processes T3 Code runs: turns, version and capability probes, and text generation.- A value set in the instance's environment wins over
t3-code. - A value set in Claude's
settings.jsonenvwins over both. Claude Code 2.1.316 reads the entrypoint only from the process env and ignores the one insettings.json, so T3 Code reads it from there itself.readClaudeSettingsBaseUrlbecamereadClaudeSettingsEnvso that one reader serves both values. - In-app terminals do not change. An interactive
claudestarted there keeps its own entrypoint.
Verification#
ClaudeHome.test.tscovers three cases: the default replaces an inherited host value, the instance env overrides the default, andsettings.jsonoverrides both.- I ran Claude Code 2.1.316 against a local fake API and captured the request headers:
- With
CLAUDE_CODE_ENTRYPOINT=t3-codein the process env, the request carriesUser-Agent: claude-cli/2.1.316 (external, t3-code)andcc_entrypoint=t3-code. - With
t3-codein the process env and a different value insettings.json, the request still carriest3-code. This is why T3 Code applies thesettings.jsonvalue itself.
- With
vp run check:changedpasses.
Made with Claude Opus 5.5 in Claude Code, running in T3 Code.
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 5.0 KiB 5.0 KiB +35 B (+0.7%) 6.8 KiB ✅ Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Codex Live turn WebSocket wire 1.2 KiB 1.3 KiB +35 B (+2.8%) 2.0 KiB ✅ Codex Live turn WebSocket decoded 21.5 KiB 21.6 KiB +41 B (+0.2%) 24.4 KiB ✅ Codex Live turn messages 1 2 +1 (+100.0%) 8 ✅ Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅ Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅ Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅ Claude Live turn messages 2 2 0 (0.0%) 8 ✅ Baseline:
575579d· PR result:4d75fb8· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
No actionable comments were generated in the recent review.
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: t3/investigate-claude-usage-tips
- File: .coderabbit.config.ts
- Commit: 4d75fb8
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Team
- Run ID:
77d725fb-c6d4-44d3-819c-fb7e65e0d732
Commits-
Reviewing files that changed from the base of the PR and between 575579d68ac4bae09f8426a345d4a3eac1e90c67 and 4d75fb830717ef5d9b5671534a115141c56e9995.
Files selected for processing: 6-
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.tsapps/server/src/provider/ClaudeProvider.tsapps/server/src/provider/Drivers/ClaudeDriver.tsapps/server/src/provider/Drivers/ClaudeHome.test.tsapps/server/src/provider/Drivers/ClaudeHome.tsapps/server/src/provider/Drivers/ClaudeSkills.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
Walkthrough
-
Claude settings now provide both
ANTHROPIC_BASE_URLandCLAUDE_CODE_ENTRYPOINT. Claude process-environment merging applies the entrypoint from settings when it is nonempty. The Claude driver and orchestration adapter use this merger.Changes: Claude environment resolution
Layer / File(s) Summary Read and merge Claude settings environment
apps/server/src/provider/Drivers/ClaudeSkills.ts,apps/server/src/provider/Drivers/ClaudeHome.ts,apps/server/src/provider/Drivers/ClaudeHome.test.tsThe settings reader returns both environment values, with later settings files overriding earlier values for fields they specify. The merge function combines host and instance environments and applies a nonempty settings entrypoint. Tests cover entrypoint precedence and preservation of a host value. Use Claude environment resolution across provider paths
apps/server/src/provider/Drivers/ClaudeDriver.ts,apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts,apps/server/src/provider/ClaudeProvider.tsThe driver and orchestration adapter use the Claude-specific merger. The provider reads ANTHROPIC_BASE_URLthrough the expanded settings reader and retains its process-environment fallback.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
maria-rcks
Merge Risk:
Low · up to4d75f-
Project-specific entrypoint overrides may be ignored, affecting attribution. This is a bounded merge risk.
Pre-merge checks:
3 · 1-
Failed checks: 1 warningCheck name Status Explanation Resolution Description check The description explains the problem, implementation, behavior, and verification results. However, it omits the required "## Problem" and "## Scope and approval" sections, including an issue or mainta… Add the required "## Problem" and "## Scope and approval" sections. Include the triaged issue or explicit maintainer approval, or explain why this focused fix qualifies without prior approval. Keep the existing change and verification detai… Passed checks: 3 passed-
Check name Status Explanation Title check The title clearly identifies the main change: updating the Claude entrypoint identifier. It is concise and specific. Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request.
Full details: Description check
-
Explanation
The description explains the problem, implementation, behavior, and verification results. However, it omits the required "## Problem" and "## Scope and approval" sections, including an issue or maintainer approval link or an explanation for why the focused fix qualifies without one.
Resolution
Add the required "## Problem" and "## Scope and approval" sections. Include the triaged issue or explicit maintainer approval, or explain why this focused fix qualifies without prior approval. Keep the existing change and verification details under their required headings.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
t3dotgg(GitHub profile, opens in a new tab) closed this
Astra (AI assistant) writing on behalf of @RCXDd. Adding a measured CLIProxyAPI compatibility check for this entrypoint change.
On November 2, I compared a genuine interactive Claude Code TUI (
cli) with the same binary running headless through CLIProxyAPI withCLAUDE_CODE_ENTRYPOINT=t3-code. Both entrypoints were verified in the session transcripts.- Claude Code 2.1.316, CLIProxyAPI 8.0.50, Opus 5.5 at low effort.
- Same account and organization, network egress, working directory, prompts, and generated 28 KB text fixture.
- Three user turns per arm: read the fixture and return a marker, then return two further markers without tools. Four model requests per arm. Every expected response and the Read call succeeded.
- One-hour caching; safe/restricted mode; Read was the only tool; no MCP servers.
Measurement Native TUI Proxy with t3-codeTotal input tokens processed, including cache hits 48,746 48,184 Output tokens 110 124 Final-turn input served from cache 99.713% 99.710% Native usage was deduplicated by message/request identity from transcripts. Proxy totals came from the final cumulative
modelUsage, avoiding partial streamed usage records. This small workload showed essentially equivalent input-token and warm-cache efficiency.Proxy-specific behavior: CLIProxyAPI 8.0.50's native entrypoint allowlist includes
sdk-tsbut nott3-code. With our default OAuth configuration, its source routest3-codethrough the rewriting path, which emitscliupstream and adjusts system-prompt/cache handling. Thus the new label also changes the proxy's processing path; these tests exercised that path successfully.Scope: this reproduces the PR's environment-variable change, rather than testing an installed nightly or the full T3 instruction set. It is not proof of equal subscription quota accounting: the tested Ultra account reports
five_hour: null, and the whole-percentage weekly meter cannot resolve this small workload. The proxy also began with 1,061 cached prefix tokens, so initial cache-write totals would not be a fair cost comparison. Longer sessions, compaction, and subagents were not tested.If further quota verification is needed, the missing evidence is a controlled run on an account that still has a five-hour cap. No credentials, account identifiers, private endpoints, or raw session logs are included here.
Honestly it would be awesome to see my name in this PR https://github.com/pingdotgg/t3code/pull/25597#event-34745329984
Confirming this resolved the issue on T3 Code v0.1.9 (Claude Opus 5.5, Claude Pro).
Comparing local session logs on the same account between
t3-codeandclientrypoints across 5-hour windows:- T3 Code (
t3-code, v2.1.322): Window 1 hit 50% of the 5h meter at $20.98 list-cost equivalent ($42/100%); Window 2 went from 0% to 77% at $35.12 ($45.6/100%). - Claude Code CLI (
cli, v2.1.325): Hit 100% of the 5h limit at $45.66 and $46.77 list-cost equivalent in two separate windows.
Both drain the 5-hour window at the same ~$45–$47 equivalent rate now.
- T3 Code (
Sign in to join this conversation.
Approvability#
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — Claude launches now default their entrypoint identifier to "t3-code", while allowing instance and settings overrides. This changes an existing product default and requires human confirmation of the intended identity and override precedence.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).