Repository navigation
fix(server): label T3 Code's Claude requests as t3-code - #423
Merged
Merged
Conversation
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>
Contributor
|
Warning Review limit reachedYou'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. View limit details
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
makeClaudeEnvironmentsetsCLAUDE_CODE_ENTRYPOINT=t3-codeand also replaces inheritedcliorsdk-*values. Without that, a server started from inside a Claude session (for example, a dev server an agent launched) inheritssdk-tsand the fix does nothing. Custom values are kept.makeClaudeHomeEnvironment(config dir only), so aclaudeyou run yourself in a terminal tab keeps its normal label.Verified: a
claude -prun with the variable set records"entrypoint":"t3-code"in its transcript, andsdk-cliwithout it. The Agent SDK only fills insdk-tswhen 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