GeezerVison is showing github.com — feat(usage): scan Cursor, Grok, and OpenCode alongside Claude and Codex by lawrence-millard · Pull Request #6057 · pingdotgg/t3code
Conversation
lawrence-millard
commented
Aug 10, 2026
•
edited by macroscopeapp
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What Changed
- Extend the Usage scan beyond Claude/Codex so every built-in provider contributes daily
(provider, model) buckets: Grok (~/.grok/logs/unified.jsonl), OpenCode (opencode*.db), and Cursor (usage-events CSV via local state.vscdb auth).
- Bump
USAGE_CONTRACT_VERSION to 4 and teach web + mobile usage chrome the new provider kinds.
- Add a Cursor/OpenUsage pricing supplement and CSV slug aliases so
auto, Composer, and other export names get API-equivalent costs instead of staying unpriced behind LiteLLM’s $0 OpenRouter auto stub.
Why
The Usage page only mirrored Claude/Codex local transcripts, so Cursor/Grok/OpenCode spend was invisible even when those CLIs were the ones doing the work. Cursor Auto and Composer also showed up as unpriced because public rate tables do not carry Cursor-native slugs. This keeps the existing scan → bucket → merge pipeline and fills the missing sources the same way OpenUsage does.
UI Changes
Before: Usage chart/legend only listed Claude Code and Codex.
After: the same page also shows Cursor, Grok, and OpenCode series (when those sources have data), including priced Cursor auto:

Validation
vp test run apps/server/src/usage/usageTranscripts.test.ts apps/server/src/usage/usageOpenCode.test.ts apps/server/src/usage/usageCursor.test.ts apps/server/src/usage/usagePricing.test.ts apps/server/src/usage/usageScanCache.test.ts packages/shared/src/usageMerge.test.ts apps/web/src/components/usage/UsageProviderChart.test.ts
- Targeted typecheck for contracts, shared, server, web, and mobile
Checklist
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- No animation or interaction changes require a video
Created with Composer in Cursor.
Made with Cursor
Note
Add Cursor, Grok, and OpenCode as usage sources alongside Claude and Codex
- Extends the usage pipeline to scan Cursor state DB, Grok
unified.jsonl, and OpenCode SQLite databases, fetching Cursor usage via authenticated CSV export from Cursor's API.
- Adds usageCursor.ts and usageOpenCode.ts for provider-specific parsing, and extends usageTranscripts.ts to parse Grok log lines.
- Adds pricing supplements, fast-variant multipliers, and slug alias rules in usagePricing.ts to resolve rates for Cursor and Grok model names not covered by public catalogs.
- Updates web and mobile UI provider registries with labels, colors, and icons for the three new providers.
- Risk: Cursor usage requires a live HTTP fetch to Cursor's export API using tokens read from the local state DB; network or auth failures are surfaced as per-source status messages rather than hard errors.
Macroscope summarized dcb8b54.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
AskPlays reacted with thumbs up emoji
The usage page only priced Claude/Codex local transcripts, so Cursor/Grok/OpenCode spend was invisible and Cursor Auto/Composer CSV slugs stayed unpriced. Extend the existing scan pipeline with those sources and a Cursor pricing supplement/alias map so daily buckets cover every built-in provider.
Co-authored-by: Cursor <[email protected]>
coderabbitai
Bot
commented
Aug 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: cd9eab12-0588-4d11-88d9-b8f056995938
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Needs human review
This PR adds significant new functionality: scanning usage from Cursor (via network API with OAuth), Grok (log file parsing), and OpenCode (SQLite database reading). The substantial new integrations, network calls, and data processing logic warrant human review.
You can customize Macroscope's approvability policy. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Effect service conventions review of the new usage providers.
One finding: the Cursor path performs outbound HTTP with the global fetch instead of the HttpClient service that UsageService already acquires from the environment, so that dependency is hidden from the Effect environment (no test layer, tracing, or interruption). Everything else in the diff (namespace imports of effect/* subpaths, Context.Service + make + layer shape, named imports for the pure usageOpenCode/usageTranscripts/usagePricing helpers, contract/scan-cache widening) matches the conventions.
Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Avoid caching failed Cursor fetches, treat timezone-less CSV dates as UTC,
fail closed on bad CSV schema or body transfer, fold OpenCode WAL into cache
identity, surface Grok/OpenCode read failures, and widen the Cursor API
window past UTC day bounds.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Drop the brittle Date, prefix check so quoted CSV headers parse, and keep
Cursor network I/O on HttpClient so the dependency stays in the Effect
environment.
Directory transcript scans no longer report ok when every file read fails,
and mixed OpenCode DB coverage uses partial instead of overstating failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9157eae. Configure here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Keep the 30s deadline around execute plus response.text so a stalled
export body cannot hang the usage summary the way AbortSignal.timeout did.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XXL
1,000+ changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|