Expand description
Cursor Agent CLI plugin.
Launches the Cursor background agent (agent) in permissionless mode
inside a tmux session. Mirrors packages/plugins/agent-cursor/src/index.ts
in the TypeScript agent-orchestrator.
§Launch strategy
The TS reference embeds the full prompt in the launch command’s positional
argument (agent -- <prompt>). This Rust port uses post-launch delivery
instead — same as the Claude Code plugin — where the orchestrator runs
agent interactively, then sends the task via Runtime::send_message.
This keeps the architecture consistent across agent plugins and avoids
shell-escaping multi-kilobyte prompts in tmux commands.
§Activity detection
Cursor doesn’t write JSONL session logs like Claude Code. Detection uses:
.cursor/chat.mdfile mtime — if recently modified, agent is active.- Cursor log artifacts (if present) —
.cursor/logs/*mtime. - Workspace git activity —
.git/indexmtime (captures edits even without commits). - Recent git commits in the workspace — if any within 60s, agent is active.
- Fallback:
ActivityState::Ready(runtime liveness covers process exit).
§System prompt
Cursor has no --append-system-prompt equivalent, so agent rules are
delivered by prepending them to the user prompt (see
CursorAgent::system_prompt and the CLI spawn flow).
§Cost tracking
Cursor stores chat history in per-project SQLite databases under
~/.cursor/chats/<hash>/<uuid>/store.db and does not expose token /
cost metadata via its CLI. cost_estimate is intentionally left at
the trait default (None) — matching the TS reference, which also
reports cost as unsupported.