Skip to content

Publish agent usage snapshots from headless machines - #9525

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

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.

@dhh

dhh commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thank you! Brought in with your authorship in #14049. Adapted: the command is omarchy-agent-snapshot, since a name matching omarchy-agent-usage-* would be run by the updater as a collector and call it back in a loop.

@dhh dhh closed this Oct 2, 2026
@dhh

dhh commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Update: this was pulled back out of #14049. Syncing usage between machines turned out to be more machinery than it's worth for Omarchy, so we're not taking it after all. Thanks for the work regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

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)

3 participants