Skip to content

#235: a visible agent cursor drawn by cua's own macOS engine - #240

Merged
SSFSKIM merged 135 commits into
mainfrom
feat/235-macos-cursor
Nov 1, 2026
Merged

SSFSKIM merged 135 commits into
mainfrom
feat/235-macos-cursor

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

When an agent drives a Mac through cua's own macOS engine (CUA_NATIVE_ENGINE=cua, #117), the engine posts clicks, drags and scrolls straight to the target app and the person's pointer never moves, so nothing on screen showed where the agent acted. With this change every session that acts on the Mac shows its own cursor: a small rounded arrow with a frosted halo, filled with the session's colour, with a pill naming the session. It glides to each target and dips at a click, but the action never waits for it. It sits on the window it acts in, never takes a click, the focus or the front position, shows in screen recordings and screen sharing, and is left out of the agent's own screenshots. It is for the owner watching their Mac, several agents acting at once (MAWS), recordings and demos, and remote cua devices watched over screen sharing. It is on by default and can be turned off per device or per session. The vendor engine, still the default, is unchanged.

Spec: docs/doperpowers/specs/2026-10-30-macos-agent-cursor-design.md; execution record: docs/doperpowers/specs/2026-10-30-macos-agent-cursor-report.md; evidence: docs/evidence/2026-10-30-macos-agent-cursor/.

Closes #235.

macOS-visible changes

All of these apply only to macOS sessions on cua's own engine built from this branch; the vendor engine shows OpenAI's cursor, and none of these switches reach it.

