Skip to content

Grok Bot: sessions, estimated spend and the weekly allowance on all three surfaces - #1462

Merged
iamtoruk merged 14 commits into
mainfrom
feat/provider-grokbot
Sep 16, 2026
Merged

iamtoruk merged 14 commits into
mainfrom
feat/provider-grokbot

Conversation

@iamtoruk

@iamtoruk iamtoruk commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Adds xAI's Grok Bot desktop app (the Electron agent app built on Cursor's sand platform, mapped against 0.30.0) as a provider.

Sessions

  • Reads the per-bot transcript files under the app's support folder. One session per bot, named after it, so Night Shift, Reddit Bot and the rest appear as projects. Routine runs and bot-to-bot messages are not counted as human turns.
  • No token, cost or model data exists on disk, and every tracker that went as far as decrypting the app confirms inference runs on xAI's cloud VM and never reports usage to the client. Usage is therefore estimated from message length and every cost is marked estimated. The doc says so plainly.
  • Reconciled exactly against the raw files on the author's machine, including the direction fix from review (a bot's outbound text to another bot is output, not input).

Weekly allowance

  • The "Weekly usage" number from the app's account menu comes from Cursor's dashboard. The reader uses the Cursor IDE login token the Cursor reader already reads, so nothing of Grok Bot's own encrypted store is touched. Same call CodexBar and other trackers make.
  • One window, on the CLI (codeburn quota), the desktop Plans screen, and the menubar provider catalog and Capacity Dock. All three decode the same live response to the same number.
  • No row anywhere unless the app is installed. Pooled or zero-allowance accounts get the real sentence, not a sign-in prompt.

Verification

  • Two independent review rounds on real data; findings fixed and re-verified.
  • CLI 4,147 tests, locks 36, desktop 997 plus the 29 known jsdom failures, menubar 681 with the localization coverage suite. Typecheck and builds clean on all three.
  • 13 commits, each building and testing on its own.

UI change: menubar Settings gains a Grok Bot row (installed only); Plans gains the weekly row. Screenshot of Plans:

plans

The app records no model id, only opaque sand-* aliases it never writes down,
so grokbot-auto is a synthetic id aliased to xAI's current flagship rate.
Every call that uses it is marked costIsEstimated.
Reads the transcript mirror the app keeps in its Electron userData directory
as base32-named JSON slices, one session per bot, named from the roster slice.
One call per requestId; a run the bot woke itself for carries no user message.
The mirror has no tokens, no cost and no model id, so usage is estimated from
message text.
It is its own product with its own store, now read by the grokbot provider.
…tput

A `message` entry's direction is its `role`, not its kind. Role assistant is
the bot's own text leaving for another bot (`toAgent`); counting it as input
billed 48% of this corpus's input at the wrong rate and in the wrong bucket.
It reports cursor.com's monthly window, not the weekly Sand allowance, and the
accounts cannot be shown to be the same.
The app's own "Weekly usage" reading is GetSandUsageStatus on Cursor's
DashboardService. Authorise it with the Cursor IDE's unencrypted access token,
which src/quota/cursor.ts already reads read-only, instead of decrypting Grok
Bot's safeStorage copy of the same session. Only correct when the IDE is signed
into the account Grok Bot uses; signed out reports the same not-signed-in state
the Cursor reader does.
@iamtoruk
iamtoruk merged commit 3684f1d into main Sep 16, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant