consciousness/channels/tmux
Kent Overstreet 6e3bacb182 channel-tmux: resolve pane ids by label, don't persist them
tmux pane ids (%6 etc.) are ephemeral — recycled across pane and
tmux-server restarts. The daemon persisted the id in tmux.json5 and
kept reusing it, so after a restart a channel would attach to whatever
unrelated pane had since inherited that id. (Live: ktest's stored %6
had become a claude pane; the real ktest pane was %10.)

Persist only the label — the pane title / window name, which is
stable. pipe_pane_reader() is now a connect-retry loop: each attempt,
connect_and_stream() resolves the live id with find_pane_by_name(); the
loop retries until the pane exists and pipe-pane succeeds, and
reconnects the same way if the pipe later drops. send() resolves the id
at send time; open() just registers the label and lets the reader find
it.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-05-22 12:26:05 -04:00
..
src channel-tmux: resolve pane ids by label, don't persist them 2026-05-22 12:26:05 -04:00
Cargo.toml channels: improve tmux state tracking and config persistence 2026-04-12 20:11:34 -04:00