The cursor (native/engine/Sources/Engine/Cursor/: CursorHub.swift, CursorPanel.swift, CursorMotion.swift, CursorEffects.swift, CursorHalo.swift, CursorPalette.swift, CursorLifecycle.swift, CursorAttachment.swift, CursorSession.swift, CursorSystem.swift)

  • One non-activating, click-through NSPanel per connection, spanning the target's screen, ordered directly above the target window at its level (level 102, above menus, while the target app is frontmost or has a menu open). Windows that cover the target cover the cursor.
  • What moves it: coordinate clicks, right and double clicks, drags (it traces the drag), scrolls (no dip), route-1 element clicks, the accessibility-only element methods (perform_secondary_action, set_value, select_text, pointed at the element's frame read after the action returns), and a recorded menu-bar click (pointed at the menu title). Hooks in Input.swift, ElementInput.swift, ScrollDrag.swift, MenuSpan.swift, SecondaryAction.swift, ValueSetting.swift, TextSelection.swift; begin/end around every execute in Methods.swift.
  • States: glide to the target (the vendor's motion, translated: a spring scoot for moves up to 196 pt, a scored Bézier path for longer ones); press dip on arrival at a click; thinking rock (±10°) once the motion has settled and no request of the session has been in flight for 0.3 s; fade over 0.44 s, 5 s after the session's last request ends, never while one runs, and at once on end_task; taken over, the whole cursor at 50 % opacity, while the person clicks or types in the app the agent drives (from the intervention ledger, Intervention.swift onRecord), until the session's next request. A key press brings a faded cursor back at its last point in that app.
  • Between actions it follows app activation, menus, Space changes, screen lock, and the target window being minimised, closed or moved off screen (CursorAttachment.swift, a 4 Hz window check only while visible).
  • Reduce Motion: short straight eases and an opacity dip. Increase Contrast: the outline at full strength.
  • The engine takes an NSProcessInfo activity (.userInitiatedAllowingIdleSystemSleep) only while a cursor is visible.

Identity (src/runtime/cursor-identity.mjs, src/runtime/launch.mjs, src/mcp/connection.mjs)

  • The pill reads CUA_CURSOR_LABEL, else the Claude Code session's sminos name (sminos who --session, bounded at 500 ms, cached), else the project folder's name; at most 24 characters. The colour is CUA_CURSOR_COLOR (#rrggbb), else one of eight picked by a hash of the session id.
  • Remote devices: the client sends its resolved {label, color, enabled} as cua/cursor in the remote session's initialize (src/remote/client.mjs, src/remote/directory.mjs, src/mcp/target.mjs); the device checks each field and uses it for that session only (src/mcp/http.mjs). The device's "cursor": false still wins.

Switches

  • Per device: "cursor": false in ~/.config/cua/engine.json, read at engine launch; any non-boolean value stops the engine at start (Config.swift).
  • Per session: CUA_CURSOR=0 in the server's environment (src/services/engine/service.mjs cursorParams). Any other value than 0/1 is logged and leaves the cursor on.
  • Diagnostic arms: "cursorDebug" in engine.json, one of panelOut, noBackdrop, noRock, legacyLayers, uncapped, off by default, strict (an unknown name, including a leftover fps60, stops the engine with the list of arms). An arm prints a line to the engine's stderr and is reported in the engine's status (Config.swift, Server.swift, Methods.swift).
  • The 60 Hz cap is the default (CursorFrameRate, CursorEffects.swift): nothing visible; halves WindowServer frames for the cursor on an idle display. The uncapped arm restores the old full-rate animations.

The wire (Methods.swift, Lineage.swift, src/services/engine/client.mjs): an additive cursor request on cua-engine-1 ({label, color, enabled} or {hide: true}), sent after the ping on every new connection, and {hide: true} from an end_task turn-ended hook. It is optional: an older engine's methodNotFound means no cursor for that connection, an unanswered one is abandoned at 5 s without closing the connection, and nothing about it fails a request.

CLI and status (src/cli.mjs, src/runtime/engine.mjs, src/runtime/doctor-engine.mjs)

  • cua engine status prints a cursor: line: cursor: on, cursor: off (engine.json), cursor: none (the running engine has no agent cursor) or cursor: unknown (~/.config/cua/engine.json cannot be read); its JSON gains cursor. Its usage line now mentions the cursor.
  • cua doctor's engine row adds the same words, notes when engine.json now says otherwise than the running engine read (cua engine stop applies it), and reports a non-boolean cursor as a setting that stops the engine.

What a model sees (docs/cua-api/agent-cursor.md, src/cua-api/documentation.mjs, src/cua-api/create-tinysky-alt.mjs): on cua's own host with a macOS computer surface, the first-call document appends one paragraph after the core and before the confirmations policy: a cursor labelled with the session's name shows the user where each action lands, the actions do not wait for it, it is not the user's pointer, and screenshots do not show it. core.md is unchanged.

Not visible, but changes behaviour

  • Route 3's screen-update release runs on a background serial queue (ScreenUpdateReleases, Activation.swift) instead of inline, so a request no longer waits about 5 ms for the window server while the cursor's panel animates. A screen capture drains pending releases first (timed as screenshotReleaseWait, Screenshot.swift), and shutdown drains them before exit (Server.swift).
  • The screenshot path's shareable-content cache leaves the engine's own windows out of its key, so a cursor appearing never forces a re-list (Screenshot.swift).
  • The probe's front-window check skips windows of the approved engine's bundle (Probe.swift); new --probe cursor mode (CursorProbe.swift).
  • Timing os_signposts (subsystem io.github.ssfskim.cua.engine, category timing) on the request, its prologue steps, coordinate click steps, press_key parts, main-thread hops and route 3's hold (Signposts.swift, Keyboard.swift, Input.swift, Methods.swift, Activation.swift); each checks isEnabled first.
  • Harness and kit: the keystroke gate, composition guard, live paste check and matrix oracle skip the engine's windows (scripts/accept/front-window.swift --skip-pid, scripts/native-matrix/); the parity doc oracle flags the agent-cursor paragraph by declared facade (scripts/repl-parity/); the TextEdit scene launches with -NSRequiresOpenUntitledWindowAtLaunch NO; the sitting kit scripts/cursor-sitting.mjs and scripts/cursor-sitting/.

Overlap with #211 (#117 M4, open)

Files both change: .claude-plugin/marketplace.json, .claude-plugin/plugin.json, docs/doperpowers/specs/2026-10-18-own-native-engine-design.md, native/engine/Sources/Engine/Input.swift, Methods.swift, Probe.swift, README.md, src/cli.mjs, src/mcp/server.mjs, src/runtime/engine.mjs, src/services/engine/client.mjs, src/services/engine/service.mjs, tech-debt-tracker.md, and the tests test/runtime-engine.test.mjs, test/services-engine-client.test.mjs, test/services-engine-service.test.mjs. Activation.swift is not among #211's files.

What this branch changes in each shared code file, to keep at rebase:

  • Input.swift: an announce closure on deliverClick/deliverPointer, called after beforePosting and before the events post; cursor.act(...) at route 1's element click and the coordinate click; the coordinate click's steps and press_key's parts wrapped in signposted; holdMenuRecord takes storedFrame. #117 M4: install, signing, permissions, docs #211 changes only withMeta.
  • Methods.swift: keyboardOnlyMethods; Engine's cursor, cursorEnabled, cursorDebug and the onRecord hookup in init; the cursor method case and cursorRequest; cursor/cursorDebug in status; the execute prologue's signposts and cursor.begin/end after the lock check and app resolution. #117 M4: install, signing, permissions, docs #211 changes the require* bodies.
  • Probe.swift: the cursor probe case and usage text, the header comment, and frontLayer0Window(skipping:), runsFrom, executablePath, frontWindowIs skipping the engine's windows. #117 M4: install, signing, permissions, docs #211 adds a window-frame case to the same switch, usage string and comment: a textual conflict; keep both cases.
  • client.mjs: cursor, cursorWaitMs, log on createEngineClient; call(..., {optional}); sendCursor after the ping of every new checked connection; hideCursor. #117 M4: install, signing, permissions, docs #211 changes the same signature line and splits the connect path for its permission relaunch: keep sendCursor on every new connection, the relaunched one included.
  • service.mjs: cursorParams, the client built with cursor, and the turn-ended hook. #117 M4: install, signing, permissions, docs #211 changes the PER_CALL line and the catch block.
  • cli.mjs, engine.mjs, server.mjs: the status cursor line and usage text, cursorSwitch, and the cursorContext parameter; #117 M4: install, signing, permissions, docs #211's hunks are elsewhere in these files.

The spec (Hooks) says #211 changes none of the cursor's hook points. The diff agrees: #211's hunks in Input.swift, Methods.swift, service.mjs and client.mjs are the ones named above, and none is at a hook. The textual conflicts are in Probe.swift, client.mjs's signature, the README's environment table, the top of tech-debt-tracker.md and the version lines.

The plugin bump

0.19.0 → 0.20.0 (plugin.json and marketplace.json, the version only) in its own commit 36e9e6c, to be renumbered by merge order against #171's bump. #211 carries its own bump (0.17.1 → 0.18.0, against an older main).

Verification

Attended sittings on the owner's MacBook (2026-10-30, 2026-10-31), then unattended runs:

  1. Shows where the agent acts: PASS by the owner's watch at the first sitting (build 2f9b3bf06ca4: first-target and second-target). The order on the final build is declared, not recorded (Agent cursor Acceptance 1: record the click-before-cursor order on a current build (kit's background-window guard refuses on Chrome for Testing) #239): the engine's own timing on b23a6e7a18c6 and 3cdf06462f92 has every decidable cursor-on click done more than a frame before the glide's planned arrival (184/184, coordinate clicks and drags in TextEdit; element clicks not decidable from the records), and the pacing path is unchanged to the final build. Two runs of item 1 on the final builds were refused by the kit's window guard before anything was sent.
  2. Identity: PASS (two pills, two colours; "Research in blue").
  3. States and timing: PASS on all six watches, at both sittings; the look PASS.
  4. Covered and front: covered PASS; front menu PASS after the fix to follow the activation's own app (5369088). The background-menu cases were not run: no engine opens a menu for an agent's click, and the acceptance was reworded.
  5. Never in the way: the owner's click on the cursor reached the fixture and turned it half-transparent; no engine activation; focus readings equal field by field; no cursor in the agent's screenshot. PASS. The screen-recording clause: PASS on 2f9b3bf06ca4, from the owner's own screen recording of the first sitting (the cursor and its pill in a frame at 03:59:10Z); the panel's sharingType = .readOnly is unchanged since M1 (7609069) through the final build.
  6. Attached between actions: PASS on all eight watches.
  7. Typing keeps it alive: PASS on all four watches.
  8. Remote devices: PASS on run 3 (run 2's windows were covered).
  9. Reduce Motion: PASS. 10. Off switches: PASS.
  10. Motion matches the vendor: the motion module's unit tests equal the reference vectors; the owner's side-by-side "matches the vendor". PASS.
  11. Typing speed: type_text passes. Owner's amendment: "press_key is accepted as a stated limit, about 1 ms a key while the cursor moves (up to about 1.8 ms in a large TextEdit document; on a fresh one +6 ms per 30 keys, undetermined), from TextEdit's redraw under a busier compositor while the cursor's panel shows."
  12. Click speed: element click passes; route 3's start lag "Looked prompt". Owner's amendment: "coordinate click and drag are accepted as a stated gap, within about 2 ms, not proven within 1 ms, at 40 samples a side."

The timing fixes behind 12–13 (route 3's release off the request path, the rock's filter only during fades, an explicit shadow path, thinking only after 0.3 s idle, the 60 Hz cap) took press_key from +3.4 ms a key at the first sitting to about +1 ms (+32 ms per 30 keys, against +69 under the legacyLayers arm in the same sitting). Items 2–11 were judged on builds before the cap became the default. The cap was proven from WindowServer's FrameUpdate signposts while it was still an arm (fps60, approved build 3cdf06462f92, quiet display: a frame every 16.7 ms against 8.3 ms). On the final build, dd7a09235885 (cf6c7b6, the cap as default), the live cap check reads capped: a frame every 16.7 ms by default against 8.3 ms with the uncapped arm, on an idle display.

Reviews: whole-branch doperpowers:reviewer-high twice. On fc15e1b..b767314: three P2s, fixed in f65701f and d6fc600, re-review clean. On fc15e1b..9f021c7: one P2 (a keyboard revival in another app left the cursor's app stale, so a later display change moved it to that app's old point), fixed in cf6c7b6, re-review clean. Each milestone and kit change had its own task review, converged clean. Engine tests 613/613 at cf6c7b6.

CI: ci-gate GREEN on the head 4b21fbe (docs-only past e6394e2), all six gates (test and engine-swift on hosted macOS, sandbox-live, sandbox-denials, parity-browser, plugin): https://github.com/SSFSKIM/cua/actions/runs/41252996481; on e6394e2: https://github.com/SSFSKIM/cua/actions/runs/41251127007

Known limits and debts

Sminos-Session: cursor235#b93055dd (cua on macbook)

… (design approved by the owner 2026-10-30)

The design session's spec: the owner's twelve decisions (look A, colour and name per session, act at once,
on its window, out of the agent's screenshots, thinking and taken-over states, 5 s fade, on by default),
the vendor's motion translated with its constants, Core Animation rendering off the typing path, the hooks,
identity and switches, the harness, and three milestones ending in an attended proof on the MacBook.
Research: the engine's hook points and the vendor cursor's behaviour and logic (no raw decompiled listings),
and the approved look mockup.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
… panel, retained-trajectory retargeting, live element frames, per-request activity, remote cursor context, route-3 freeze accepted, settle rule and independent motion reference, M3 engine save and restore)

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
…k, the element frame read after the action, the motion reference in tip coordinates)

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
…review done

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
… told between)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…s reference vectors

The settle test (FUN_1007d622c) read from the decompile and disassembly: max(|v|², |F|²) ≤ τ² and, when the
target is non-zero, |target − x|² ≤ |0.01·target|²; recorded in vendor-cursor.md with its addresses.

The look reference's motion code extracted into a Node script that prints the reference vectors for the
Swift motion module's tests (mode, chosen candidate, cost, response, settle steps, chosen path), normalised to
tip coordinates and the resolved settle rule; its output committed as vectors.json. The test target excludes
the fixtures directory from its sources.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…erence in y-up tip coordinates, the visual-effect halo promoted)

Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
… (the halo's backdrop behind one type)

Sminos-Session: cursor235#b93055dd (cua on macbook)
… reference vectors

Cursor/CursorMotion.swift translates the vendor's motion (MotionConfiguration.live, the candidates, the cost, the
progress spring's response, the velocity-Verlet integrator and its resolved settle rule, the heading, the scoot's
stretch, squash and tilt, the halo's swell) into a pure planner that samples a trajectory at 1/240 s in the panel's
y-up tip coordinates. Its tests read Fixtures/cursor-reference/vectors.json: mode, chosen candidate, every
candidate's cost and bounds, the chosen geometry, the response, and the settle step within one.

Sminos-Session: cursor235#b93055dd (cua on macbook)
CursorPalette.swift holds the eight hues and the pill shade of each, darkened only as far as white 11 pt text needs
for 4.5:1, the label cut and M1's placeholder identity per connection. CursorLifecycle.swift is the state table as a
pure machine over an explicit clock: hidden, acting, thinking, taken over, fading; per-request activity, the 5 s idle
from the last request's end, keyboard requests bringing a faded cursor back at its last point in that app.

Sminos-Session: cursor235#b93055dd (cua on macbook)
CursorHub.swift: one cursor per connection; begin, end, act, hide, closed and the accessibility-only methods' hook,
none of which waits. A serial cursor queue plans each motion, splicing from the retained trajectory 20 ms ahead, and
hands the renderer the whole desired state in one main.async commit; generations drop a plan superseded on the queue
and a stale commit at the main thread. The attachment (CursorAttachment.swift) orders the panel above its target at
the target's level, at 102 while the app is in front or has a menu open, hidden off screen, re-read at activation,
Space and lock events and four times a second while a cursor shows.

Sminos-Session: cursor235#b93055dd (cua on macbook)
CursorPanel.swift renders a commit on the main thread: one borderless, non-activating, read-only-shared panel per
cursor over its screen's full frame, ordered above the target window; the trajectory installed as keyframes
(position, heading and stretch, halo swell), the press dip at arrival (an opacity dip under Reduce Motion), the fade
with its blur, the thinking rock, taken over at half opacity, the pill beside the tip. CursorHalo.swift owns the
backdrop alone: an NSVisualEffectView (.hudWindow, .aqua) behind the window, soft-masked, with a wash of the
session's colour. CursorSystem.swift is the live environment; `--probe cursor` runs the scripted moves and states,
or holds a cursor over a given window.

The hooks: begin and end around every execute request; the pointer funnel tells the cursor after the in-flight
check, just before a click's or drag's events; route 1's element click, the scroll, and the accessibility-only
methods after their operation succeeds. The intervention ledger tells the hub of the person's events; the server
closes a connection's cursor; the screenshot cache leaves the engine's own windows out of its key.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ll; #117's superseding entry

The hub re-sets each cursor's panel to the screen now holding its last point when the displays change. The arrow
rests at the session's colour at 0.8 and rises to 1 while thinking. #117's Decision Log gains a dated entry that
supersedes its "no cursor overlay" decision for the cursor only, pointing at the #235 spec.

Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…te table's carried-over ratio)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ec named did not)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ed, taken over still, live Reduce Motion

- An explicit hide (end_task, the lock, configure off) stamps its fade's own start, so a hide long after thinking
  began fades over 0.44 s instead of vanishing.
- A newly installed motion replaces every unplayed dip, with dips of its own or none (CursorEffects.swift's
  CursorDips), so a click superseded by a scroll never dips at the scroll's point.
- Taking over freezes a motion in flight at the retained trajectory's current state and cancels its pending dip.
- A change of Reduce Motion replans a motion in flight from where it is (its unplayed dip moved to the new arrival),
  and the rock tracks its own state (CursorRock), so it starts or stops with the option and no action between.
- The activity is .userInitiatedAllowingIdleSystemSleep.
- The arrow's fill is solid in every state; thinking is the rock alone; Increase Contrast changes only the stroke.
- Reduce Motion's dip is its own 0.1 s opacity dip.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ken over freezes unconditionally

A motion planned again under a changed Reduce Motion now moves the lifecycle's settle deadline with it, so the
cursor enters thinking when the replacement settles, neither rocking during a longer replacement glide nor staying
acting past a shortened one; the request and idle bookkeeping is untouched. Taking over now freezes whatever the
retained motion still plays, a dip already playing and the halo's post-settle relaxation included.

Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…e probe gate skips the engine's windows

The wire's additive `cursor` method sets a session's label, colour and switch
(kept on its ConnectionState, Cursor/CursorSession.swift) or hides its cursor at
end_task, answering {cursor, reason}; `"cursor": false` in engine.json, strict
like the other keys, turns every session's off and wins over the session, and
`status` reports it. The keystroke probe's front-window gate skips windows of
processes running from its own bundle (the approved engine's cursor panels).

Sminos-Session: cursor235#b93055dd (cua on macbook)
…remote cua/cursor, the status lines

The trusted side resolves a session's {label, color, enabled} (src/runtime/
cursor-identity.mjs: MAWS's CUA_CURSOR_LABEL/COLOR, the sminos name through the
plugin's documented `sminos who --session`, bounded at 500 ms and kept per
session, the project folder's name, the hash colour; CUA_CURSOR=0) once per
connection without holding the open up, and the launch passes it to the worker
as the three variables cua's engine service reads. The service's client sends
the `cursor` request on every new engine connection and end_task's turn-ended
hook hides it; an engine without the method answers methodNotFound and the
session goes on. A remote client sends its context as cua/cursor in the
initialize, which the device checks field by field for that session's launch
alone. cua engine status and doctor's engine row report the device switch.

Sminos-Session: cursor235#b93055dd (cua on macbook)
The live paste check's alert watch counts the approved engine's processes as
the run's (as the matrix's alert check does), and the composition guard reads
the front window with the engine's pids skipped (front-window.swift
--skip-pid), as the keystroke probe's own gate now does: the cursor's panel is a
display-wide layer-0 window of the engine that never takes a key.

Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…s windows too

