Skip to content

Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187

Closed

Description

@SSFSKIM

Problem & intent

Hold 3 records “Timed out waiting for the application to read the clipboard” in all 18 chrome/composing@textedit rows across the two cua runs. This is model-facing finding 2, also seen in hold 2b. Route 3 repaired other actions but not this path.

Seams: native/engine/Sources/Engine/Paste.swift, native/engine/Sources/Engine/Pasteboard.swift.

Constraints

Success criteria

  • Reproduce the condition with the run-owned page and intact source/focus readings.
  • Determine delivery versus focus/preparation versus acknowledgment failure; add a regression at that boundary rather than inflate the timeout.
  • All affected rows deliver exact text and complete clipboard consumption without moving user focus/frontmost/top window.
  • Preserve clipboard restoration, concealed-input and deadline safety.

Open questions

Absent clipboard read or missed acknowledgment? Do not equate this without evidence to #144, whose browser-service timer/wall-clock skew is different.

Decision log

Sources

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P1
    on Oct 22, 2026
  2. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    2026-10-23 cross-app evidence for the native clipboard read/effect boundary. Sources: /Users/new/Developer/GitHub/MAWS/plugin/cua/dogfood-feedback/l3-input.md §§1,4 and Learning the API; l6-artifacts.md §6; l9-browser-delivery.md §1. MAWS/Claude/Codex reported clipboard timeout, and a later retry sometimes duplicated text that had already arrived. Verdict: plausible shared paste acknowledgment/focus defect; a timeout is not proof zero bytes were delivered.

    Confirmed in Paste.swift: both provider.waitForRead failure and effect.wait failure throw the same clipboardReadTimedOut sentence; the latter is after clipboard handover and Cmd-V. entered advances only after both waits. Diagnostics should distinguish read vs effect timeout and state that dispatch may already have changed the field; inspect before retry. Keep #188’s preparation failure distinct. No evidence ties this to input-source switching (#186) or browser-service Deadline.race (#144).

    The report’s claim that native paste always bypasses the app’s paste handler is contradicted by its Cmd-V implementation. Do not prescribe raw clipboard manipulation as a universal fix. Add Electron/rich-editor evidence to the existing native paste investigation rather than a duplicate ticket. Recommended P1; no live proof added.

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

  3. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    Follow-up clipboard evidence: /Users/new/Developer/GitHub/MAWS/plugin/cua/dogfood-feedback/l6-artifacts.md added item 11, l1-sessions.md §7 and l5-code.md §5. Under Korean input, typeText hit clipboard timeouts; L5 also observed clipboardConflict. L6 found a newer clipboard value, then the assessor manually restored an earlier backup over it and subsequently put the newer value back. Do not quote the clipboard content or attribute that explicit manual overwrite to the engine.

    Confirmed code at d95261f: Input.swift routes unreliable/non-layout/non-ASCII-capable input-source conditions to Paste.swift (including Korean), not simply long text or every non-US keyboard. Paste.swift restores on success and EngineError paths; SystemPasteboard.restore in Pasteboard.swift checks changeCount against its own last write before clearing, and write uses the corresponding expected-count check. The report’s requested “restore only if still ours” protection already exists. A genuine race/Universal Clipboard interaction remains plausible but requires change-count/event evidence, not a pasted text dump.

    Add synthetic competing-writer tests and value-free restore/skipped-because-changed outcome diagnostics to this investigation. Do not advise agents to read/copy the owner’s clipboard to debug or to restore stale backups. A proposed noClipboard option must fail clearly when exact text cannot be delivered without clipboard; never silently send IME-sensitive physical keys. #189 retains the input-source contract, #207 the usage explanation. #177’s matching row is being corrected accordingly.

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

  4. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 1, 2026
  5. SSFSKIM commented on Nov 1, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: cursor235 (b93055dd): Phase 1 offline on the MacBook (delivery vs focus/preparation vs acknowledgment; timeout with delivered text; candidates; vendor's acknowledgment) per design session 1ea561bc:227; the mini is not used

  6. SSFSKIM commented on Nov 1, 2026

    @SSFSKIM
    OwnerAuthor

    Part 1 PR #254 (Refs, not Closes): paste answers by stage (clipboardReadTimedOut / pasteUnconfirmed / unconfirmed success gated on a read after Cmd-V), error text carries the stage and confirmed count, value-free diagnostics incl. the record-only keyFocusAtPaste predicate, deadline-bound waits. #187 stays in-progress until the attended MacBook slot's A/B (3b) or 3a's refusal settles delivery.

  7. added a commit that references this issue on Nov 1, 2026
  8. SSFSKIM commented on Nov 1, 2026

    @SSFSKIM
    OwnerAuthor

    Part 1 merged: PR #254 -> main 18cad98 (plugin 0.20.5). Paste answers by stage, no blind retry, value-free diagnostics, record-only keyFocusAtPaste. Still open: background Chrome delivery (3b: the vendor's activation click at AXActivationPoint on the paste route), to be decided by an attended MacBook slot (A/B); if it fails, a refusal closes #187 as a stated gap.

  9. 49 remaining items

  10. removed
    status:in-progress
    on Nov 5, 2026
  11. SSFSKIM commented on Nov 5, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: landed via #281 (evidence) on #261/#280's code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions