Skip to content

Add Cursor usage collector to the agents panel - #7087

Closed
AndrijaSkontra wants to merge 1 commit into
omacom:quattrofrom
AndrijaSkontra:feat/agent-usage-cursor
Closed

AndrijaSkontra wants to merge 1 commit into
omacom:quattrofrom
AndrijaSkontra:feat/agent-usage-cursor

Conversation

@AndrijaSkontra

Copy link
Copy Markdown

Summary

  • Add omarchy-agent-usage-cursor, which reads Cursor IDE state.vscdb or Agent CLI ~/.config/cursor/auth.json, then maps plan pools from GetCurrentPeriodUsage and fills day/model charts from GetFilteredUsageEvents / GetAggregatedUsageEvents (tier from GetPlanInfo)
  • Preserve day/model stats across panel --limits-only refreshes so opening the popup does not wipe the charts
  • Add Cursor marks, default-enable the provider, and hoist a shared LIMITS reset when every meter shares one resetsAt

Related: 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.sh
  • bash test/shell.d/agent-usage-update-test.sh
  • Live: omarchy-agent-usage-cursor --force | jq . shows limits + recentDays + modelUsage + tier
  • Live: agents panel Cursor tab shows meters, tokens by day, and tokens by model
  • Live: open panel (limits-only refresh) keeps day/model charts instead of clearing them
  • Manual: signed-out / missing Cursor stays self-hidden

Made with Cursor

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>
Copilot AI balanced review requested due to automatic review settings August 16, 2026 07:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-cursor collector 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 },
@dhh

dhh commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thanks! Cursor is coming in through #14040 (from #12582), and your read-only state.vscdb sign-in lookup is part of it, credited there, so Cursor IDE-only users are covered. Closing in favor of that.

@dhh dhh closed this Oct 2, 2026
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.

4 participants