Sminos-Session: cursor235#b93055dd (cua on macbook)
…e the connection, the oracle skips the engine's windows

A failed or timed-out sminos lookup settles every concurrent caller to the
folder fallback and is dropped (one failure-normalized promise per session). A
cursor request with no answer is abandoned at its bound without closing a
healthy connection or the request behind it, and a failure other than an older
engine's methodNotFound is logged. The matrix oracle's front-window reading
passes over the windows of the processes running from the approved engine's
bundle, as the probe gate and the composition guard do.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ed lookups

The context-fallback half used the real sminos lookup with the test's session
id, which on a HOME without the plugin cached null ahead of the retry
assertion, and on a normal run read the account's plugin record. The retry now
follows the injected failure directly, and the contexts run over an injected
failing lookup with a session id of their own.

Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…n the sitting)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…settle margin, and the cap judged from the drained stream

The re-review of 4ff410f..d74acb6:
- The chunked reads ran on a timer of their own, which could line up with one side of the
  deterministic on/off order. A read now starts only at the start of a 6 s gap between samples
  (the runner's waits call the chunks' gap), when one is due (20 s since the last) and the last
  read's length plus a 1 s settle margin fits; the gap waits for it, parse and write included,
  and for the margin before the next sample, a long read holding the next sample to its end and
  the margin. Each read's start and end is a signposts-read row in the item's jsonl. Measured
  with a scratch emitter: a read took 1.0-3.8 s; logd's work for it was over within about 1.2 s
  of its start, and neither logd nor a latency probe's fixed job showed any effect after its end.
  Reads land every 20 s plus at most a sample and a gap, against a store that kept 2-3 minutes
  under 1,750 lines a second.
