Skip to content

fix(server): label T3 Code's Claude requests as t3-code - #423

Merged
Bl4ckBl1zZ merged 1 commit into
mainfrom
fix/claude-entrypoint-attribution
Oct 26, 2026
Merged

Bl4ckBl1zZ merged 1 commit into
mainfrom
fix/claude-entrypoint-attribution

Conversation

@Bl4ckBl1zZ

Copy link
Copy Markdown
Owner

Problem

The Claude processes T3 Code starts label their requests sdk-ts/sdk-cli, and requests with those labels appear to use up the 5-hour usage window about 1.8–2.2x faster than the interactive CLI. Measurements are in upstream pingdotgg/t3code#25597 and anthropics/claude-code#97074.

Fix

Based on upstream #25597, with two changes:

  • makeClaudeEnvironment sets CLAUDE_CODE_ENTRYPOINT=t3-code and also replaces inherited cli or sdk-* values. Without that, a server started from inside a Claude session (for example, a dev server an agent launched) inherits sdk-ts and the fix does nothing. Custom values are kept.
  • The integrated terminal now uses makeClaudeHomeEnvironment (config dir only), so a claude you run yourself in a terminal tab keeps its normal label.

Verified: a claude -p run with the variable set records "entrypoint":"t3-code" in its transcript, and sdk-cli without it. The Agent SDK only fills in sdk-ts when the variable is unset. I did not re-measure the quota effect.

Note: upstream hasn't merged this yet, so the next upstream sync may conflict here.

Model/harness: Claude Opus 5.5 via Claude Code (T3 Code).

🤖 Generated with Claude Code

Claude requests labelled sdk-ts/sdk-cli drain the 5-hour usage window
roughly 1.8-2.2x faster (pingdotgg/t3code#25597, anthropics/claude-code#97074).
Claude processes T3 Code spawns now get CLAUDE_CODE_ENTRYPOINT=t3-code,
replacing inherited cli/sdk-* labels; custom values are kept. Integrated
terminals keep the inherited value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between d4e6084 and 2d1ac58.

Files selected for processing: 3
  • apps/server/src/provider/Drivers/ClaudeHome.test.ts
  • apps/server/src/provider/Drivers/ClaudeHome.ts
  • apps/server/src/terminal/Manager.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Bl4ckBl1zZ
Bl4ckBl1zZ merged commit 62fb650 into main Oct 26, 2026
21 checks passed
@Bl4ckBl1zZ
Bl4ckBl1zZ deleted the fix/claude-entrypoint-attribution branch October 26, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant