Repository navigation
Description
libtmux needs waits that distinguish cooperative completion, currently visible text and future observed output. Matching a prompt, echoed command or quiet interval does not establish that an arbitrary shell command completed.
The first useful slices are independent:
- Cooperative channels: use existing
Server.wait_for; PR server(feat[wait]) Bound ordinary channel waits #809 adds an optional bounded ordinary wait without changing its blocking default. Do not introduce a competingwait_for_channelalias. A released channel waiter proves the channel signal, not successful application execution; producer status needs its own protocol. - Visible literal presence/absence: return the satisfying immutable observation and retain the last observation/original cause on failure. Bound capture/matching work and command lifetime, and distinguish no sample from empty text. Absence means absent in the selected sample.
- Future observed text/bytes: arm before triggering input, expose readiness, match across chunks and fail on source loss/gaps, missing targets, deadline or cancellation. Supply its own minimal private observation adapter if needed; Observe pane output as bytes with explicit subscription gaps #800 is a semantic owner, not a merge prerequisite.
Keep explicitly named sampled quiet/stable predicates separate from completion. Regex work needs an enforceable bound before it joins a public waiter contract. Pane process exit is another fact: retained dead-pane status may be read when explicitly configured, while a removed pane’s missed status is unknown. Changing remain-on-exit is a visible policy choice, and OSC completion requires admitted application/shell cooperation.
Do not use history_size + cursor_y as a lossless absolute anchor. PR #808 demonstrates substantial repeated output between identical capture/history/cursor observations. Native history counters may aid a qualified daemon/grid lifetime; unavailable or ambiguous evidence remains unknown. Cursor semantics belong to #740 and the ambiguity classification to #671.
The refreshed private owned-PTY consumer passes its 13 declared matcher/capture/group/reset assertions on current master with the recorded tmux 3.8a binary. Stronger production controls fail: cancelling a worker-thread command leaves its native client alive until controlled release, and a proposed injected engine can dispatch to daemon A while the private observer attaches to facade daemon B with the same numeric session ID. These failures remain recorded; successful matching alone does not qualify backend ownership or command cancellation.
No broader waiter PR is selected in this limited delivery. PR #594 remains a larger framework proposal. A standalone minimal waiter may use existing trunk primitives and private adapters, but must prove its own bounds, original errors, cleanup and borrowed-resource survival without an unmerged engine, deadline, snapshot or subscription dependency. PR #810 is a compatible proposed retained-value example, not a prerequisite. #584 owns richer retained failure evidence.
Historical prior art: cooperative MCP channels and capture-based MCP waits. The earlier proposal’s absolute-anchor claim is superseded by the counterexample above. Read-only locators, mouse/fill actions, complete graphs and wider application adapters remain follow-ups.
Track this under #629 and Python project 3; #456 records environment profiles, #689 owns native cancellation, #732 owns channel deadlines, and #803 owns ordered multi-pane operations. Preserve existing synchronous behavior and unknown submitted outcomes; never retry an uncertain accepted mutation. No macOS work, minimum-version change or upstream tracker write is included.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
capture_pane#456tony commentedon Nov 1, 2026
PARTIAL — qualification result; implementation remains open.
The refreshed private owned-PTY consumer passes all 13 declared matcher/capture/group/reset cases against unchanged master and the recorded tmux 3.8a binary. Cross-chunk matching, future-only matching and visible capture predicates are viable library work. The previous 12-trial receipts remain tied to their older prototype hash; the current hash differs and was tested separately.
The real worker-cancellation negative control fails owned-client cleanup, and an injected-engine probe shows the private observer can attach to the wrong facade daemon. Neither defect is fixed by matching visible text. Under the limited delivery rule, keep this implementation here without a new waiter PR. The useful cooperative slice is already PR #809 on existing Server.wait_for; do not add a competing wait_for_channel name. A future independently built visible predicate must bound its own command path, preserve original causes and satisfying/last immutable observations, and keep echo/erased output distinct from completion. Repeated-row captures in PR #808 refute the old absolute-anchor claim.
Evidence and canonical scope: existing channel path, bounded channel PR, trim counterexample, broader waiter candidate.