- The fps60 check (capCheckWithStream) drains the FrameUpdate stream (stop, its last lines in)
  before judging, judges from the drained times, and is undetermined when the stream did not
  start or failed, or when any glide has no frames, which frameSummary would have passed over.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…from recent reads, and each read bounded

A read over 5 s set the fit estimate above the 6 s gap for good, so no later read ran and, past
the store's 2-3 minutes, the final read could not recover what was missed. Now a read overdue
60 s since the last success runs in the next gap whether it fits or not (the next sample waits
for it and the margin), the fit uses the median of the last five reads, one read is cut at 15 s
(the real read's process is killed at the same bound), and a read that fails or is cut is
recorded and retried in the next gap.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…itions, signposts collected without bias)

Sminos-Session: cursor235#b93055dd (cua on macbook)
… item as a same-session control

`timing typing|clicks --control` runs the default arm's series again under item-12-control or
item-13-control, recorded and never judged, with the usual input source, guard and chunked
signposts, so the next run's arm and --still series can be read against a control taken beside
them (the off medians drifted across the second sitting's hour) without the judged item 12 or
13's last attempt being replaced. It is refused with --arm, --still, --source or --owner-source.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…c, and the runbook's source named ABC

Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…e-session control)

Build 3cdf06462f92, approved 20:04:52Z. Recorded, never judged: typing --still
(press_key undetermined), --arm fps60 (the cap check read not capped on the
approved bundle, so the series does not answer the frame-rate question), and
--control (press_key slower, type_text same). Item 1 --no-clip refused: the
owner's own windows covered Chrome for Testing's. The source consent is the
owner's of 14:03:01Z, copied from sitting-2026-10-31. Signposts (about 340 MB)
are kept outside the repository, with their SHA-256 sums here.

