main CHANGELOG.md
Eric Bower  ·  2026-08-11
  1# Changelog
  2
  3Use spec: https://common-changelog.org/
  4
  5## Staged
  6
  7### Added
  8
  9- We now track cwd changes via OSC7
 10- Replay window title on attach
 11- `ZMX_NO_DETACH_KEY` env var to disable `ctrl+\` keybinding
 12
 13### Fixed
 14
 15- Clear screen when switching sessions to prevent term state corruption
 16- Stray NUL byte in the OSC 7 sequence replayed on attach
 17- The OSC 7 cwd is now decoded before the chdir, so a new session can start in a directory whose name needed percent-encoding
 18
 19### Changed
 20
 21- Upgraded to zig v0.16
 22- `zmx list` replaced `start_dir` with `cwd`
 23- Storing 2k lines of scrollback buffer (like tmux) for each session
 24- ZMX_TASK_COMPLETED task marker now includes a 4ch hex id to ensure no collisions from nested task runs
 25  - `ZMX_TASK_COMPLETED:{id}:0`
 26
 27## v0.7.0 - 2026-07-23
 28
 29### Added
 30
 31- Label system for sessions:
 32  - `zmx set <name> k=v ...` to attach key=value labels to live sessions
 33  - `zmx set <name> key=` to remove a specific label (empty value = delete)
 34  - `zmx get <name>` to read labels from a session
 35  - `zmx get <name> key` to print a single value
 36  - `zmx clear <name>` to remove all labels
 37  - `zmx list` now shows labels by default as tab-separated fields
 38
 39### Fixed
 40
 41- `zmx run` will now detect heredocs and add the completion marker to a newline
 42- Race between `zmx kill X; zmx run X`
 43- Improved claim leader detection
 44- `zmx send` no longer claims client leadership or triggers a resize probe
 45- Improved `ctrl+\` key detection
 46- Support for linux kernel < 4.11 by avoiding statx calls
 47
 48### Changed
 49
 50- *BREAKING* We now store logs inside of `XDG_STATE_DIR`
 51- *BREAKING* `zmx run` when creating session it runs `bash` instead of `$SHELL`
 52  - There are just too many edge cases with tracking exit status in other shells which makes `zmx run` much less useful for task management.
 53  - This means when using `zmx run` the target shell must have support for `$?` exit code tracking
 54- *BREAKING* `zmx tail` now strips ansi escape codes
 55
 56## v0.6.0 - 2026-05-16
 57
 58### Added
 59
 60- `zmx send` send raw bytes to session without ZMX completion marker or auto-newline
 61- `zmx print` send raw bytes to client's stdout
 62- `zmx ls` is accepted as an alias for `zmx list`
 63- Added `--help` flag for all commands (it just returns the main help cmd for now)
 64
 65### Fixed
 66
 67- An idle daemon (no clients, no PTY traffic) used to ignore SIGTERM indefinitely.
 68- An idle attached client used to ignore SIGWINCH until the next keystroke or daemon output.
 69- Don't kill all sessions when `.Info` ipc event changed
 70- Reset terminal emulator to default state on detach
 71
 72### Changed
 73
 74- `zmx wait` output will tail the last 20 lines of every task that failed
 75- Detaching from a session will now do a full terminal reset
 76
 77## v0.5.0 - 2026-04-16
 78
 79### Added
 80
 81- New client leader policy: last client to send user input bytes (non-ansi escape codes) becomes the leader
 82  - The client leader controls resizing and any other terminal state changes
 83  - Non-leader clients are read-only until they send user input bytes and takeover leadership
 84  - When a leader is promoted we immediately resize to their window size
 85- `zmx attach` now lets users switch to another session from within a session
 86- `zmx tail` will receive all outout from sessions in read-only mode
 87- `zmx write` will pipe data from stdin, convert to base64, chunk, and send data through pty to write to a file
 88
 89### Changed
 90
 91- *BREAKING* `zmx run` is now synchonous by default and tails the session
 92  - Use detached mode (`-d`) for previous behavior
 93- *BREAKING* `kill` and `wait` now require "\*" suffix for wildcard match sessions
 94  - e.g. `zmx kill "d.*"`, `zmx kill "*"`, `zmx wait "test*"`
 95- `zmx run` accepts `--fish` flag to indicate the session's shell is fish
 96- `zmx kill` now supports multiple args and it will kill sessions that match a prefix
 97  - e.g. `zmx kill "d.*"` will kill all sessions that match that prefix
 98
 99### Fixed
100
101- `zmx list` will send "no sessions found" to stderr instead of stdout
102- `zmx wait` will send errors to stderr instead of stdout
103- Rewrite OSC `133;A` with `redraw=0` to prevent prompt loss on resize
104
105## v0.4.2 - 2026-03-18
106
107### Changed
108
109- `zmx list` renamed keys and made formatting more stable
110- More accurate fish completions
111
112### Fixed
113
114- Validate session name length against Unix socket path limit
115- Use platform-correct `O_NONBLOCK` for fcntl
116- Daemon ignore `SIGPIPE`, handle `EINTR` in poll
117- Daemon isolate forked child from parent code path and heap-alloc argv
118- `zmx run` stdin regression with `ZMX_TASK_COMPLETED`
119- `zmx run` when no client is attached, send DA response query from daemon
120- `zmx run` re-quote when using shell meta chars
121- `zmx wait` use-after-free
122- `zmx wait` time out after 3 polls if no matching sessions are found
123- `zmx list` clean up socket on `ConnectionRefused`, not `Timeout`
124
125## v0.4.1 - 2026-02-23
126
127### Fixed
128
129- Update `libghostty` to fix `zig build test`
130
131## v0.4.0 - 2026-02-20
132
133### Added
134
135- New environment variable `ZMX_SESSION_PREFIX` which will be inserted before every session name for every command
136- New command `zmx wait` which will stall until all tasks (`zmx run`) are completed.
137
138### Changed
139
140- `zmx version` now returns the socket and log directory locations
141- `zmx run` now inserts a `ZMX_TASK_COMPLETED` marker after every run command to indicate when the task is completed and then returns the aggregate exit status
142
143### Fixed
144
145- `libghostty` had a regression that caused `zmx` to crash
146
147## v0.3.0 - 2026-02-01
148
149### Added
150
151- New flag `--vt` for `zmx [hi]story` which prints raw ansi escape codes for terminal session
152- New flag `--html` for `zmx [hi]story` which prints html representation of terminal session
153- New list flag `zmx [l]ist [--list]` that lists all session names with no extra information
154- New command `zmx [c]ompletions <shell>` that outputs auto-completion scripts for a given shell
155- List command `zmx list` now shows `started_at` showing working directory when creating session
156- List command `zmx list` now shows `cmd` showing command provided when creating session
157- List command `zmx list` now shows `→` arrow indicating the current session
158
159### Fixed
160
161- On restore, background colors for whitespace now properly filled
162- Spawn login shell instead of normal shell
163- Properly cleanup processes (parent and children) during `zmx kill` or SIGTERM
164
165## v0.2.0 - 2025-12-29
166
167### Added
168
169- New command `zmx [hi]story <name>` which prints the session scrollback as plain text
170- New command `zmx [r]un <name> <cmd>...` which sends a command without attaching, creating session if needed
171- Use `XDG_RUNTIME_DIR` environment variable for socket directory (takes precedence over `TMPDIR` and `/tmp`)
172
173### Changed
174
175- Updated `ghostty-vt` to latest HEAD
176
177### Fixed
178
179- Restore mouse terminal modes on detach
180- Restore correct cursor position on re-attach
181
182## v0.1.1 - 2025-12-16
183
184### Changed
185
186- `zmx list`: sort by session name
187
188### Fixed
189
190- Send SIGWINCH to PTY on re-attach
191- Use default terminal size if cols and rows are 0
192
193## v0.1.0 - 2025-12-09
194
195### Changed
196
197- **Breaking:** unix socket and log files have been moved from `/tmp/zmx` to `/tmp/zmx-{uid}` with folder/file perms set to user
198
199If you upgraded and need to kill your previous sessions, run `ZMX_DIR=/tmp/zmx zmx kill {sesion}` for each session.
200
201### Added
202
203- Use `TMPDIR` environment variable instead of `/tmp`
204- Use `ZMX_DIR` environment variable instead of `/tmp/zmx-{uid}`
205- `zmx version` prints the current version of `zmx` and `ghostty-vt`