Confirmed: two writable viewers can corrupt Vim input
Two isolated browser contexts viewing one real PTY both answer live terminal queries. In Vim 9.1, a duplicated mode-status reply causes a normal edit to save the wrong text. Independent Claude Opus 5.5 verification confirmed the effect and isolated the harmful response.
Supported contract and owner
The source exposes no elected protocol-reply owner. Each Ghostty handle has a reply callback; each writable web surface forwards it through ordinary terminal.write. The server writes both replies into the same PTY. Multi-view grid ownership is explicit, but reply ownership is absent. The supported application expectation is ordinary Vim editing remaining correct when another writable viewer attaches.
Boundary: renderer callback, per-handle dispatch, PTY write service. This is same-PTY fanout, not cross-terminal callback routing.
Real-client proof
Open a file containing alpha\n using vim -Nu NONE -n -i NONE. Type iHELLO, Escape, then :wq. Both contexts use the actual web app and separate browser storage and sockets, with shared fixture authentication. The second context also executes commands, establishing writable reachability.
| State | Saved text |
|---|
| One viewer | HELLOalpha\n |
| Two writable viewers, three trials | \nalpha\n |
Two viewers, Vim t_u7= | HELLOalpha\n |
| Second viewer closed | HELLOalpha\n |
A raw receiver emitting one live cursor-position request separately established reply fanout:
Correction: the harmful duplicate is DECRPM
A transparent PTY tap captured Vim's actual queries and received bytes. Replaying those bytes into bare Vim reproduced the failure with only a duplicated ESC[?12;2$y mode-status response. Duplicating either cursor-position response alone preserved the edit. Disabling t_u7 also removes Vim's DECRQM query, so that control does not isolate CPR. A CPR-only fix or test could miss the failure.
A temporary addition to the existing public Ghostty core test verifies one DECRQM response in a single-core control, then fails with two responses for the same query delivered to two cores sharing one input sink. This models aggregation; the actual two-client proof establishes reachability. Existing single-renderer query controls pass. All test edits were restored.
Late-viewer lifecycle control
After Vim completed, a passive raw PTY receiver emitted no queries. Opening a new isolated viewer produced zero unsolicited bytes. Closing and reopening its page also produced zero bytes. Surrounding live-query controls each received one reply. This establishes no replay-input failure for that flow; it does not establish correctness for every history or recovery path.
Duplicate audit and limits
Both-state eligible issue and PR searches found no owner for duplicate live replies. Trusted merged #24352 owns shared-grid sizing, not reply arbitration. Adjacent fish startup, setup color probes, retained-query stripping and saved-script process ownership do not cover this path. Unvouched PRs were excluded.
Actual-client verifier SHA: 304cf149c8cb5e2c1ab921428773361752d7aff2. Hunter reproduction: 6d3f6423a341. DECRQM owner test and late-viewer control: 449deb635ec0; subsequent relevant core changes concern modified F3 encoding, not generated replies.
Linux web and Vim 9.1 only. Desktop, native mobile, read-only viewers and other applications were not tested. Frequency depends on simultaneous writable views and applications issuing affected queries. Vim's internal key-decoding path was not traced. No performance claim.
Boat VMs bx_ykcqez7c, bx_amu6re98 and follow-up bx_kkyqejr2 were reset before their proofs, used serially per VM, and released. All owned browsers and servers ended. No fixes, filings, commits, pushes or top-level threads.
PostPlan uses fallback colors because the active client theme could not be read.