Skip to main content
Vibra Code tracks resource consumption differently depending on which AI agent is powering your sessions. The Cursor agent uses a fixed token (message) quota, while the Claude and Gemini agents consume credits that reflect real API costs. Both modes are tied to the same subscription plans — only the unit of measurement differs.

How token mode works

When the active agent is cursor, each message you send consumes one token from your monthly quota. This is the simplest billing model: you know exactly how many interactions you have left before your period resets.

Key fields in the Convex users table

FieldTypeDescription
messagesRemainingnumberMessages left in the current period
messagesUsednumberMessages consumed since last reset
lastMessageResetnumberUnix timestamp of the last quota reset
billingMode"tokens"Set automatically when agentType is cursor

Quota per plan

PlanMessages / month
Free5
Weekly Plus25
Pro100
Business300
Enterprise1,000

Reset cycle

Message quotas reset monthly. The lastMessageReset timestamp is updated each time a reset occurs. A new subscription payment (via RevenueCat webhook or Stripe webhook) also triggers a quota top-up, tracked by lastGrantedTransactionId to prevent double grants.

Running out of messages

When messagesRemaining reaches zero, new session creation is blocked until the quota resets at the start of the next billing period or you upgrade to a higher plan.

Cost tracking per session and message

Regardless of billing mode, Vibra Code records granular cost data for every session and every message in Convex.

Session-level tracking (sessions table)

FieldDescription
totalCostUSDCumulative API cost for the entire session
messageCountNumber of messages exchanged in the session
lastCostUpdateTimestamp of the most recent cost write

Message-level tracking (messages table)

FieldDescription
costUSDCost attributed to this specific message
inputTokensNumber of input tokens sent to the model
outputTokensNumber of output tokens received from the model
cacheReadTokensTokens served from the prompt cache (reduces cost)
cacheCreationTokensTokens written to the prompt cache
modelUsedModel identifier (e.g. claude-sonnet-4-20250514)
durationMsWall-clock time the model took to respond
These fields are populated by the run-agent Inngest function after each AI turn and are available in real time via Convex subscriptions.

Checking your balance

Your current message quota or credit balance is visible on the Profile tab in the mobile app. The profile screen reads messagesRemaining (token mode) or creditsUSD (credit mode) directly from your Convex user record and updates in real time as sessions run.

Build docs developers (and LLMs) love