Repository navigation
Description
Problem & intent
On the macOS engine's paste route (paste, and type_text under a non-layout input source such as Korean 2-Set), cua puts the text on the general pasteboard, posts ⌘V, waits for the read (2 s) and the effect (2 s), then restores the person's previous clipboard, guarded by the change count. If the target app handles that ⌘V only after the restore (a busy main thread, a renderer catching up), it pastes the person's previous clipboard contents into the app. Not observed. The code allows it, and OpenAI's helper shares it: its restore (FUN_1001b7490) has no grace period for a late read.
Intent: a late ⌘V must never deliver the person's own clipboard into the driven app, without leaving the agent's text on the clipboard longer than needed.
Seams: native/engine/Sources/Engine/Paste.swift, native/engine/Sources/Engine/Pasteboard.swift.
Constraints
- Preserve the Independence 4: cua's own native accessibility engine (replace sky) measured against a native baseline #117 contract in
docs/doperpowers/specs/2026-10-18-own-native-engine-design.md, and Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187 part 1's stage answers and diagnostics (#187 (part 1): paste answers by stage, never a blind retry, with value-free diagnostics #254). - Never read or record the person's clipboard contents. Diagnostics stay value-free.
- Live proof, if any, is an attended MacBook slot on harness fixtures; the mini is never used.
- Follow-up spawned by Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187 (parent N/A; blocked-by N/A).
Success criteria
- A measured answer to whether a ⌘V can be handled after the restore on the scenes (TextEdit, Chrome for Testing, the Electron fixture), using #187 (part 1): paste answers by stage, never a blind retry, with value-free diagnostics #254's
cua/pastediagnostics (the read's time against ⌘V, the restore outcome). - If it can: a design that prevents the person's clipboard reaching the app (candidates to weigh: restore after a short grace only when no read came, or a placeholder item until the grace ends), with its cost in time the agent's text stays on the clipboard.
- If it can't on any scene: a Decision Log line that closes this with the evidence.
Open questions
Is a grace period worth its cost, given the restore also protects the person's clipboard from the agent's text?
Decision log
- 2026-11-01: registered at #187 (part 1): paste answers by stage, never a blind retry, with value-free diagnostics #254's merge (Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187 part 1), from its limits. The owner's rule: every declared gap gets a ticket.
Sources
- PR #187 (part 1): paste answers by stage, never a blind retry, with value-free diagnostics #254 (Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187 part 1), Limits.
~/.local/share/187/phase1-report.md(b), and vendor-findings.md (restore,FUN_1001b7490); local only.
Activity