Repository navigation
Conversation
…e limits get_usage reads the local Claude login, which a custom ANTHROPIC_BASE_URL may not route its requests through, so the instance showed another account's limits as valid. Publish unavailable limits for a custom endpoint instead. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…sage response The local usage shape did not match the SDK type, so the typed helper rejected every checkClaudeProviderStatus call in the file. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Thread details showed the local Claude login's usage for a Claude instance routed through a custom
ANTHROPIC_BASE_URL. The CLI'sget_usagereads that login, which a custom endpoint may not route its requests through, so the card showed another account's numbers as valid, and they never moved.For a custom endpoint, the instance now publishes unavailable limits with a message instead of the
get_usageresult, so the card reads Unavailable.Closes #39737
Evidence
Server tests.
apps/server:vp test run src/provider/ProviderRegistry.test.ts src/provider/claudeUsageLimits.test.tspasses, 104 tests, at 7a0b719. The new case, "does not report the local login's limits for a custom endpoint", fails onmainwithexpected undefined to equal 'unsupported'.Web, in the real app.
scripts/scenarios/claude-custom-endpoint-shows-unavailable-limits.e2e.ts, run withvp run scenarios:provein headless Chromium: it fails onmainand passes on this commit. The Claude instance points at a fake CLI that answersget_usagewith a login's limits. The same thread details card, on both sides:mainSession 0%(the local login's limits)Limits UnavailableNot shown: the before and after screenshots. They are not uploaded yet, so the table is the only record of the view here.
Checks. The repo's
check:changedpasses format, lint, both knip passes, graphql and the tests. Its typecheck step reports@t3tools/scripts#typecheckas failed because it "modified its inputs". Runningeffect-tsgo tsrs --noEmitinscriptsdirectly on the same tree exits 0 with no errors. Not shown: why the harness flags that package.Not in this change
--settingslaunch argument can overrideANTHROPIC_BASE_URLfor a turn. The probe reads the endpoint from the instance and settings environment only, as before, so that configuration keeps its existingcustomEndpointlabel.get_usageresponse, and its chat turn never completes. The card assertion depends on neither.Written by Claude Haiku 5.5 in Claude Code; reviewed by GPT 6.2 Sol in Codex.
🤖 Generated with Claude Code