You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preserve native Claude requests when T3 identifies its Claude process as t3-code (pingdotgg/t3code#28410). The unknown entrypoint currently triggers CLI cloaking, replacing attribution and changing prompt/cache handling.
Before: executor regressions show ordinary and scheduled t3-code requests rewritten to claude-cli/2.1.280 (external, cli). After: message, streaming and upstream token-count regressions preserve the T3 User-Agent, caller instructions, tools and cache controls. Message/stream requests retain cc_entrypoint=t3-code; count-tokens retains its existing billing-header exclusion.
Detector coverage includes bare CLI and SDK forms, scheduled markers, Haiku title/search helpers, and rejection when native signals are missing or the version is implausible. Existing unknown-entrypoint coverage remains.
go test ./... and go build -o test-output ./cmd/server pass. Changed Go files are gofmt clean.
Merge Danger
Door: two-way
Revert the two detector entries; client rollout must be rolled back with it to avoid returning T3 traffic to cloaking.
Blast Radius: Claude
Only t3-code requests satisfying the existing native checks gain pass-through. No payload rules, quota routing, timeouts or token pricing change. Weekly subscription savings have not been measured; this PR establishes attribution compatibility, not a metering fix.
Linear: HOUSE-104
Review scope
Review only this PR's one-commit delta from 148e2d8db9ae7b78df8ce96d8c273c438f688a46 to 5c7a04b0cce66741b1b41f9698064bb97c021658: two production map entries and their regression tests. No upstream synchronization is included. Existing upstream behavior is context for assessing these changes, not a request for a repository-wide audit or unrelated repairs.
This PR makes the proxy treat Claude requests from T3 Code (entrypoint `t3-code`) as native Claude Code traffic. Before, the proxy did not recognize this entrypoint and rewrote these requests to look like a generic CLI client. That rewrite replaced the User-Agent and billing attribution and changed prompt and cache handling. The production change is two map entries:`t3-code` is added as its own subclient and to the native-entrypoint allowlist, so it still has to pass the existing version, header and metadata checks. The PR adds tests for message, streaming and token-count pass-through, detector identity (including scheduled requests and the Haiku title/search helpers), and rejection when native signals are missing or the version is implausible. The author reports that `go test ./...` and the build pass, and notes that subscription metering savings have not been measured.
Area
What changes
Claude client detection
Adds `t3-code` to the subclient map and to the native-entrypoint allowlist. Requests using it now bypass CLI cloaking when they meet the existing native checks.
Tests
Adds executor tests confirming that `t3-code` execute, stream and count-tokens requests keep their User-Agent, system blocks, tools and messages. Extends the detector tests to cover `t3-code` identity, the helper profiles, and cases where native signals are missing.
First review of this pull request.
4 reviewers finished.
Commit 5c7a04b. Check run.
Run: GET /unfret/run/panel:5c7a04b0cce66741b1b41f9698064bb97c021658:ThJcSbOxmnz:90ceH0C1WNM.
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
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.
Summary
Preserve native Claude requests when T3 identifies its Claude process as
t3-code(pingdotgg/t3code#28410). The unknown entrypoint currently triggers CLI cloaking, replacing attribution and changing prompt/cache handling.native Claude entrypoints cli, sdk-cli, sdk-ts, claude-vscode + t3-code (same version/header/metadata checks)Evidence
t3-coderequests rewritten toclaude-cli/2.1.280 (external, cli).After: message, streaming and upstream token-count regressions preserve the T3 User-Agent, caller instructions, tools and cache controls. Message/stream requests retain
cc_entrypoint=t3-code; count-tokens retains its existing billing-header exclusion.go test ./...andgo build -o test-output ./cmd/serverpass. Changed Go files are gofmt clean.Merge Danger
Door: two-way
Revert the two detector entries; client rollout must be rolled back with it to avoid returning T3 traffic to cloaking.
Blast Radius: Claude
Only
t3-coderequests satisfying the existing native checks gain pass-through. No payload rules, quota routing, timeouts or token pricing change. Weekly subscription savings have not been measured; this PR establishes attribution compatibility, not a metering fix.Linear: HOUSE-104
Review scope
Review only this PR's one-commit delta from
148e2d8db9ae7b78df8ce96d8c273c438f688a46to5c7a04b0cce66741b1b41f9698064bb97c021658: two production map entries and their regression tests. No upstream synchronization is included. Existing upstream behavior is context for assessing these changes, not a request for a repository-wide audit or unrelated repairs.