- Token mode (Cursor)
- Credit mode (Claude / Gemini)
How token mode works
When the active agent iscursor, 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
| Field | Type | Description |
|---|---|---|
messagesRemaining | number | Messages left in the current period |
messagesUsed | number | Messages consumed since last reset |
lastMessageReset | number | Unix timestamp of the last quota reset |
billingMode | "tokens" | Set automatically when agentType is cursor |
Quota per plan
| Plan | Messages / month |
|---|---|
| Free | 5 |
| Weekly Plus | 25 |
| Pro | 100 |
| Business | 300 |
| Enterprise | 1,000 |
Reset cycle
Message quotas reset monthly. ThelastMessageReset 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
WhenmessagesRemaining 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)
| Field | Description |
|---|---|
totalCostUSD | Cumulative API cost for the entire session |
messageCount | Number of messages exchanged in the session |
lastCostUpdate | Timestamp of the most recent cost write |
Message-level tracking (messages table)
| Field | Description |
|---|---|
costUSD | Cost attributed to this specific message |
inputTokens | Number of input tokens sent to the model |
outputTokens | Number of output tokens received from the model |
cacheReadTokens | Tokens served from the prompt cache (reduces cost) |
cacheCreationTokens | Tokens written to the prompt cache |
modelUsed | Model identifier (e.g. claude-sonnet-4-20250514) |
durationMs | Wall-clock time the model took to respond |
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 readsmessagesRemaining (token mode) or creditsUSD (credit mode) directly from your Convex user record and updates in real time as sessions run.