GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@lawrence-millard lawrence-millard commented Aug 10, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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:

Usage page after: OpenCode, Cursor, Codex, Claude Code with priced 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
All reactions
  • 👍 1 reaction
faint-dev and others added 2 commits August 10, 2026 21:50
@faint-dev @cursoragent
feat(usage): scan Cursor, Grok, and OpenCode alongside Claude and Codex
dce4e0d
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]>
@faint-dev @cursoragent
docs(usage): add Usage page after screenshot for PR
816470e
Co-authored-by: Cursor <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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:

  • 🔍 Trigger review

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Aug 10, 2026
macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 10, 2026
View reviewed changes
Comment thread apps/server/src/usage/UsageService.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/server/src/usage/usageCursor.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/server/src/usage/usageCursor.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/server/src/usage/usageOpenCode.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/server/src/usage/usageCursor.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/server/src/usage/UsageService.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 10, 2026
View reviewed changes
Comment thread apps/server/src/usage/UsageService.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/server/src/usage/UsageService.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/server/src/usage/usageCursor.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@macroscopeapp

macroscopeapp Bot commented Aug 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 10, 2026
View reviewed changes

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread apps/server/src/usage/usageCursor.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@faint-dev
fix(usage): address Cursor/OpenCode/Grok review findings
840f31a
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.
macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 10, 2026
View reviewed changes
Comment thread apps/server/src/usage/usageCursor.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 10, 2026
View reviewed changes
Comment thread apps/server/src/usage/UsageService.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/server/src/usage/UsageService.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

faint-dev added 2 commits August 10, 2026 22:09
@faint-dev
fix(usage): route Cursor HTTP through Effect HttpClient
36c316d
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.
@faint-dev
fix(usage): surface Claude/Codex read failures and OpenCode partial
9157eae
Directory transcript scans no longer report ok when every file read fails,
and mixed OpenCode DB coverage uses partial instead of overstating failed.
cursor[bot]
cursor Bot reviewed Aug 10, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Fix All in Cursor

❌ 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.

All reactions
Comment thread apps/server/src/usage/usageCursor.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

faint-dev added 2 commits August 10, 2026 22:18
@faint-dev
fix(usage): apply Cursor CSV timeout to headers and body
1b5811a
Keep the 30s deadline around execute plus response.text so a stalled
export body cannot hang the usage summary the way AbortSignal.timeout did.
@faint-dev
merge main into feat/usage-all-providers
dcb8b54
@1xpixi 1xpixi mentioned this pull request Aug 20, 2026
fix(grok): skills, reasoning, plan mode, usage, and stalled turns #7638
Closed
4 tasks done
@lawrence-millard lawrence-millard closed this by deleting the head repository Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

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.

Projects

None yet

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.

2 participants

@lawrence-millard @faint-dev
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.