Skip to content

feat(harness): add verified Cursor worker adapter - #787

Closed
Amplify-Logic wants to merge 2 commits into
kunchenguid:mainfrom
Amplify-Logic:contrib/cursor-worker-adapter
Closed

Amplify-Logic wants to merge 2 commits into
kunchenguid:mainfrom
Amplify-Logic:contrib/cursor-worker-adapter

Conversation

@Amplify-Logic

Copy link
Copy Markdown
Contributor

Summary

Adds cursor (Cursor CLI agent) as a verified worker-only adapter. Primary-orchestrator support was not verified and is not claimed.

Verification also found two shared composer-monitoring defects that would have made the adapter unsafe; both are fixed in the shared owners:

  1. Reverse-video idle cell - cursor draws the terminal cursor as SGR 7 over the idle placeholder's first character. That survives ghost-stripping, so an idle composer reduced to a lone character and classified as pending, deferring away-mode escalations forever. The idle regex is now also matched against the plain (unstyled) row.
  2. False empty composer - #{cursor_y} points at cursor's bottom status area, not the composer. Reading that row found an empty status line while real unsubmitted text was present - the dangerous false-empty direction for the away-mode injector. The tmux path now locates the composer structurally (scoped to panes positively identified as cursor).

Other integration points:

  • Launch template: --yolo, --workspace pinned to the task worktree, deliberately no -w so cursor never allocates a second worktree
  • Per-task gitignored .cursor/hooks.json stop hook
  • Effort is a suffix on the model id (cursor_model_with_effort); xhigh/max cap at high
  • CURSOR_AGENT=1 detection is tested before CLAUDECODE because cursor does not clear an inherited Claude marker
  • Busy signature ctrl+c to stop (not the spinner verb, which flips mid-turn)
  • Bootstrap dispatch validation and secondmate liveness recognize cursor as a verified worker, including its effort range

Evidence and limitations: docs/cursor-harness.md. Backends: tmux verified; herdr composer-safe by construction with liveness unverified; zellij/orca/cmux not exercised with cursor.

Test plan

  • bin/fm-lint.sh
  • tests/fm-cursor-adapter.test.sh (including under ambient CURSOR_AGENT=1)
  • tests/fm-bootstrap.test.sh
  • tests/fm-secondmate-liveness.test.sh

…4.5)

Adds `cursor` (Cursor CLI `agent`) as a verified worker-only adapter. Primary support was not verified and is not claimed.

Also fixes two shared composer-monitoring defects discovered during verification: reverse-video idle cells surviving ghost-strip (false pending), and tmux `#{cursor_y}` missing the composer (false empty). Detection tests `CURSOR_AGENT` before `CLAUDECODE` because cursor does not clear an inherited Claude marker.
Keep startup dispatch validation and secondmate liveness aligned with the verified worker adapter set, including Cursor's model-suffixed effort range.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: closing this as stale. It has been waiting on a contributor update for 14+ days with no author push or comment. Reopen if you want to pick it back up.

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.

2 participants