+36
![github-actions[bot]](/assets/img/avatar_default.png)








Julius Marminge
maria-rcks
Bilal Bakr
shivam
Vitalii Yehorov
Jake Leventhal
Claude Opus 5
Alex Southwell
github-actions[bot]
Nicholas Wasmiller
PB
Exotic
Yash Singh
Devin
Theo Browne
Gabriel De Andrade
Dara Adedeji
scratchyone
Dominic Roy
chukfinley
Primož Ajdišek
benthecarman
NaveDanan
aaditagrawal
Aditya Garud
Nick Anisimov
MacKinley Smith
Yordis Prieto
t3-code[bot]
AKolenda
Guillermo Casanova
Otavio Salvador
Shirish Pothi
Ishaan Kothari
Bob Fowler
Anton Bezdenezhnykh
ValeraZSD
Ephraim
Ryan Ilano
Alex
maco
Cursor
Tristan Knight
PR Batch Tester
oliver
kamkm
de34391427
Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Bilal Bakr <[email protected]> Co-authored-by: shivam <[email protected]> Co-authored-by: Vitalii Yehorov <[email protected]> Co-authored-by: Jake Leventhal <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Alex Southwell <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nicholas Wasmiller <[email protected]> Co-authored-by: PB <[email protected]> Co-authored-by: Exotic <[email protected]> Co-authored-by: Yash Singh <[email protected]> Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Theo Browne <[email protected]> Co-authored-by: Gabriel De Andrade <[email protected]> Co-authored-by: Dara Adedeji <[email protected]> Co-authored-by: scratchyone <[email protected]> Co-authored-by: Dominic Roy <[email protected]> Co-authored-by: chukfinley <[email protected]> Co-authored-by: Primož Ajdišek <[email protected]> Co-authored-by: benthecarman <[email protected]> Co-authored-by: NaveDanan <[email protected]> Co-authored-by: aaditagrawal <[email protected]> Co-authored-by: Aditya Garud <[email protected]> Co-authored-by: Nick Anisimov <[email protected]> Co-authored-by: MacKinley Smith <[email protected]> Co-authored-by: Yordis Prieto <[email protected]> Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: AKolenda <[email protected]> Co-authored-by: Guillermo Casanova <[email protected]> Co-authored-by: Otavio Salvador <[email protected]> Co-authored-by: Shirish Pothi <[email protected]> Co-authored-by: Ishaan Kothari <[email protected]> Co-authored-by: Bob Fowler <[email protected]> Co-authored-by: Anton Bezdenezhnykh <[email protected]> Co-authored-by: ValeraZSD <[email protected]> Co-authored-by: Ephraim <[email protected]> Co-authored-by: Ryan Ilano <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: maco <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Tristan Knight <[email protected]> Co-authored-by: PR Batch Tester <[email protected]> Co-authored-by: oliver <[email protected]> Co-authored-by: kamkm <[email protected]> Signed-off-by: Yordis Prieto <[email protected]>
83 lines
4.2 KiB
Markdown
83 lines
4.2 KiB
Markdown
# Cursor
|
|
|
|
Cursor V2 runs through the official [`@cursor/sdk`](https://cursor.com/docs/api/sdk/typescript)
|
|
TypeScript package. It does not use Cursor's ACP transport for V2 execution.
|
|
|
|
## Prerequisites
|
|
|
|
- Node.js 22.13 or newer. The repository's supported Node version satisfies this requirement.
|
|
- Sign in with Cursor in **Settings > Providers > Cursor**, or provide a Cursor API key in
|
|
`CURSOR_API_KEY`.
|
|
- A model accepted by the Cursor SDK. `auto` is sent to the SDK as its `default` model selection.
|
|
|
|
The adapter currently uses the SDK's local-agent runtime so runs operate in the selected T3 Code
|
|
workspace. Cursor cloud agents need repository and cloud-environment configuration that T3 Code does
|
|
not expose yet.
|
|
|
|
## Sign in
|
|
|
|
Choose **Sign in**, then open the sign-in page and complete it in your browser. T3 Code
|
|
updates automatically when sign-in finishes. This works when connected to a remote environment too.
|
|
On mobile, use **Settings > Provider accounts** for an already configured Cursor instance.
|
|
|
|
Each provider instance keeps its own login on the environment that runs it. Your Cursor editor and
|
|
CLI login are separate. A configured `CURSOR_API_KEY` overrides browser sign-in; remove that override
|
|
to use the browser flow.
|
|
|
|
Use **Change account** or **Sign out** in the same settings section. Both stop that
|
|
instance's running threads and keep their history. Sign-out forgets the saved credential; to revoke
|
|
the generated key before it expires, remove it from your Cursor dashboard's API keys.
|
|
|
|
## V2 Capability Mapping
|
|
|
|
The adapter supports:
|
|
|
|
- creating and resuming local Cursor agent threads;
|
|
- changing the model and model parameters between turns;
|
|
- assistant text, reasoning, tool activity, plans, and todo streaming;
|
|
- thread-scoped T3 Code MCP tools;
|
|
- image attachments;
|
|
- interruption, queued app messages, and orchestrator-owned interrupt/restart steering;
|
|
- provider conversation snapshots through `Agent.messages.list()`;
|
|
- Cursor `task` subagents, projected as read-only child app threads with their tool activity and
|
|
final result.
|
|
|
|
The public SDK does not currently expose native agent fork, conversation rollback, active steering,
|
|
or interactive approval callbacks. Direct active steering is advertised as unsupported, while V2
|
|
steering uses the orchestrator's interrupt-and-restart path and preserves the app run identity across
|
|
provider turns. Same-provider Cursor forks use the orchestrator's portable full-thread context
|
|
handoff into a fresh Cursor agent. The SDK has in-process custom callback tools, but the V2 adapter
|
|
intentionally uses the authenticated, thread-scoped MCP server instead.
|
|
|
|
Portable handoffs summarize eligible timeline items and can omit the end of long messages. Read
|
|
[Context in portable handoffs](./portable-handoffs.md) before using a fork for work whose exact
|
|
instructions must carry forward.
|
|
|
|
Cursor task events include an `agentId`, but the local SDK does not register that identifier as a
|
|
resumable agent: `Agent.resume()` returns `AgentNotFoundError`. The adapter therefore does not attach
|
|
a provider thread to native task projections or advertise subagent thread IDs. A projected child is
|
|
read-only: send messages from the parent thread.
|
|
|
|
Runtime modes map to the controls the local SDK exposes: full access disables its sandbox, while
|
|
restricted modes and explicit non-full-access sandbox policies enable it. Explicit approval policy
|
|
overrides also control Cursor Auto-review. Auto-review is not represented as an interactive T3 Code
|
|
approval flow.
|
|
|
|
The existing Cursor binary path and API endpoint settings belong to the CLI/ACP integration. Cursor
|
|
V2 execution does not launch that binary, and the SDK does not expose an API endpoint override.
|
|
|
|
## Replay And Live Testing
|
|
|
|
Cursor replay fixtures preserve the SDK boundary: agent open/resume, sends, ordered `onDelta`
|
|
updates, terminal results, cancellation, message snapshots, and close. The real V2 adapter,
|
|
orchestrator, event store, projections, and checkpoint logic still run in tests.
|
|
|
|
Record a fixture against the real SDK with:
|
|
|
|
```bash
|
|
pnpm --filter t3 record:cursor-replay --scenario simple
|
|
```
|
|
|
|
Use `--out <path>` to record a temporary probe without replacing a checked-in fixture. Supported
|
|
scenarios are listed by the recorder when an invalid scenario is supplied.
|