Skip to content

feat: add Cursor Agent CLI as first-class native agent - #1743

Open
jdistler wants to merge 2 commits into
slopus:mainfrom
jdistler:feat/cursor-native-agent
Open

feat: add Cursor Agent CLI as first-class native agent#1743
jdistler wants to merge 2 commits into
slopus:mainfrom
jdistler:feat/cursor-native-agent

Conversation

@jdistler

@jdistler jdistler commented Aug 31, 2026

Copy link
Copy Markdown

Summary

Adds Cursor Agent CLI as a first-class native agent in Happy, backed by the Agent Client Protocol (ACP) over stdio.

Closes #248

Local testing showing cursor cli model selection (cursor pro gives you access to the default Grok model, then all the other frontier lab models as well) -

Screencast-trimmed.mp4

Background & Architecture

Cursor CLI (agent / cursor) includes headless ACP support via agent acp (stdio JSON-RPC 2.0). This integration maps Cursor into Happy's multi-agent architecture alongside Claude Code, Codex, Antigravity (agy), and Gemini.

Key Details

  1. CLI Execution:
    • happy cursor spawns agent acp under AcpBackend.
    • Daemon remote session spawning correctly invokes happy cursor --happy-starting-mode remote --started-by daemon.
    • POSIX and Windows CLI availability detection checks for agent and cursor in PATH.
  2. Protocol & Handshake:
    • Spawns over stdio with ACP protocolVersion: 1.
    • Automatic local credentials re-use from agent login (no extra auth required).
    • Dynamic model discovery from Cursor's session/new response (~130 models, including Grok 4.6, Claude Opus 5, GPT-5.6 Sol, Gemini 3.7 Flash, Composer 2.5).
  3. App & Mobile UI:
    • Added Cursor harness to harnessCatalog.ts (HARNESS_NAMES, HARNESS_ORDER).
    • Added Cursor default configurations: agent permission mode (Full tool access), default[] (Auto / Cursor Router).
    • Curated pre-session model catalog in modelModeOptions.ts with fallback handling.
    • Added official Cursor brand assets (icon-cursor.png, @2x, @3x) and avatar badge geometry.

Test Coverage

  • happy-cli: All 87 test files (820 tests) pass.
  • happy-app: All 106 test files (1,119 tests) pass.
  • Build: pnpm run build succeeds with clean TypeScript types across the monorepo.
  • Live Verification: Verified agent acp initialize & session/new handshake against official Cursor CLI v2026.08.25.

export function getCursorModelModes(): ModelMode[] {
return [
{ key: 'default[]', name: 'Auto', description: 'Cursor Router (Default)' },
{ key: 'grok-4.6[effort=high,fast=true]', name: 'Grok 4.6', description: 'xAI' },

@jdistler jdistler Sep 1, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Curated these to appear right away in model selector, but the true large list loads quickly as they are dynamically discovered (see video demo in PR description)

@jdistler
jdistler marked this pull request as ready for review September 1, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor Agent CLI Support

1 participant