Sminos-Session: cursor235#b93055dd (cua on macbook)
… display held at full rate reads undetermined

Tonight's run (sitting-2026-10-31b, 12-fps60.12) read "not capped": both probe sides at a frame
every 8.3 ms, the rock at 120 Hz on both. The display was busy before the probes started
(WindowServer at 33-43 % CPU in the 16 s before them, against 1-2 % in the run's quiet stretches,
with the owner's full-screen Chrome and cmux on it); and right now, with no cursor drawing,
WindowServer composites about 118 frames a second. A capped animation renders at the display's
rate when another client holds it at 120 (measured in task 8), and FrameUpdate names no window,
so that count cannot tell a cap ignored from one overridden.

capCheckWithStream now counts 1.5 s of the stream before the probes (`quiet`), and a "not capped"
under a display already at 100 Hz or more reads undetermined, saying so. The probe's own
`debug` (its final line names the arm it ran with) is kept, and a side that does not report
the arm asked for, none for the default and fps60 for the arm, is undetermined: the records
could not show whether the arm took.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…n times after the drain

The quiet window before the probes was measured by when log stream delivered frames: it reads
late, so the window's own frames could arrive after it (a 120 Hz display read as 0 Hz, the verdict
a wrong "not capped") and older queued frames during it (a quiet display read as held). The check
now marks the window's start and end on Date.now()'s clock, the stream keeps each frame's log
timestamp beside its mach ticks, and the window's rate is the drained frames whose timestamps fall
inside it, as the glides' are counted by their spans.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…uiet display, fps60 on a fresh document)

