Skip to content

feat(tab): AI agent usage meter in the tab bar - #38

Merged
Atreus-X merged 5 commits into
mainfrom
feat/agent-usage-widget
Sep 30, 2026
Merged

Atreus-X merged 5 commits into
mainfrom
feat/agent-usage-widget

Conversation

@Atreus-X

Copy link
Copy Markdown
Owner

Adds a compact usage meter to the tab bar (right side, before the update banner). Click opens a popover with today / last-7-days token breakdowns and the settings.

  • Agent: Claude Code or Codex (agentusage:agent)
  • Where it runs: this machine or any wsh/SSH connection (agentusage:conn); remote scans go through a new RemoteAgentUsageCommand in wshremote, so the remote needs wsh
  • Limits: agentusage:dailylimit / agentusage:weeklylimit (tokens, accepts 5M / 500K in the popover). The plan's real limits are not in the local logs, so these are user-set budgets. With no limit the meter shows raw tokens
  • Counts input + output + cache-write tokens; cache reads are shown but excluded from the total. Claude streamed duplicates are de-duplicated by message id
  • Backend: pkg/agentusage (Go test covers the Claude path); task generate run

Not run in the app. The Codex log parsing follows the rollout token_count event format from memory and is untested against real Codex logs. Remote path is untested.

🤖 Generated with Claude Code

Atreus-X and others added 5 commits September 29, 2026 12:13
…local or over wsh)

Scans the agent's local session logs for today / last-7-days token totals and
shows a compact meter with a click-open popover. Agent, connection and budgets
are settings (agentusage:*). Remote hosts are scanned via a wshremote RPC.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s own limit and reset countdown

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… (resets 1d23h)'

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6
…visible

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6
@Atreus-X
Atreus-X merged commit 555246f into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant