Skip to content

#2473: 0.1.2 HR: the Cursor CLI harness row on the local driver (cursor) - #2778

Open
jparker2006 wants to merge 8 commits into
mainfrom
room/2473-cursor-row
Open

jparker2006 wants to merge 8 commits into
mainfrom
room/2473-cursor-row

Conversation

@jparker2006

@jparker2006 jparker2006 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Closes #2473

Stacked: this pull request stacks on #2608 (HR1, #2431) at 3f486e077adf1531550b7475bb3c67283d4ef7af, so its diff against main also shows HR1's commits; this ticket's own change is only adapters/local/harnesses/cursor/ (git diff 3f486e077adf1531550b7475bb3c67283d4ef7af...HEAD). It merges only after #2608, and only after this row's live check, #2478, records 5 of 5 at this pull request's approved head. If #2608 merges first, main is merged in here (no rebase, no force-push).

Summary

The cursor harness row: Cursor CLI (agent) runs as a builder on the local driver through the user's own sign-in. One new folder, adapters/local/harnesses/cursor/, with row.json, its fake, README.md, test_row.py and evidence/. No driver, contract, CI or shared file changes.

start: agent --print --output-format stream-json --trust --model <model> <mode> <prompt>
wake:  agent --print --output-format stream-json --trust --resume <session id> --model <model> <mode> <prompt>
session id: the first JSON line's session_id (stream-json's system/init event)
modes: force (--force), allowlist (no arguments)        effort: none

The census check is resolved: -p and --resume <chatId> work together (README, with links to Cursor's docs and the CLI's source at 2026.11.22-e9042b2).

Evidence

  • Before (adapters/local/harnesses/cursor/evidence/red.txt, commit ab86d5e2): an empty row ({}) fails the runner: fail cursor: row.json effort: it has no effort form; give an effort map or "none: <one line why>", exit 1.
  • After (evidence/green.txt, at this head): pass cursor: the contract, the folder, the kit's five checks, and the session, env, background process and effort checks, the planted rows and driver checks unchanged, exit 0; test_row.py passes its 21 cases, exit 0.

