Repository navigation
Add Cursor usage collector to the agents panel - #7087
Closed
AndrijaSkontra wants to merge 1 commit into
Closed
AndrijaSkontra wants to merge 1 commit into
AndrijaSkontra wants to merge 1 commit into
Conversation
Ship omarchy-agent-usage-cursor so Cursor shows up alongside Claude and Codex with plan meters, day/model token charts, and CLI or IDE auth. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds first-class Cursor support to the Agents bar widget by introducing a Cursor usage collector, UI tweaks for Cursor’s shared reset window, and documentation/assets to surface the new provider.
Changes:
- Add a new
omarchy-agent-usage-cursorcollector that reads local credentials and fetches Cursor dashboards for limits and usage history. - Update the Agents panel UI to optionally hoist a shared “Resets in …” countdown into the LIMITS header and hide day/model charts for meters-only agents.
- Register Cursor as a provider, add Cursor icons, update plugin docs, and add a shell-based test suite for the collector.
Reviewed changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/shell.d/agent-usage-cursor-scanner-test.sh | Adds end-to-end-ish shell tests for Cursor collector behaviors (missing DB, missing token, helpers, mocked API). |
| shell/plugins/agents/manifest.json | Registers Cursor provider (enabled by default) and updates plugin description. |
| shell/plugins/agents/assets/cursor.svg | Adds dark-surface Cursor icon. |
| shell/plugins/agents/assets/cursor-light.svg | Adds light-surface Cursor icon variant. |
| shell/plugins/agents/README.md | Documents Cursor provider data sources, behavior, and config overrides. |
| shell/plugins/agents/Panel.qml | Adds shared reset detection + header countdown and gates charts on hasLocalStats. |
| bin/omarchy-agent-usage-cursor | New Python collector that emits Cursor usage/limits JSON in the plugin’s record contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+182
to
+186
| if (windows.length === 1) return String(windows[0].resetAt || "") !== "" | ||
| var shared = String(windows[0].resetAt || "") | ||
| if (shared === "") return false | ||
| for (var i = 1; i < windows.length; i++) { | ||
| if (String(windows[i].resetAt || "") !== shared) return false |
| "providers": { | ||
| "claude": { "enabled": true }, | ||
| "codex": { "enabled": true }, | ||
| "cursor": { "enabled": true }, |
4 of 9 tasks
This was referenced Sep 21, 2026
Contributor
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.
Summary
omarchy-agent-usage-cursor, which reads Cursor IDEstate.vscdbor Agent CLI~/.config/cursor/auth.json, then maps plan pools fromGetCurrentPeriodUsageand fills day/model charts fromGetFilteredUsageEvents/GetAggregatedUsageEvents(tier fromGetPlanInfo)--limits-onlyrefreshes so opening the popup does not wipe the chartsresetsAtRelated: supersedes the approach in #6604 with CLI auth support and token day/model history from Cursor’s dashboard APIs.
Test plan
bash test/shell.d/agent-usage-cursor-scanner-test.shbash test/shell.d/agent-usage-update-test.shomarchy-agent-usage-cursor --force | jq .shows limits + recentDays + modelUsage + tierMade with Cursor