> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asymptotelabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Asymptote support details for Cursor endpoint telemetry

## Runtime overview

Asymptote supports Cursor through native hook payloads sent to `beacon-hooks`, with local session-store sync for historical backfill.
For provider-managed Cursor cloud sessions, see
[Cursor Cloud Agents](/runtimes/cursor-cloud-agents).

## Prerequisites

Before enabling Cursor hooks, make sure:

* Cursor is installed for the user or the `~/.cursor` directory exists.
* `beacon endpoint install` has run so shared endpoint config and runtime log paths exist.
* Asymptote hooks are installed automatically when default runtime discovery selects Cursor, or explicitly with `beacon endpoint hooks install --harness cursor`.
* For project-level collection, install hooks from the target project with `--level project`.
* Cursor is restarted after hook install or removal so new sessions load the updated hook configuration.

## Collection path

Cursor invokes Asymptote's hook adapter from Cursor hook configuration. The adapter writes normalized endpoint events to the configured runtime JSONL log.

Asymptote can also read Cursor's committed local session stores:

```bash title="Sync Cursor local sessions" theme={null}
beacon endpoint cursor status
beacon endpoint cursor sync
```

The sync path reads Cursor Composer conversations from the global VS Code storage database and agent transcripts under `~/.cursor/projects`. It is local and offline, emits events with `harness.collection_method=poll`, and is useful for historical sessions or sessions that ran before Beacon hooks were installed. Use `--print` to inspect mapped events without writing the runtime log or advancing the cursor.

## Discovery and status

Asymptote detects Cursor through the Cursor binary or `~/.cursor`, then checks Asymptote hook configuration.

Use `beacon endpoint hooks status --harness cursor` to inspect Cursor hook status. Use `beacon endpoint cursor status` to inspect local session stores and how much Beacon has synced.

## Install or configuration support

`beacon endpoint install` prepares shared endpoint config and runtime log paths and installs Cursor hooks when automatic discovery selects Cursor or when `--harness cursor` is passed. Install or refresh hooks separately when you want to manage them without changing the collector:

```bash title="Install runtime hooks" theme={null}
beacon endpoint hooks install --harness cursor
```

For project-level hooks, run:

```bash title="Install project-level hooks" theme={null}
beacon endpoint hooks install --harness cursor --level project
```

## Telemetry coverage

| Area | Support | |
| - | - | - |
| Prompt telemetry | Supported for local and cloud Cursor through `beforeSubmitPrompt` hooks. Cursor Cloud requires the project hook to be committed before the run starts and uploads observed prompts immediately; the initial launch prompt can precede hook activation during bootstrap. See [Cursor's Cloud Agent hook support matrix](https://cursor.com/docs/hooks#cloud-agent-support). | |
| Turn identity | Supported where Cursor supplies `generation_id`; Beacon maps it to `prompt.id` so hook events, session-store events, and admin usage can be correlated when Cursor emits the same identifier | |
| Command, tool, and file telemetry | Supported for tool, shell command, MCP-like, approval, and file edit payloads where Cursor exposes them; Cursor Cloud support is limited to Cursor's [cloud-supported command hooks](https://cursor.com/docs/hooks#cloud-agent-support). | |
| Agent reasoning telemetry | Supported for local Cursor through `afterAgentThought` hooks. Each completed thinking block is recorded as an `agent.reasoning` event carrying the reasoning text in the OpenTelemetry GenAI output-messages shape (`gen_ai.output.messages` with a `reasoning` part), plus a `content` marker with the original text's hash and byte count. Reasoning is only available for models/modes where Cursor exposes visible thinking text. | |
| Repository and branch context | Events include the workspace path as `repository`, and `branch` is resolved from the workspace's local git checkout (`.git/HEAD`) when Cursor does not supply one; disable local git resolution with `BEACON_DISABLE_GIT_METADATA=1`. | |
| Token usage and cost | Hooks do not carry token count or cost. Administrative usage can be imported separately with \`beacon endpoint cursor usage sync | status\` when Cursor Admin API access is available; that source is idempotent and distinct from local hook telemetry. |
| Context occupancy | Supported through `preCompact`, which reports `context_tokens` and `context_window_size`. Recorded as `gen_ai.context` (`used_tokens`, `limit_tokens`) and used by the token-usage utilization view. This is a level, not spend: it is never summed into a total, and Cursor still reports as `not_instrumented` in `beacon token-usage --coverage` because it has not said what a turn cost. The sibling `context_usage_percent` is derivable from the pair and stays in the retained payload. | |
| Historical session sync | Supported through `beacon endpoint cursor sync`; marked as poll collection | |
| Local JSONL and dashboard | Supported | |
| MDM deployment | Supported for the endpoint agent. Cursor hooks are installed separately in the logged-in user's context | |

## Session-store sync

`beacon endpoint cursor sync` reads Cursor records after Cursor has committed them. It can recover committed prompts, assistant text, tool and command activity, file activity where the stored record names a path, and session metadata present in Cursor's local stores. It cannot hold or deny tool calls, and it does not imply that Beacon observed the event at runtime.

Run `beacon endpoint cursor sync --watch`, or schedule one-shot sweeps, if you want the poll path to stay current.

## Deployment notes

Restart Cursor after installing or removing hooks so the updated hook configuration is picked up by new sessions.

Hook events include metadata such as file path, operation, language, diff hash, and diff byte count. Raw diffs and reasoning text are subject to Asymptote's redaction, sanitization, truncation, and event-size limits before writing.

Install, repair, and uninstall preserve unknown fields in Cursor's `hooks.json`, so settings Beacon does not model are kept when Beacon rewrites its own hook block.

## Related

<Columns cols={2}>
  <Card title="Supported agent harnesses" icon="list-check" href="/runtimes">
    Return to the runtime support overview.
  </Card>

  <Card title="Hooks" icon="plug" href="/cli/hooks">
    Install, inspect, and uninstall runtime hook integrations.
  </Card>

  <Card title="Cursor Cloud Agents" icon="cloud" href="/runtimes/cursor-cloud-agents">
    Capture Cursor cloud agent telemetry with sandbox-local hooks and direct GCS or S3 upload.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.