ATC-96 Report the session's usage to the tmux strip #90

Merged
merge-queue merged 4 commits from ATC-96-strip-usage into main 2026-11-14 21:15:02 -08:00
Owner

At each turn's end the host asks its claude for get_context_usage and get_usage and runs tmux-strip usage with the context, window, compactions, cost, the claude process and, on the subscription, the account's rate limits. The replies go back to the asking code inside internal/claude and never reach a window, so host.Protocol is unchanged; a tmux-strip that fails is logged once per message. Work package: https://openproject.home.romaine.life/wp/ATC-96

At each turn's end the host asks its claude for get_context_usage and get_usage and runs `tmux-strip usage` with the context, window, compactions, cost, the claude process and, on the subscription, the account's rate limits. The replies go back to the asking code inside internal/claude and never reach a window, so host.Protocol is unchanged; a tmux-strip that fails is logged once per message. Work package: https://openproject.home.romaine.life/wp/ATC-96
When a turn's result line arrives, the host asks claude for get_context_usage
and get_usage, adds the compactions it counted (live compact_boundary lines and
a resumed session's saved ones), and runs `tmux-strip usage --session <id>
--agent claude` with the report as JSON on stdin. One report runs at a time and
a newer turn's end replaces one still waiting; a failing tmux-strip is logged
once per message and never shown. The replies to these requests go back to
their caller inside internal/claude and never reach Lines, the host's events or
a window, so the protocol is unchanged.

https://openproject.home.romaine.life/wp/ATC-96
Name the claude process in each usage report (ATC-96)
Some checks failed
CI / changes (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / home-sync (pull_request) Has been cancelled
79ca3e4315
Claude counts cost from its process's start, so strip-owner adds a resumed
session's processes together by this name.

https://openproject.home.romaine.life/wp/ATC-96
Merge branch 'main' into ATC-96-strip-usage
Some checks failed
CI / changes (pull_request) Successful in 8s
CI / build (pull_request) Failing after 1m6s
CI / home-sync (pull_request) Failing after 0s
merge-queue CI failed: CI / build (pull_request), CI / home-sync (pull_request)
701423db86
Collaborator

merge-queue stopped this at 701423d: CI failed: CI / build (pull_request), CI / home-sync (pull_request). Push a fix, or once it is fixed outside this pull request, remove and re-add the queue label.

merge-queue stopped this at 701423d: CI failed: CI / build (pull_request), CI / home-sync (pull_request). Push a fix, or once it is fixed outside this pull request, remove and re-add the `queue` label.
gofmt the usage report's fields (ATC-96)
All checks were successful
CI / changes (pull_request) Successful in 5s
CI / build (pull_request) Successful in 2m44s
CI / pcs (pull_request) Has been skipped
CI / prune-releases (pull_request) Has been skipped
CI / home-sync (pull_request) Successful in 0s
merge-queue landed on main
476f0e9ed9
merge-queue deleted branch ATC-96-strip-usage 2026-11-14 21:15:02 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/at-claude!90
No description provided.