a73x

7d164858

docs: the README says what the last tile's exit really does

a73x   2026-08-28 19:53

Commit message
docs: the README says what the last tile's exit really does

The paragraph four above the chord table still promised the pre-branch
behaviour — `mux` ending with the shell's code when the last tile went. On
a terminal that exit leaves the empty wall with the picker over it; only a
piped `mux` still exits with the shell's code, which is the half scripts
read. And dropping a machine is the picker's `x` from inside the wall,
`mux hosts rm` from the command line — the old sentence knew only the CLI.

decisions.md records the one refusal that still ends mux: a birth the
daemon refuses from an empty terminal wall has no tile to hand it back to.

CLAUDE.md
Old New
@@ -119,8 +119,10 @@ real pty), `wsclient` (browser stand-in), `rawmode`, `delaypipe`, `render`.
119 while it is open (`Shared.picker_open`); the close bumps `repaint_gen`. 119 while it is open (`Shared.picker_open`); the close bumps `repaint_gen`.
120 An empty wall opens it ONCE by itself, so an Esc there leaves the 120 An empty wall opens it ONCE by itself, so an Esc there leaves the
121 one-line text; and on a TERMINAL the last tile's exit leaves that empty 121 one-line text; and on a TERMINAL the last tile's exit leaves that empty
122 wall rather than ending mux — a piped `mux` still exits with the shell's 122 wall rather than ending mux, as does a picker birth the daemon REFUSES
123 code, because scripts read it. 123 (`Tile.keeps_wall`, which `born_from` cannot say — the entry tile carries
124 the same null) — a piped `mux` still exits with the shell's code, because
125 scripts read it.
124 - **`Ctrl-\ x` ends a session; the daemon owns the two-step.** `end_req` 126 - **`Ctrl-\ x` ends a session; the daemon owns the two-step.** `end_req`
125 `0x11` / `end_reply` `0x94`, observer verbs. The daemon refuses a first 127 `0x11` / `end_reply` `0x94`, observer verbs. The daemon refuses a first
126 `x` on a session other clients hold and answers the count; the client 128 `x` on a session other clients hold and answers the count; the client
README.md
Old New
@@ -111,18 +111,20 @@ Because ending interrupts anyone else watching, the daemon refuses a first
111 reads `[1 other attached - x again to end]` — and a second `x` within three 111 reads `[1 other attached - x again to end]` — and a second `x` within three
112 seconds forces it. A shell that ignores the hangup is killed half a second 112 seconds forces it. A shell that ignores the hangup is killed half a second
113 later; there is no session that cannot be ended. Dropping a whole MACHINE 113 later; there is no session that cannot be ended. Dropping a whole MACHINE
114 is `mux hosts rm`, not a chord: it is rarer than ending a shell and must not 114 is not a chord: it is rarer than ending a shell and must not sit one key
115 sit one key from `n`. 115 from `n`. From inside the wall it is the picker's `x` (`Ctrl-\` `s`, then
116 `x`); from the command line it is `mux hosts rm`.
116 117
117 `x` ends a session, never a box. A daemon whose last session ends stays up 118 `x` ends a session, never a box. A daemon whose last session ends stays up
118 and empty, and the next `mux HOST` is born into it — so emptying a machine 119 and empty, and the next `mux HOST` is born into it — so emptying a machine
119 costs you nothing but the shell you meant to end. Ending the daemon itself 120 costs you nothing but the shell you meant to end. Ending the daemon itself
120 is `muxd stop`. 121 is `muxd stop`.
121 122
122 A session whose shell exits ends `mux` with that shell's exit code when it 123 A session whose shell exits takes its tile off the wall, with the tile that
123 was the only tile on the wall — so `mux` stays something you can put in a 124 ended saying so. On a terminal the LAST tile's exit leaves you on the empty
124 script — and drops you to the wall when it was not, with the tile that ended 125 wall with the picker over it, not back in your shell: `Ctrl-\` `d` is how
125 saying so. 126 you leave. A piped `mux` has no wall to leave you on, so it exits with that
127 shell's code — `mux` stays something you can put in a script.
126 128
127 The wheel goes to whatever is in front of it. At a shell prompt it moves 129 The wheel goes to whatever is in front of it. At a shell prompt it moves
128 mux's scrollback, three rows a notch. In a full-screen application that did 130 mux's scrollback, three rows a notch. In a full-screen application that did
docs/decisions.md
Old New
@@ -7339,6 +7339,13 @@ Tiles pause under it (`Shared.picker_open`, read under `paint_mu`); replicas
7339 stay hot, the close bumps `repaint_gen`, and the frame is hashed so the 7339 stay hot, the close bumps `repaint_gen`, and the frame is hashed so the
7340 per-host-per-second repaint cannot leave a terminal that never goes quiet. 7340 per-host-per-second repaint cannot leave a terminal that never goes quiet.
7341 7341
7342 A birth the daemon REFUSES, from Enter on an empty terminal wall, leaves the
7343 wall standing with the sentence on its one line. `born_from` cannot say that
7344 — the ENTRY tile of `mux TARGET` carries the same null and its refusal really
7345 is mux's, because a script reads that code — so `Tile.keeps_wall` does, set
7346 by `pickBirth` and read by `endAction` before the exit arm. A piped `mux` has
7347 no wall to leave standing and still exits with the code.
7348
7342 ## 2026-08-28 — a new tile takes the lowest free digit 7349 ## 2026-08-28 — a new tile takes the lowest free digit
7343 7350
7344 Reuse, not renumbering. `Ctrl-\ 1-9` addresses digits, so a digit an ended 7351 Reuse, not renumbering. `Ctrl-\ 1-9` addresses digits, so a digit an ended