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
{{ message }}
Repository navigation
Pull in upstream CLAUDE_CODE_ENTRYPOINT fix for Claude 5-hour usage drain (pingdotgg#28410, #29169) #276
Claude threads in T3 Code drain the Anthropic 5-hour usage meter faster than interactive Claude Code. Anthropic's 5-hour meter charges Claude Agent SDK and claude -p traffic about 1.6 to 1.7x more than the interactive app for the same tokens. T3 Code does not send extra tokens or break the prompt cache, and weekly limits are not affected.
pingdotgg/t3code#29169 (merged Nov 2, upstream commit 47f2c8d29e): stops Claude threads from joining the session that launched T3 Code.
Not taken: PR #29408 (still open upstream) fixes "credit balance too low" for API-key Claude instances (issue #29393). This fork's owner uses subscription login only, so it does not apply; the daily upstream sync brings it in if it merges.
State of this fork
Neither commit is on main (checked 2026-11-02 against upstream/main at 0847a448fd). mergeClaudeProcessEnvironment does not exist in the fork, so Claude processes still send the SDK default entrypoint. The fork's ClaudeSkills.ts differs from upstream, so expect conflicts there.
Tasks
Cherry-pick ddfc4a92ed and 47f2c8d29e onto a branch from main (with -x), resolving conflicts in favor of upstream behavior while keeping fork features.
Run ClaudeHome.test.ts, ClaudeSkills tests and the Claude provider/adapter tests the commits touch, through agent-heavy.
After install (orchestrator and owner, not the worker)
Orchestrator: confirm a running T3 Code Claude process has CLAUDE_CODE_ENTRYPOINT=t3-code (/proc/<pid>/environ).
Owner, optional: from a fresh 5-hour window, run the same 5 to 8 turn prompt in T3 Code and in interactive claude, and compare the share of the 5-hour limit each uses.
Acceptance criteria
main contains both upstream commits, with their tests passing.
Claude processes started by the installed build show CLAUDE_CODE_ENTRYPOINT=t3-code.
Waiting on the Claude provider, driver, skills and adapter tests running in the background (task bba4u4u8p). Their results come back to me automatically.
I opened PR #279 with both upstream fixes; I did not merge it. Every Claude process T3 Code starts now gets CLAUDE_CODE_ENTRYPOINT=t3-code, and Claude threads no longer join the Claude session that launched T3 Code. All 319 targeted tests pass.
What conflicted and how I resolved it
Only ddfc4a92ed (upstream pingdotgg#28410) conflicted, and only in import lines:
ClaudeAdapterV2.ts: I kept the fork's t3OrchestrationInstructions import instead of upstream's T3_CODE_ORCHESTRATION_INSTRUCTIONS. I dropped the mergeProviderInstanceEnvironment import because nothing in the file uses it any more. Upstream's switch to mergeClaudeProcessEnvironment in the adapter applied without conflict.
ClaudeProvider.ts: I kept the fork's discoverClaudeSkillsAndPlugins import and replaced readClaudeSettingsBaseUrl with readClaudeSettingsEnv.
ClaudeSkills.ts, ClaudeHome.ts and ClaudeDriver.ts merged cleanly.
47f2c8d29e (upstream pingdotgg#29169) applied with no conflicts.
I checked for fork-only code that starts Claude without the new environment helper and found none:
The provider status check and Claude text generation get their environment from the driver, which now uses the helper.
The remaining callers of the old helper either match upstream or don't start Claude.
Commit message flaw:git cherry-pick --continue rejected --no-verify, so I committed the first pick by hand, keeping the original author and date. I left out the blank line before the (cherry picked from commit ddfc4a92ed…) line, so it became part of commit c4e09ea641's subject. The traceability line is still there. Fixing it would need a force-push, which needs your approval; a squash merge would also cover it.
Test results (each run through agent-heavy, with the newer Node first on PATH):
vp test run: 8 files, 319 tests passed. The files were ClaudeHome, ClaudeSkills (plus its fork tests), ClaudeDriver, ClaudeAdapterV2 (plus its fork tests) and ClaudeCapabilitiesProbe (plus its fork tests).
vp run check:changed: format, lint, knip 1/2, graphql, typecheck (3 packages) and tests (7 files, 317 passed) all pass.
Activity
tannerpolley commentedon Nov 2, 2026
T3 Code status: Done
Issue: #276 Pull in upstream CLAUDE_CODE_ENTRYPOINT fix for Claude 5-hour usage drain (pingdotgg#28410, #29169)
Thread: thread:delegated-task:command%3Amcp%3A15854dd9-6df9-47d6-884e-32e17422f0a9%3Adelegate-task%3Aissue-276-worker-20261102
Model: claude-opus-5-5
Branch: issue-276-pull-in-upstream-claude_code_entrypoint
Updated: 2026-11-02T18:00:52.321Z
tannerpolley commentedon Nov 2, 2026
T3 Code closeout: done
Issue: #276 Pull in upstream CLAUDE_CODE_ENTRYPOINT fix for Claude 5-hour usage drain (pingdotgg#28410, #29169)
Thread: thread:delegated-task:command%3Amcp%3A15854dd9-6df9-47d6-884e-32e17422f0a9%3Adelegate-task%3Aissue-276-worker-20261102
Model: claude-opus-5-5
Branch: issue-276-pull-in-upstream-claude_code_entrypoint
Completed: 2026-11-02T17:58:38.139Z
Waiting on the Claude provider, driver, skills and adapter tests running in the background (task
bba4u4u8p). Their results come back to me automatically.tannerpolley commentedon Nov 2, 2026
T3 Code closeout: waiting_on_sub_issues
Issue: #276 Pull in upstream CLAUDE_CODE_ENTRYPOINT fix for Claude 5-hour usage drain (pingdotgg#28410, #29169)
Thread: thread:delegated-task:command%3Amcp%3A15854dd9-6df9-47d6-884e-32e17422f0a9%3Adelegate-task%3Aissue-276-worker-20261102
Model: claude-opus-5-5
Branch: issue-276-pull-in-upstream-claude_code_entrypoint
Completed: 2026-11-02T17:58:45.545Z
Waiting on
check:changed(background taskbd3plowk4). It reports back automatically when it finishes.tannerpolley commentedon Nov 2, 2026
T3 Code closeout: done
Issue: #276 Pull in upstream CLAUDE_CODE_ENTRYPOINT fix for Claude 5-hour usage drain (pingdotgg#28410, #29169)
Thread: thread:delegated-task:command%3Amcp%3A15854dd9-6df9-47d6-884e-32e17422f0a9%3Adelegate-task%3Aissue-276-worker-20261102
Model: claude-opus-5-5
Branch: issue-276-pull-in-upstream-claude_code_entrypoint
Completed: 2026-11-02T18:00:52.959Z
I opened PR #279 with both upstream fixes; I did not merge it. Every Claude process T3 Code starts now gets
CLAUDE_CODE_ENTRYPOINT=t3-code, and Claude threads no longer join the Claude session that launched T3 Code. All 319 targeted tests pass.What conflicted and how I resolved it
Only
ddfc4a92ed(upstream pingdotgg#28410) conflicted, and only in import lines:ClaudeAdapterV2.ts: I kept the fork'st3OrchestrationInstructionsimport instead of upstream'sT3_CODE_ORCHESTRATION_INSTRUCTIONS. I dropped themergeProviderInstanceEnvironmentimport because nothing in the file uses it any more. Upstream's switch tomergeClaudeProcessEnvironmentin the adapter applied without conflict.ClaudeProvider.ts: I kept the fork'sdiscoverClaudeSkillsAndPluginsimport and replacedreadClaudeSettingsBaseUrlwithreadClaudeSettingsEnv.ClaudeSkills.ts,ClaudeHome.tsandClaudeDriver.tsmerged cleanly.47f2c8d29e(upstream pingdotgg#29169) applied with no conflicts.I checked for fork-only code that starts Claude without the new environment helper and found none:
I did not take PR pingdotgg#29408.
Commit message flaw:
git cherry-pick --continuerejected--no-verify, so I committed the first pick by hand, keeping the original author and date. I left out the blank line before the(cherry picked from commit ddfc4a92ed…)line, so it became part of commitc4e09ea641's subject. The traceability line is still there. Fixing it would need a force-push, which needs your approval; a squash merge would also cover it.Test results (each run through
agent-heavy, with the newer Node first onPATH):vp test run: 8 files, 319 tests passed. The files wereClaudeHome,ClaudeSkills(plus its fork tests),ClaudeDriver,ClaudeAdapterV2(plus its fork tests) andClaudeCapabilitiesProbe(plus its fork tests).vp run check:changed: format, lint, knip 1/2, graphql, typecheck (3 packages) and tests (7 files, 317 passed) all pass.apps/mobiletypecheck errors didn't come up, because mobile wasn't among the affected packages.vp i, because the worktree setup had never run.PR #279, head 2534df8, checks and reviews: no checks reported yet, no reviews.