Skip to main content
Watchfire
Anysphere

Cursor Agent

Cursor's headless agent CLI — distinct from the in-editor agent.

What is Cursor Agent?

Cursor Agent CLI is the headless command-line companion to the Cursor editor. It runs autonomously via `cursor-agent --workspace ... --print` and reuses auth and config from `~/.cursor/`. It is distinct from the interactive agent inside the Cursor editor.

Vendor: docs.cursor.com/cli

Cursor Agent + Watchfire

Watchfire gives each Cursor Agent session its own home under `~/.watchfire/cursor-home/<project_id>/<session_id>/` and symlinks the real `~/.cursor/` auth and config files into it. The composed Watchfire system prompt is installed as `AGENTS.md` in the session home, and sessions launch headless with the yolo / trust flag behind the Watchfire sandbox.

Install with Cursor Agent as default

Install Watchfire, then initialise a project that defaults to Cursor Agent. Make sure the agent CLI is installed and authenticated outside Watchfire first.

watchfire init --agent cursor

See the installation guide for platform installers and Homebrew taps.

Interop notes

  • Symlinks `~/.cursor/` auth/config files into the per-session home
  • Launches headless with `cursor-agent --workspace <worktree> --print`
  • Runs with the yolo / trust flag — Watchfire sandbox is the boundary
  • Distinct from the Cursor editor's interactive in-editor agent