Repository navigation
feat: usage compares local and sandbox chats week by week - #46
Merged
Merged
Conversation
The host counts its chats by week over the last eight weeks: chats with a started turn and turns started, split by whether they ran on this computer or through the sandbox bridge. A sandbox chat's mirror and its sandbox thread share an id, so each chat counts once. Served by server.getUsageSandboxShare under diagnostics:read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A "Local vs sandboxes" section on the Usage page reads the host's weekly split: this week's share of turns on sandboxes, the change from last week, each side's chats and turns, and eight weekly columns. It shows only when the sandbox host is selected and has had a sandbox chat in those weeks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mobile Usage tab shows the same weekly split as the web page, for each selected environment that has had a sandbox chat in the last eight weeks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
OmarAlex24
marked this pull request as ready for review
November 13, 2026 13:41
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 fork owner is moving work from local chats to Boat and Celesto sandboxes bit by bit and had no way to see how far along that migration is.
Change
A "Local vs sandboxes" section on the Usage page (web and mobile) shows this week's share of turns that ran on sandboxes, the change from last week, chats and turns per side, and the share for each of the last 8 weeks.
UsageSandboxShareaggregates from the host's run and thread projections plus its sandbox records. A turn is a run that started; it is Sandbox when it ran through thesandboxesbridge. A sandbox chat's host mirror and its own thread share an id, so a chat counts once; subagents and side chats count with their parent. Weeks start on Monday in the client's time zone.server.getUsageSandboxShare({ timeZone })returns 8 weeks of counts (about 0.8 KB), with thediagnostics:readscope thatserver.getUsageSummaryuses. The query took about 4 ms on a copy of real data.docs/user/usage.md.Tokens and cost per side are not included: usage tokens come from provider history files with no thread attached, and a sandbox's tokens live on the sandbox.
Scope and approval
Requested by the fork owner in a T3 Code session. Part of stack pingdotgg#43 on
feat/sandbox-environments.Verification
vp run check:changedagainst fix(sandbox): Celesto maps every status and warns before dropping a stopped disk #45's branch passes format, lint, knip, typecheck (42 packages), tests and react compilerThe numbers above are fixture data. Not yet checked on a phone.
Model and harness: Claude Opus 5.5 (implementation subagent at high effort, coordinated by Claude Opus 5.5) in Claude Code, running in T3 Code.
🤖 Generated with Claude Code