The approved bundle and the scratch executable both cap at 60 Hz on a quiet
display (16.7 against 8.3 ms). The fps60 series' own check read not capped
with its pre-probe window at 84.7 Hz: the run's own context held the display.
Item 1 and the control series were refused before sending anything: TextEdit's
front window was not the scene's recorded one. HID input at about 21:06:17Z,
during fps60's last samples. Signposts are kept outside the repository.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ess_key's residual to the owner

Sminos-Session: cursor235#b93055dd (cua on macbook)
…mined

The quiet window before the probes turned a "not capped" into "undetermined
(held)" only at 100 Hz or more. On 2026-10-31c a window at 84.7 Hz (127 frames
in 1.5 s) let a void cap read "not capped": a capped glide asks for 60, so a
client drawing near that rate or above it can lift the glide's frames. Held now
starts at 50 Hz. The test (84.7, 50 and 49 Hz) failed on the old threshold.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ores the old rates

The design session's ruling of 2026-10-31: on a quiet display the approved
bundle and the scratch executable both cap (16.7 ms against 8.3 ms between
frames, sitting-2026-10-31c/probe.log), so the fps60 arm's frame-rate range
(CAFrameRateRange 30-60, preferring 60) and its keyframe split at every hold
are what the cursor always does now (CursorFrameRate). The fps60 arm is gone:
engine.json naming it stops the engine like any unknown arm. A new arm,
`uncapped`, puts back exactly what the default drew before (one keyframe
animation per property at 60-120 preferring 120, every other animation at its
own range), so the probe's `--debug uncapped` gives the cap check its
full-rate side. The other arms keep the cap.

