Repository navigation
Use agy CLI for Antigravity usage limits to include weekly quotas - #20916
Merged
Merged
Conversation
Contributor
[Medium impact] The PR appears safe to merge; the previous fallback issue is fixed. SummaryThe PR reads Antigravity quotas through
Reviews (2) · Last reviewed commit: "Let omp usage run before reporting an ag..." · Reviewed by Greptile |
This was referenced Nov 30, 2026
Closed
lukehsiao
added a commit
to lukehsiao/dotfiles
that referenced
this pull request
Nov 30, 2026
Antigravity was disabled in the agents panel because Omarchy 4.5.0-3
extracts OAuth tokens and polls Google's private Cloud Code API
directly. Upstream Omarchy fixed this in PR #20916 (commit 9525d8199f)
by delegating to `agy -p /usage --output-format json --log-file /dev/null`,
letting the official CLI handle auth, refresh, and Google's API itself.
This change re-adds the cloned `lukehsiao.agents` plugin with upstream's
`omarchy-agent-usage-agy` verbatim and a `usage-update` wrapper that
keeps all other agents on the packaged updater. To make switching back
automatic once upstream releases the fix, a `post-update.d` hook probes
`/usr/bin/omarchy-agent-usage-agy` for `def agy_usage` and `"/usage"`,
flips back to stock `omarchy.agents` via `restoreCloneSource`, and
prints a cleanup reminder while leaving files intact for chezmoi.
`run_onchange_after_configure-agents-plugin.sh.tmpl` shares that probe,
switches to the clone before enabling `providers.agy`, and triggers an
immediate IPC refresh. This snapshots the 4.5.0-3 QML files until the
next Omarchy release ships PR #20916.
Tested:
Rendered `run_onchange_after_configure-agents-plugin.sh.tmpl` across
`omarchy`, `macos`, and `ubuntu`, checked all scripts with
`shellcheck -s bash` and `bash -n`, ran isolated unit tests for the
collector, `usage-update` wrapper, `reconcile-agents-plugin` hook, and
activation script, and applied live with `chezmoi apply`:
MACOS_BYTES=0 UBUNTU_BYTES=0
TEST_COLLECTOR_PR20916=PASS
TEST_USAGE_UPDATE_WRAPPER=PASS
TEST_RECONCILE_AND_CONFIGURE=PASS
omarchy-plugin-list -> lukehsiao.agents (enabled: true)
usage-update --force agy -> Session 16.0%, Weekly 88.6%
omarchy-shell omarchy.agents refresh -> ok
Ref: omacom/omarchy#20916
Assisted-by: LLM shellcheck
cursor Bot
pushed a commit
to mark-groves/omarchy
that referenced
this pull request
Nov 30, 2026
…acom#20916) * Use agy CLI for Antigravity usage limits to include weekly quotas * Let omp usage run before reporting an agy CLI failure
meeksoft
added a commit
to meeksoft/omarchy-agent-usage-extensions
that referenced
this pull request
Dec 1, 2026
Omarchy fixed the collector upstream (omacom/omarchy#20916, reading agy's own /usage), after 4.5.0-3. Passing --except agy unconditionally would hide that fix after an update, so the updater now overrides agy only while the installed stock collector still sends the bare "antigravity" User-Agent. Also prefer the Gemini Models group over another Gemini-named one, such as a Gemini 4 Argon allowance Google may list first, which would otherwise take over the Session and Weekly meters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lbssousa
added a commit
to lbssousa/agents-omarchy
that referenced
this pull request
Dec 1, 2026
Agent.qml, Main.qml and collectors.py are omarchy 4.6.0-rc2's (shell/plugins/agents) verbatim. Panel.qml and README.md take the rc1..rc2 changes with this clone's pace marker kept as it was: the deliberate delta against rc2 is the same as it was against rc1. rc2's Antigravity collector (omacom/omarchy#20916) reads the limits from `agy -p /usage --output-format json`, which lists the Gemini group's weekly bucket even for accounts Google routes through AICode (checked with agy 1.5.20 on such an account). So gemini-weekly.py and the merge of its file into the agy record go: the panel shows the weekly limit straight from agy.json. Without the agy CLI (an omp, pi or opencode sign-in alone) the collector still asks Cloud Code, which leaves that bucket out for those accounts. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Google's
v1internal:retrieveUserQuotaSummaryomits the Gemini group (including its 7-day weekly bucket) for direct HTTP calls with a bareantigravityUser-Agent, leaving Ultra accounts on theretrieveUserQuota5-hour-only fallback.Instead of spoofing internal
User-Agent/ changelist headers against Google's private API, delegate toagy's own headless command when theagyCLI is installed and signed in:This lets the official
agybinary handle auth, token refresh, and Google's API directly while surfacing Gemini's 5-hour session, 7-day weekly, and touched Claude/GPT weekly windows in the agents panel — with zero direct private-API calls usingagy's OAuth token.Also drops epoch-0 (
1970-01-01T00:00:00Z) reset timestamps emitted for untouched buckets and keeps the existing Cloud Code HTTP path foromp/pi/opencodesign-ins or machines withoutagy.