Self-check

  • Undo the change and rerun the proof: python3 -I adapters/local/test_harnesses.py --rows <copy with row.json = {}> printed fail cursor: row.json effort: it has no effort form (the committed red run, evidence/red.txt)
  • Drop --trust from start and wake: python3 -I adapters/local/test_harnesses.py --rows /tmp/probe printed fail cursor: test_row.py: it failed (exit 1) (the kit's mode force trusts the workspace, as the real CLI does; test_row.py catches the allowlist lines)
  • Read the session id from the wrong JSON key (sessionId): python3 -I adapters/local/test_harnesses.py --rows /tmp/probe printed fail cursor: kit: fail wake: run run-<id> has no session id from its first turn yet; nothing was started
  • Fake starts no background process while the row declares one: python3 -I adapters/local/test_harnesses.py --rows /tmp/probe printed fail cursor: daemon: the row declares a background process, but its fake started none
  • Wake with --continue instead of --resume {session}: python3 -I adapters/local/test_harnesses.py --rows /tmp/probe printed fail cursor: kit: fail wake: the wake posted another builder note; a run keeps one
  • Claim an --effort flag the CLI lacks: python3 -I adapters/local/test_harnesses.py --rows /tmp/probe printed fail cursor: folder: its README needs one line "Effort: none", ...; and the fake exits 2 on --effort (test_row.py: pass an unknown option: exit 2)
  • Every error path of the fake: python3 -I adapters/local/harnesses/cursor/test_row.py printed 11 exit 2 passes, 5 exit 3 passes, pass an untrusted workspace: exit 1 and 4 reaches the turn passes, exit 0
  • Each guard fails closed: python3 -I adapters/local/test_harnesses.py printed every planted row's expected fail and every pass driver: line unchanged, exit 0
  • Nothing private in any output: a grep of git diff 3f486e077adf1531550b7475bb3c67283d4ef7af...HEAD for thread ids, email addresses and home-folder paths printed nothing; the fake prints only synthetic values (/synthetic/workspace, fake-<hex> ids)
  • No overwrite or delete of user data: n/a: the row adds files in its own new folder; the fake writes only the runner's temporary record and tracker
  • Every unchanged consumer of a changed producer: n/a: no producer changes; the driver, runner and kit read the new row unchanged
  • Comment check: python3 -I tools/comment-check/check.py diff --base 3f486e077adf1531550b7475bb3c67283d4ef7af printed comment-check: ok
  • Scope: ticket.py scope openwizdev/OpenWiz 2473 --base 3f486e077adf1531550b7475bb3c67283d4ef7af printed scope: ok

Merge danger

Door: two-way. Blast radius: one-row.

Rulings

  1. Start and wake use --output-format stream-json, not the census's json. Why: json prints session_id only in the one object at the end of a successful run, so a wake during a long first turn (the kit wakes as soon as the builder note appears) would get "no session id"; stream-json's system/init line carries it at once. Cost if wrong: low: one argument in row.json.
  2. Start and wake pass --trust. Why: print mode exits 1 with Workspace Trust Required in a folder the user hasn't trusted, and the driver's clone is new each run; --trust is the documented headless switch for it. Cost if wrong: low: one argument.
  3. Effort is none. Why: Cursor CLI 2026.11.22-e9042b2 has no effort flag or environment setting; effort exists only inside a parameterized model id ('claude-opus-4-8[effort=high]'), which a fixed argument can't add and which the driver's model field can't hold, and models without that parameter can't take it (J318: declare none rather than claim an ignored value). Cost if wrong: low: a later row change maps it once Cursor adds a flag.
  4. Two modes, force (--force) and allowlist (no arguments), first force. Why: they are print mode's two documented approval behaviours; the owner approves one. Cost if wrong: low: modes are data.
  5. Wake passes --model <model> too. Why: the run keeps the model the user chose on every turn; --model is a global option with no conflict with --resume. Cost if wrong: low: drop two arguments.
  6. The row declares a background process (the CLI's detached shell-tool process groups and background shells), and the fake simulates one with daemon='tree'. Why: the CLI's shell-exec module spawns each command with detached: true, and print mode keeps background shells after the last message; declaring it makes the runner prove stop ends it. Cost if wrong: low: it only adds a check.
  7. signed_out adds please run '(?:agent|cursor-agent) login', with login_command agent login. Why: the CLI's second signed-out form (a server message, then Please run 'agent login' to authenticate.) isn't one of the driver's own diagnostics. Cost if wrong: low: one pattern.
  8. The fake exits 3, not 2, on a documented command line it doesn't simulate (a subcommand, --api-key, a non-stream-json run). Why: exit 2 means "the docs don't allow this"; those lines are allowed, just outside the fake. Cost if wrong: low: the runner fails either way.

Facts

  • Branch: room/2473-cursor-row, from 3f486e077adf1531550b7475bb3c67283d4ef7af (the approved head of #2431: 0.1.2 HR1: the harness-row contract, the local driver's row loader and the kit check for rows #2608)
  • Head: ddc057228e02ff76e65579291fe25e83ee5febc3; Tree: 684e53d8a889432886a2f143740e923062c938a3
  • Changed paths: adapters/local/harnesses/cursor/row.json, fake, README.md, test_row.py, evidence/red.txt, evidence/green.txt (all new, owned). No supporting edits.
  • Tests: python3 -I adapters/local/test_harnesses.py (the runner: contract, folder, kit's five checks, session, env, background process, signed_out, effort, and test_row.py); python3 -I adapters/local/harnesses/cursor/test_row.py (new, 65 lines; catches: a fake that accepts a command line the docs don't allow, or a row line it would refuse). Test budget: under 400.
  • Red run: commit ab86d5e2, evidence/red.txt.
  • Safety: every runner, kit, driver and test command here ran with refusing stubs for 31 agent CLI names first on PATH, in a private temp dir: claude, codex, cursor-agent, agent, pi, opencode, copilot, goose, gemini, kimi, qwen, cline, kilo, crush, vibe, auggie, kiro-cli, junie, amp, agy, oz, sculpt, hermes, acpx, droid, boat, pane, openclaw, kiro, cn and aider. Each prints a refusal and exits 1. No real agent CLI ran and nothing signed in; fixtures use only this row's fake. Every suite ran as env -u OPENWIZ_GITHUB_APP_KEY <command>.
  • Sources: parameters, output format, authentication, headless, read 2026-11-23; the CLI's --help text and source read statically from https://downloads.cursor.com/lab/2026.11.22-e9042b2/linux/x64/agent-cli-package.tar.gz (sha256 7663b1c5d1b56e095ef8e23bef38d66df6cfd665c4873470214e0e411f0f97b3), never executed.
  • Claims: the row passes the runner on fixtures. Not claimed: any live behaviour, or macOS; that is 0.1.2 HR live: live check: the Cursor CLI row passes 5 of 5 (cursor) #2478.
  • Seams: 0.1.2 HR live: live check: the Cursor CLI row passes 5 of 5 (cursor) #2478 runs the kit with --harness cursor at this pull request's approved head, approving force or allowlist. 0.1.2 spec: Effort everywhere: every driver passes the user's effort, or says plainly it can't #2471's effort start field: this row refuses any effort with the fixed next.
  • Changelog: no changes/2473.md: changes/ is outside this ticket's owned paths; the spec's changelog headline covers all nine rows.
  • Push receipt: unknown (the branch's first push, at the base commit, was a plain push before ticket.py push).
  • CI at this head: pending.
  • Gaps: no live run (the person's ticket 0.1.2 HR live: live check: the Cursor CLI row passes 5 of 5 (cursor) #2478); the macOS stop path is not observed here.

Built with Cloudroom

noreply and others added 3 commits November 23, 2026 03:13
The failing check is T3 on the pull request body: the self-check line
embedded a home-folder path inside a search pattern. That sentence now
describes the search without the path. A rerun would reuse the old
event, so this commit publishes a new head for a fresh scan. The tree
is unchanged.

Co-authored-by: Jake Parker <jparker2006@users.noreply.github.com>
@cursor

cursor Bot commented Nov 26, 2026

Copy link
Copy Markdown

CI fix at 1b445bd, new head ca68dad
The privacy check flagged the self-check line for a home-folder path inside its search pattern; that sentence no longer contains one, and this commit starts a fresh scan of the corrected body.

The parent row's changelog file is on main, so this pull request's diff
is only the cursor harness row. The changelog check requires this ticket's
own line for that product change.

Co-authored-by: Jake Parker <jparker2006@users.noreply.github.com>
@cursor

cursor Bot commented Nov 26, 2026

Copy link
Copy Markdown

CI fix at ca68dad, new head cab32b6
Changelog failed once the parent line was no longer in the diff; this commit adds changes/2473.md for the cursor row on synthetic fixtures.

@jparker2006

Copy link
Copy Markdown
Member Author

Review #2778 at cab32b6

  • R1 [blocking, security] adapters/local/harnesses/cursor/row.json:35 (Spec, sweep). A repository owner can approve allowlist and still get Cursor's Run Everything on start and wake. Both rendered commands leave the approval policy to Cursor. The pinned CLI enables headless auto-approval when its effective configuration selects Run Everything and team policy permits it. Cursor merges project configuration with the user's settings, so the effective policy can differ from the one approved in OpenWiz. Commands that require approval in Allowlist can then run without a prompt. Enforce Allowlist on both turns, or drop the allowlist choice and require explicit approval of force. Cursor headless docs · Pinned CLI package
  • R2 [nit] adapters/local/harnesses/cursor/fake:38 (Spec). A synthetic start with --header missing-colon exited 0 and recorded a turn. Cursor requires a Name: Value header, and the ticket requires exit 2 for undocumented syntax. Validate the header format before handing the line to the fake turn. Cursor CLI parameters

Checked the repository standards, #2473, spec #2427, the owned paths, and the full diff. The local harness runner, all 21 Cursor row cases, and the local driver suite passed on fixtures. The empty-row check reproduced the expected exit 1, and the comment checker passed. The live merge gate is #2478.

VERDICT: CHANGES at cab32b6

- Drop the un-enforced allowlist mode from adapters/local/harnesses/cursor/row.json
  so owners must explicitly approve force rather than getting Run Everything from
  effective Cursor config under allowlist, and document why in README.md.
- Validate -H / --header values in adapters/local/harnesses/cursor/fake as
  non-empty Name: Value headers (exiting 2 on malformed syntax).
- Add tests for both fixes in adapters/local/harnesses/cursor/test_row.py and
  refresh evidence/green.txt.
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.

0.1.2 HR: the Cursor CLI harness row on the local driver (cursor)

3 participants