The kit: the glide-frames check runs before the uncapped arm's series, the
uncapped side first and then the default; capVerdict's base is the uncapped
side, capped the default. `judge` names each side, and a record from the
fps60 arm (the earlier runs) reads with its own sides. The runbook follows.

The pose test, now uncapped against the default, still finds the same poses
(worst 2.1e-6 pt). swift test 612/612; node --test test/cursor-sitting 158/158.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…te click and drag as a stated gap

Sminos-Session: cursor235#b93055dd (cua on macbook)
…n's document

Twice on 2026-10-31 `up textedit` recorded the document window while
TextEdit's front window was its Open panel (47652 vs 47653, 47685 vs 47686),
so the kit's guards refused item 1 and a series. TextEdit reads the document
concurrently, so AppKit's launch step found no window open yet and raised the
app-centric Open panel in place of an untitled document.

At the source: `-NSRequiresOpenUntitledWindowAtLaunch NO`, in the process's
argument domain only. Read from AppKit (macOS 26.6.2, dyld_info
-disassemble): _handleAEOpenEvent's completion block calls _doOpenUntitled
(the panel, or an untitled document under
NSShowAppCentricOpenPanelInsteadOfUntitledFile NO) only when
_requiresOpeningUntitledWindowAtLaunch, an NSUserDefaults-read app config of
that key. NSShowAppCentricOpenPanelInsteadOfUntitledFile NO alone would only
swap the panel for an untitled window.

