# Cursor usage proof

Run each commit with `T3CODE_DEV_SEED=0 vp run dev` and an inherited CURSOR_API_KEY. Enable the cursor provider in the isolated userdata/settings.json: {"providerInstances":{"cursor":{"driver":"cursor","enabled":true}}}.

Create an empty synthetic Git repository. Add it with `node apps/server/src/bin.ts project add <workspace> --title "Cursor usage proof" --base-dir .t3`. Start the first real turn with `node apps/server/src/bin.ts thread start <workspace> "Reply with the single word: ok" --title "Cursor token usage" --provider cursor --model composer-2.5 --base-dir .t3 --wait --json`.

Browser driver: run from the checkout root with CAPTURE_DIR set to an output directory. It accepts JavaScript expressions on stdin; wrap await statements in `(async()=>{ ... })()`.

Pair through the app with a freshly minted token (`node apps/server/src/bin.ts pair --base-dir .t3`), filling the Pairing token field and pressing Continue. Open /<environmentId>/<encoded threadId> directly. Open thread details, right-click Open in Files, enable Context window. Hide Environment and worktree for privacy.

Record a new browser context with the paired storageState and the same 1440x1000 dark viewport. Open the thread and send a second identical prompt using:

```js
await page.getByRole('textbox').fill('Reply with the single word: ok');
await page.getByRole('button',{name:'Submit message',exact:true}).click();
```

Wait for the second ok and completed turn. Capture the details card: base lacks Context, head shows 14k / 200k. Collapse the sidebar for final stills to eliminate its animated banner; verify two screenshots 500ms apart are pixel-identical. The videos retain the sidebar and record the second send through completion.

Read-only runtime validation: select status and payload_json from orchestration_v2_projection_provider_turns in each isolated statev2.sqlite. Base has neither tokenUsage nor turnTokenUsage. Head has both.
