Skip to content

Publish agent usage snapshots from headless machines - #9525

Open
qybaihe wants to merge 1 commit into
omacom:quattrofrom
qybaihe:feat/headless-agent-usage-snapshot-6441
Open

Publish agent usage snapshots from headless machines#9525
qybaihe wants to merge 1 commit into
omacom:quattrofrom
qybaihe:feat/headless-agent-usage-snapshot-6441

Conversation

@qybaihe

@qybaihe qybaihe commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • add omarchy agent usage-snapshot for machines without Quickshell
  • refresh the existing agent collectors, then emit the same schema consumed by synced aggregation
  • select only aggregate usage metrics so limits, authentication state, balances, and collector errors stay local
  • support stdout, atomic --output publishing, stable --device-id values, agent selection, and --except filters
  • document timer/cron usage for Syncthing, rsync, and other synced folders

The original issue predates the generic agent collector architecture. Building the snapshot from current usage records makes this work for Claude, Codex, Fireworks, and future collectors instead of coupling it to the old Claude-only scanner.

Fixes #6441

Testing

  • test/shell.d/agent-usage-snapshot-test.sh (macOS Bash 5 and ARM Linux VM)
  • ./test/cli (ARM Linux VM)
  • python3 -m py_compile bin/omarchy-agent-usage-snapshot
  • bash -n test/shell.d/agent-usage-snapshot-test.sh
  • git diff --check

The focused test covers malformed records, privacy-field exclusion, provider filtering and flag forwarding, atomic file publication, and preserving the previous snapshot when refresh fails.

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.

model-usage: let headless machines publish usage snapshots (Omaterm runs claude-code, but can't report to the bar)

1 participant