And `up` now records TextEdit's window only once it has been the process's
one on-screen window for 2.5 s (past the panel's 1.3 s), failing with the
windows' numbers when a second shows, and stopping the launch.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…he known limits

Sminos-Session: cursor235#b93055dd (cua on macbook)
…aunch without its Open panel

Sminos-Session: cursor235#b93055dd (cua on macbook)
…s app with its attachment

reappear set the screen and attachment from the request's app's last point but left
cursor.app naming the last pointer-action app, so a later display reconfiguration's
rescreen re-read the stale app's last point and moved the cursor there while it stayed
attached to the revived app's window. The request's app now goes into the reappearance
and is set with the attachment. Hub test: click in A, then B, fade, type in A, change the
display; the cursor stays at A's point.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…sh-document press_key reading named undetermined

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ene's off-screen window, the signposts kept on the MacBook

Sminos-Session: cursor235#b93055dd (cua on macbook)
…nch review's outcome, item 5's focus debt resolved

Sminos-Session: cursor235#b93055dd (cua on macbook)
…9235885 capped; item 1 refused before sending)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…, the gaps' tickets, M3 done, Outcomes & Retrospective

Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T23:32:03.523343Z e6394e2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…he owner's recording of the first sitting

Sminos-Session: cursor235#b93055dd (cua on macbook)
@SSFSKIM
SSFSKIM merged commit 7a24390 into main Nov 1, 2026
7 checks passed
SSFSKIM added a commit that referenced this pull request Nov 1, 2026
Brings main's #235 (cua's own macOS agent cursor, #240), #236's fix
(#241), #200 (#243) and #244 (#247) under M3, so M3's gate judges the
tree that ships. A merge, not a rebase: the spec and the evidence cite
this branch's commit SHAs.

The overlapping files and how each was resolved:
- src/runtime/launch.mjs (conflict): both sides kept. M3's Linux branch
  (cua's own service: CUA_SKY_SERVICE, CUA_ENGINE_BIN and
  CUA_DESKTOP_MODE for the cua selection, the vendor service and helper
  otherwise) beside #240's macOS branch, which adds the agent cursor's
  environment (cursorEnv) to cua's engine. The env header comment merged
  cleanly with both sides' entries.
- src/runtime/doctor-engine.mjs (auto-merged): #240's macOS row (the
  cursor switch in factsReport, cursorWords, settingsOf's cursor check)
  and M3's Linux row (service cua, capabilities, the IsEnabled row)
  touch separate functions; kept as merged.
- src/cua-api/sky.mjs and test/cua-api/sky.test.mjs (auto-merged):
  #241's fix for #236 (setupError exported, then/toJSON/symbols read
  undefined after a failed setup, the declared vendor difference and
  its settle test) beside M3.2's truncated-field scenario. Compatible
  by design: cua's Linux service's setup always resolves with the 20
  methods and keeps a failure for each method to refuse with, so the
  facade's setupError stays unset there; a setup that does throw now
  fails the bootstrap with its own error instead of hanging.
- tech-debt-tracker.md (conflict): every row from both sides kept,
  main's five newer rows first (74 at the base, +2 M3, +6 main = 82).
- .claude-plugin/plugin.json, marketplace.json (conflict): main's
  0.20.3 here; M3's own bump follows in its own commit.

Focused suites (services, facade, doctor, selection, harness, accept,
cursor) on the merged tree: 1948 pass, 8 fail; the same 8 fail on both
parents in this VM (umask 077 modes, macOS-only and env tests).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
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.

Visible agent cursor on macOS (opt-in overlay in cua's own engine at the agent's target point)

1 participant