feat: support Cursor Agent CLI as summarization `agent_command` backend
Summary
Proposal to add first-class support for the Cursor Agent CLI (agent) as an agent_command backend in the summarization path, alongside the existing claude / codex / gemini / opencode / pi handlers.
Today Cursor is documented as a files + MCP host (docs/integration/agent-integrations.md). That path works well for interactive chat. This issue is only about the non-interactive engine = "agent" path so Minutes can call Cursor the same way it calls other agent CLIs for post-meeting summary / title / L1 speaker mapping.
Motivation
Many Minutes users already run Cursor (Pro/Ultra) as their daily coding agent. Being able to point summarization at the local agent CLI would let that same subscription power automatic post-processing without a separate Anthropic/OpenAI API key or a third-party OpenAI-compatible proxy.
This is opt-in (agent_command = "agent"). It does not change the default summarization.engine = "none", and it does not replace local Whisper/Parakeet transcription.
Current gap
prepare_agent_invocation in crates/core/src/summarize.rs has explicit argv shapes for the known CLIs. An unknown binary falls through to:
- empty args
- prompt on stdin
That does not match Cursor Agent’s headless contract (needs -p / print mode, and typically --mode ask for a read-only Q&A-style run). Setting agent_command = "agent" today therefore does not work.
detect_agent_cli() also does not consider agent, so engine = "auto" will never pick Cursor even when the CLI is installed.
Proposed shape (spike first)
Aligned with the checklist in docs/integration/agent-integrations.md §4:
- Spike the non-interactive contract (before UI/docs sprawl):
- Confirm a stable headless invocation, e.g. roughly:
agent -p --mode ask --output-format text - Optional:
--model <id>only if we can keep it config-driven and documented (model catalog varies by account; do not hardcode a vendor model as default). - Prefer ask/plan-style read-only mode so summarization does not get write/shell tools by default (same spirit as Codex
-s read-only/ Pi--no-tools).
- Confirm a stable headless invocation, e.g. roughly:
- Code (small PR if the spike looks clean):
- Branch in
prepare_agent_invocationfor theagentbinary - Targeted
prepare_agent_invocation_*unit tests - Optionally include
agentindetect_agent_clipreference order (maintainer call)
- Branch in
- Docs / config:
docs/architecture/config.md- One line in
docs/integration/agent-integrations.mdunder current agent classes - No new skill tree (Cursor already uses files + MCP)
Out of scope
- Cursor Cloud Agents SDK /
CURSOR_API_KEYas a Minutes engine - Unofficial OpenAI-compatible subscription proxies
- Changing default summarization engine
- Replacing local ASR (Whisper/Parakeet)
Questions for maintainers
- Is Cursor Agent CLI welcome as an
agent_commandpeer, or should Cursor stay MCP/files-only by design? - Preferred detection order if we add
agenttodetect_agent_cli? - Should model selection be a new config key, reuse something existing, or stay entirely on the user’s Cursor CLI defaults?
Happy to open a small PR after the spike shape is approved — I will not open a competing implementation without maintainer direction.
Thanks for a well-scoped proposal, and for following the integration checklist in docs/integration/agent-integrations.md before writing any code. Spike-first is exactly right.
Green light on the shape you described, with two guardrails:
- No hardcoded vendor model as a default. Model selection stays config-driven, exactly as you proposed.
- Read-only invocation by default (ask/plan mode), matching the spirit of the Codex read-only sandbox and Pi no-tools handling. Summarization should never acquire write or shell tools as a side effect.
On the maintainer-call item: including agent in detect_agent_cli is fine, but place it after the existing entries in preference order so engine auto behavior does not change for anyone who has both installed.
If the spike confirms a stable headless contract, a small PR with the prepare_agent_invocation branch plus targeted unit tests is very welcome. Happy to review.
Thanks for the green light — spike + small PR are ready for review.
What shipped (aligned with your guardrails):
prepare_agent_invocationbranch for Cursor Agent CLI:agent -p --mode ask --output-format text --trust <prompt>(read-only ask-mode; no--force/--yolo; no hardcoded--model)agentappended last indetect_agent_clisoengine = "auto"stays unchanged for anyone who already has another CLI- Unit tests for argv / lean parity / screen sync; desktop
WELL_KNOWN_AGENTS; docs includingdocs/integration/cursor-agent.md - Spike: authenticated headless
SPIKE_OKsucceeded; ask-mode did not write in the test cwd
PR: (Fixes #520). Happy to iterate on review feedback.
Correction — PR link for the review-ready change:
https://github.com/silverstein/minutes/pull/522 (Fixes #520)