Cursor Integration

Platform

Trace Cursor chats with one command. Paste an ingestion key, restart Cursor, and open Sessions.

Cursor does not export OpenTelemetry. Traccia registers Cursor hooks, buffers the turn locally, and uploads one trace per message. A chat is a session. Shell, MCP, and file tools are one span each, with input and output together.

One command

The installer asks for your ingestion key, saves it, and merges hooks. Other hooks stay in place.

One trace per message

The prompt, the reply, thinking, tools, and subagents sit on that turn.

Redaction on device

API keys and tokens are scrubbed before upload. A hook failure still lets Cursor continue.

API list price

Named models are priced from Traccia's rate table. Auto mode, an unnamed model, and unknown models stay Unpriced. Your Cursor plan quota is not visible here.

Install

Cursor and Claude Code both send traces to the Traccia platform. Neither one uses the Traccia SDK. Node.js 22.13 or later is required.

1Create an ingestion key

Sign in to app.traccia.ai. Open Settings, then API Keys, and create an ingestion key. Copy it.

2Install the hooks

terminal
bash
npx traccia-coding-harness install cursor

Paste the key when asked. The command saves it and does not print it. To skip the prompt, put the key on the same line:

terminal
bash
TRACCIA_API_KEY=tr_live_... npx traccia-coding-harness install cursor

Add --project to trace only the current repository.

3Quit Cursor and open it again

Cursor reads ~/.cursor/hooks.json when it starts. Closing a chat window is not enough.

4Send one message

Open any Cursor chat and send a message. In Traccia, open Sessions. That chat is the session. The message is the trace.

5Check the install

terminal
bash
npx traccia-coding-harness status

You want a key present, Cursor hooks registered, and a recent last upload. Status never prints the key.

Config file

The installer writes ~/.traccia/harness/config.json. Cursor reads this file. It does not read your terminal.

~/.traccia/harness/config.json
json
{
"enabled": true,
"api_key": "tr_live_..."
}

Anything you leave out uses these defaults. A .cursor/traccia.json in a repo overrides this file for that repo.

config.json
json
{
"enabled": true,
"api_key": "tr_live_...",
"endpoint": "https://api.traccia.ai/v2/traces",
"redact": true,
"log_prompts": true,
"log_tool_details": true,
"log_tool_content": true,
"attachments": true
}

What you see

  • The user prompt and the assistant reply are on the turn.
  • Shell, MCP, and other tools are one span, with input and output together.
  • A file span is added only when no tool span already covers that path.
  • Thinking and context compaction are nested on the turn.
  • A subagent span omits token counts. It does not show zero.
  • A failed tool stays on that span. The turn is an error only when the turn itself fails.

Cost

The badge Parent Turn Estimate is an API list price for that turn: uncached input, cache read, cache write, and output. Auto mode stays Unpricedbecause Cursor does not name the model. An unnamed model and a model with no catalog price stay Unpriced too. The coding agent plan can include the same calls until its quota is used. That quota stays on Cursor's usage page.

Without a team key, the badge stays Parent Turn Estimate. Save a team admin key as cursor_team_api_key to replace that estimate with Cursor Billed after Cursor publishes the turn. Publication often takes about an hour. Each usage event is applied once. A turn stays pending until that usage arrives, or for 6 hours.

Cursor CLI

The IDE sends the prompt, the reply, and token counts. The CLI does not. Those traces still include tool spans and are marked incomplete.

Privacy

Redaction is on. Set any of these to false in the config file to stop capturing that content:

  • log_prompts for prompts, replies, and thinking
  • log_tool_details for tool arguments and file paths
  • log_tool_content for tool results
  • attachments for files read from Cursor's local database
  • redact to turn secret redaction off

Logs go to ~/.traccia/harness/cursor.log. Spend Cap and Guardrails apply to SDK and Gateway calls, not to these sessions.

Uninstall

terminal
bash
npx traccia-coding-harness uninstall cursor

Quit Cursor and open it again after uninstall.

Next Steps

© 2026 Traccia.