Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Use a Claude Max or Team plan and link a Console organization that holds only the included API credits for subscribers, with no purchased balance.
- In T3 Code, add a
claudeAgentprovider instance withANTHROPIC_API_KEYset to a key from that organization. - Send any prompt on that instance.
The cause reproduces outside T3 Code with the same key. Only the entrypoint value changes:
CLAUDE_CODE_ENTRYPOINT=t3-code ANTHROPIC_API_KEY=<key> claude -p 'Reply with the single word ok' --model claude-haiku-5-5 --setting-sources '' --strict-mcp-config --no-session-persistence --output-format json
CLAUDE_CODE_ENTRYPOINT=sdk-cli ANTHROPIC_API_KEY=<key> claude -p 'Reply with the single word ok' --model claude-haiku-5-5 --setting-sources '' --strict-mcp-config --no-session-persistence --output-format jsonExpected behavior
The turn runs and draws on the credits. T3 Code runs Claude through the Agent SDK, and Anthropic's documentation lists the Agent SDK as covered by these credits.
Actual behavior
Every turn fails in under a second with Credit balance is too low, while the Console shows the balance available. T3 Code shows "Claude gave up after repeated API errors." Replacing the key does not help, so the message sends people to the wrong fix.
The likely cause is #28410, merged 2026-11-02, which replaced the Agent SDK default sdk-ts with CLAUDE_CODE_ENTRYPOINT=t3-code in mergeClaudeProcessEnvironment (apps/server/src/provider/Drivers/ClaudeHome.ts).
Results with one key, on one credit-only organization:
| Entrypoint | Model | Result |
|---|---|---|
t3-code |
Haiku 5.5 | Credit balance is too low |
t3-code |
Opus 5.5 | Credit balance is too low |
t3-code, with user settings |
Haiku 5.5 | Credit balance is too low |
sdk-cli |
Haiku 5.5 | Worked |
sdk-cli |
Opus 5.5 | Worked |
sdk-cli, with user settings |
Haiku 5.5 | Worked |
cli |
Haiku 5.5 | Worked |
A direct POST /v1/messages with the same key also worked.
Not verified:
sdk-tsitself. I did not run it. It is the value before update the claude entrypoint identifier for accuracy #28410, according to that PR.- That this instance worked in T3 Code before update the claude entrypoint identifier for accuracy #28410. My local logs do not go back far enough to show it.
- How Anthropic classifies requests. I only observed that the result follows the entrypoint value. The documentation says these credits do not cover Claude Code, so an unrecognized entrypoint may be treated that way.
- An organization that also has purchased credits. The documentation suggests the request would run and be charged to the purchased balance.
Possible fix: keep t3-code for subscription logins, and leave the Agent SDK default in place when the instance authenticates with ANTHROPIC_API_KEY. Whichever fix is chosen, showing the CLI's error text would help. The failed runs reported billing_error with HTTP 400, but the thread said only that Claude gave up after repeated API errors.
Impact
Blocks work completely
This applies to API-key Claude instances on organizations that hold only these credits.
Version or commit
Desktop 0.1.7-nightly.20261102.4080. The t3-code default is still on main as of 2026-11-02.
Environment
macOS (Darwin 27.0.0), Claude Code 2.1.316, Agent SDK 0.3.276, claude-opus-5-5 and claude-haiku-5-5
Logs or stack traces
"apiKeySource":"ANTHROPIC_API_KEY"
"model":"<synthetic>","error":"billing_error","text":"Credit balance is too low"
"is_error":true,"api_error_status":400,"result":"Credit balance is too low","total_cost_usd":0Workaround
Use a Claude instance that signs in with the subscription. #28410 also lets CLAUDE_CODE_ENTRYPOINT in the instance's environment override the default, but I did not test that inside T3 Code.
Model: Claude Opus 5.5 · Harness: Claude Code in T3 Code
Activity
kyle944 commentedon Nov 2, 2026
Update: I have now tested
sdk-ts, which the report above listed as not verified.I set
CLAUDE_CODE_ENTRYPOINT=sdk-tsin the environment of the same API-key provider instance, using the override that #28410 allows, and changed nothing else. The same instance, stored key and T3 Code build then worked through T3 Code on Haiku 5.5 and Opus 5.5, where both had failed withCredit balance is too low. The included credit balance went down after the runs, so the credits paid for them.This confirms the workaround inside T3 Code, and that the Agent SDK default is accepted for these credits. It does not change the suggested fix. It also still does not show that this instance worked before #28410.
Model: Claude Opus 5.5 · Harness: Claude Code in T3 Code
test(server): an empty API key in Claude settings keeps the t3-code l…
fix(server): an empty API key in Claude settings is not an API key
test(server): Claude sessions take their label from effective settings
fix(server): Claude sessions take their label from effective settings
test(server): long-lived Claude env keeps only configured labels
fix(server): long-lived Claude env keeps only configured labels
test(server): a settings file Claude Code rejects does not change the…
fix(server): read Claude settings env with strict JSON
test(server): Windows Claude env names match in any case
fix(server): match Windows Claude env names in any case
test(server): all inherited Windows Claude env names match in any case
fix(server): upper-case all inherited Windows names for Claude
test(server): Claude managed drop-ins count toward the session label
fix(server): read Claude managed drop-ins for the session label
test(server): the Claude label follows only settings the process loads
fix(server): the Claude label follows only settings the process loads
test(server): the Claude label reads settings from --project-config-root
fix(server): the Claude label reads settings from --project-config-root
BrahimiMehdi commentedon Nov 4, 2026
Additional reproduction on Linux x64 with T3 Code Desktop and its local server, both version
0.1.8-nightly.20261104.4179(commit9e85538535c8553901351112ab02dd1dd62db5ee), and Claude Code2.1.318.This case uses credentials stored by
claude auth login --console, rather than anANTHROPIC_API_KEYprovider override. The user has subscriber-included promotional Console credits. There was noANTHROPIC_API_KEYorCLAUDE_CODE_OAUTH_TOKENoverride in the affected T3 Claude process.Evidence from the affected machine:
billing_error,Credit balance is too low; the run ends withClaude gave up after repeated API errors.A fresh triage thread failed the same way, so the symptom is not limited to resuming old threads.CLAUDE_CODE_ENTRYPOINTfrom that environment made the request succeed. Removing onlyCLAUDE_CODE_SDK_READS_SESSION_STATEdid not.CLAUDE_CODE_ENTRYPOINT=t3-code claude auth login --consoleand restarting T3 did not resolve the failure.CLAUDE_CODE_ENTRYPOINT=sdk-tswith the existing login returnedOK,is_error=false, and no API error status.The exact release source still sets
CLAUDE_CODE_ENTRYPOINT: "t3-code"unconditionally inapps/server/src/provider/Drivers/ClaudeHome.ts. The results are consistent with the regression described here and the entrypoint change in #28410.With the user's approval,
CLAUDE_CODE_ENTRYPOINT=sdk-tshas now been added to the T3 Claude provider's environment. The persisted configuration was verified; an end-to-end T3 turn after applying it has not yet been verified. No credentials or account identifiers are included in this comment.This adds a Console-login case relevant to #29408: that PR explicitly lists Console login credentials as outside the tested/fixed API-key environment path. Please consider covering that path too.
Prepared by GPT-6.1 Sol through the Codex harness in T3 Code, with the user's authorization.
thomasvan commentedon Nov 9, 2026
Same failure on the stable build, with a few data points this thread doesn't have yet.
T3 Code Desktop 0.1.7, macOS, Claude Code 2.1.319. One Console key; I don't know whether its organization holds only the included credits.
claude -pwith an empty config directory and a minimal environment, changing onlyCLAUDE_CODE_ENTRYPOINT:cli,sdk-cli,sdk-ts,sdk-pyt3-code,claude-desktop,mcp, an arbitrary stringCredit balance is too lowSo a label outside that accepted set fails the same way. This also misleads anyone testing from a shell that inherits a desktop app's
CLAUDE_CODE_ENTRYPOINT.Two override routes inside T3 Code:
CLAUDE_CODE_ENTRYPOINT=sdk-tsas an instance environment variable: fourclaudeAgentinstances each completed a turn withapiKeySource: ANTHROPIC_API_KEYwith no T3 restart after saving the rows.env.CLAUDE_CODE_ENTRYPOINTin the instance home'ssettings.json: also works, but only after a T3 restart.mergeClaudeProcessEnvironmentreads it when the driver is created, so a run right after editing the file still failed.A captured request under
t3-codeand undersdk-tsdiffers in theuser-agentlabel, thecc_entrypointfield of the billing line at the start of the system prompt, and one tool (Artifact, offered only undert3-code).+1 to the fix suggested above: keep
t3-codefor subscription logins and leave the Agent SDK default on instances that authenticate withANTHROPIC_API_KEY.miguelmg19877 commentedon Nov 9, 2026
Another way the
t3-codeentrypoint breaks: Claude through CLIProxyAPI rejects newer models. This is a different symptom from the credit-balance error, but the root cause is the same:t3-codeisn't an entrypoint that downstream services recognize.Setup: T3 Code Desktop (Nightly)
0.1.8-nightly.20261109.4429with its local server, on Windows 10 x64. Claude Code2.1.321(the nativeclaude.exeT3 launches). The user Claude settingsenvsetANTHROPIC_BASE_URLto a CLIProxyAPI instance and setANTHROPIC_AUTH_TOKEN(noANTHROPIC_API_KEY).Symptom: every turn on
claude-fable-5-2fails immediately with:API Error: 400 Claude Code 2.1.280 does not support this model; version 2.1.290 or newer is required.In the same session, the CLI's own
system/initreportsclaude_code_version: "2.1.321". Opus 5.5 works.Repro outside T3 (same binary, same proxy; only the entrypoint changes):
cli,sdk-ts,claude-vscodet3-code,my-random-appt3-codewith Opus 5.52.1.280 matches CLIProxyAPI's documented Claude baseline (see #13213). The proxy appears to treat an unrecognized entrypoint as a non-native client and rewrites the request to that baseline version. So with the
t3-codedefault, any model whose minimum version is above the proxy's baseline becomes unusable. I couldn't test without the proxy, because auth goes through it.Workaround (confirmed in T3 Code): add
"CLAUDE_CODE_ENTRYPOINT": "sdk-ts"to theenvblock of~/.claude/settings.json.mergeClaudeProcessEnvironmentuses that value in place of the default. After restarting T3, a new Fable 5.2 thread completed normally. On the proxy side, CLIProxyAPI v8.0.53+ has anative-entrypointsoption wheret3-codecan be added.#29408 only skips
t3-codewhenANTHROPIC_API_KEYis set, so it wouldn't fix this auth-token-plus-proxy setup. Defaulting back tosdk-ts, or otherwise using an entrypoint in Claude Code's accepted set, would fix both cases.Triage by Claude Opus 5.5 (claude-opus-5-5) in Claude Code via
t3 triage.sgmunn commentedon Nov 11, 2026
Additional triage on T3 Desktop 0.1.9, macOS arm64, Claude Code 2.1.322.
Existing and fresh T3 chats returned
billing_error, HTTP 400, “Credit balance is too low.” The CLI reportsauthMethod: api_key,apiKeySource: /login managed key, andforcedLoginMethod: console. User settings contain"forceLoginMethod": "console".Adding
CLAUDE_CODE_ENTRYPOINT=sdk-tsto the T3 Claude provider persisted successfully, but a minimal prompt still failed.Standalone Haiku 5.5 tests, with tools disabled and session persistence disabled, failed identically under both
sdk-tsandt3-code. Neither reported any token charge. No API-key, auth-token, base-URL, or config-directory environment overrides were set.Therefore this case does not reproduce an entrypoint-dependent failure. The ineffective workaround was removed. The user reports Claude Desktop still works, but its authentication method and the Console credit balance were not independently verified.
Prepared by Codex, GPT-6.
alipadron commentedon Nov 12, 2026
Adding an independent reproduction on stable 0.1.8 (Linux, Claude Code 2.1.322), same key, same config directory, same model (
claude-opus-5-5), changing only the label:CLAUDE_CODE_ENTRYPOINTcli,sdk-ts,sdk-pyfoo(arbitrary string)400 billing_error→Credit balance is too lowt3-code400 billing_error→Credit balance is too lowTwo things this narrows down:
t3-codespecifically: any label outside the set Anthropic accepts lands on that billing path.sk-ant-svc-…) on a Console organization whose balance is available — acurl /v1/messageswith that key returns a normal completion at the same moment — so the key type is not the differentiator.One counterpoint to the report above: on 0.1.8, setting
CLAUDE_CODE_ENTRYPOINT=sdk-tsas a provider instance environment variable does take effect. Instance variables are merged over the hardcoded value inmergeClaudeProcessEnvironment(mergeProviderInstanceEnvironmentwrites last), and I confirmed the spawned process carriessdk-tsin/proc/<pid>/environand the turn succeeds. Worth checking whether the affected instance also had a cached/logincredential, since that failure is reported withapiKeySource: /login managed keyinstead of anANTHROPIC_API_KEYoverride.That override is what keeps 0.1.8 usable in the meantime. I am not proposing a competing patch: #29406's approach of leaving the label unset when the process authenticates with an API key is the right shape for this case.