# Cursor Agent

import { Callout } from "nextra/components";

Cursor Agent runs in its own tab in each [pane](/docs/panes-and-worktrees), on that pane's branch.

<Callout type="info">
  Cursor Agent works in Pane on macOS, Linux, and WSL repos on Windows. On Windows, keep the repo in WSL and install `cursor-agent` inside that distro.
</Callout>

## Install

```bash
curl https://cursor.com/install -fsS | bash
```

The installer puts `cursor-agent` in `~/.local/bin`. If your shell can't find it, add that folder to your `PATH` as the installer directs.

## Authenticate

```bash
cursor-agent login
```

Your browser will open so you can sign in with your Cursor account. Check the result with `cursor-agent status`.

## Check Pane can find it

Run this from a repo you've added to Pane:

```bash
runpane agents doctor --agent cursor --repo active
```

This checks the same repo environment Pane will use, inside the distro for a WSL repo. If it can't find Cursor Agent, restart Pane after fixing your `PATH`.

## Launch

Press <KeyCombo keys={["⌘", "⌥", "5"]} /> (<KeyCombo keys={["Ctrl", "Alt", "5"]} /> on Windows and Linux) or press <KeyCombo keys={["⌘", "⇧", "P"]} /> (Open Search) and choose **Add Cursor**.

<TerminalPreview lines={[
  { type: "command", text: "cursor-agent --force --trust" },
  { type: "output", text: "" },
  { type: "command", text: "Fix the failing checkout tests" },
  { type: "success", text: "✓ Updated the checkout tests" },
]} />

Review the changes in **Changes** (<KeyCombo keys={["⌘", "⌥", "B"]} />), then commit with <KeyCombo keys={["⌘", "⇧", "K"]} />.

<Callout type="warning">
  Pane starts Cursor Agent with `--force --trust`, so it runs commands without asking unless your Cursor settings deny them. To have it ask first, add plain `cursor-agent` as a [custom command](/docs/custom-agents).
</Callout>

Pane remembers each Cursor Agent tab's conversation. After a restart, use **Resume Previous Panes** to resume it with `--resume`.

<a id="start-cursor-agent-from-runpane"></a>

## Start Cursor Agent from the runpane CLI

You can also create a pane and start Cursor Agent in one [`runpane`](/docs/runpane-cli) command:

```bash
runpane panes create \
  --repo active \
  --name fix-checkout-tests \
  --agent cursor \
  --prompt "Fix the failing checkout tests" \
  --wait-ready \
  --yes
```

See [Cursor's CLI docs](https://cursor.com/docs/cli/overview) for models, sessions, rules, and permission settings.
