minutes icon indicating copy to clipboard operation
minutes copied to clipboard

feat: support Cursor Agent CLI as summarization `agent_command` backend

Open adriannoes opened this issue 4 months ago • 3 comments

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:

  1. 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).
  2. Code (small PR if the spike looks clean):
    • Branch in prepare_agent_invocation for the agent binary
    • Targeted prepare_agent_invocation_* unit tests
    • Optionally include agent in detect_agent_cli preference order (maintainer call)
  3. Docs / config:
    • docs/architecture/config.md
    • One line in docs/integration/agent-integrations.md under current agent classes
    • No new skill tree (Cursor already uses files + MCP)

Out of scope

  • Cursor Cloud Agents SDK / CURSOR_API_KEY as a Minutes engine
  • Unofficial OpenAI-compatible subscription proxies
  • Changing default summarization engine
  • Replacing local ASR (Whisper/Parakeet)

Questions for maintainers

  1. Is Cursor Agent CLI welcome as an agent_command peer, or should Cursor stay MCP/files-only by design?
  2. Preferred detection order if we add agent to detect_agent_cli?
  3. 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.

adriannoes avatar Jul 23 '26 13:07 adriannoes

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:

  1. No hardcoded vendor model as a default. Model selection stays config-driven, exactly as you proposed.
  2. 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.

silverstein avatar Jul 23 '26 13:07 silverstein

Thanks for the green light — spike + small PR are ready for review.

What shipped (aligned with your guardrails):

  • prepare_agent_invocation branch for Cursor Agent CLI: agent -p --mode ask --output-format text --trust <prompt> (read-only ask-mode; no --force/--yolo; no hardcoded --model)
  • agent appended last in detect_agent_cli so engine = "auto" stays unchanged for anyone who already has another CLI
  • Unit tests for argv / lean parity / screen sync; desktop WELL_KNOWN_AGENTS; docs including docs/integration/cursor-agent.md
  • Spike: authenticated headless SPIKE_OK succeeded; ask-mode did not write in the test cwd

PR: (Fixes #520). Happy to iterate on review feedback.

adriannoes avatar Jul 23 '26 15:07 adriannoes

Correction — PR link for the review-ready change:

https://github.com/silverstein/minutes/pull/522 (Fixes #520)

adriannoes avatar Jul 23 '26 15:07 adriannoes