Replies: 1 comment 1 reply
-
|
the mapping is the appealing part, and you've read it right. Tmux session-to-window really does line up with agterm's workspace-to-session, and the ephemeral-attach framing holds: restore wouldn't need to change, because persistence here is projection by omission, the same way scratch and overlay terminals already never survive a relaunch. The control coverage ( the blocker is the cost you flagged yourself: the libghostty patch. Agterm builds libghostty from upstream at a pinned SHA specifically so there's no fork and no prebuilt binary in the chain, and that's deliberate. A patch re-applied over the other thing: the main motivation, an agent in remote tmux surviving sleep and network drops and still drivable over the control API, already works today with no new code. weighing it: the part I'd sign up for (the model and control side) is the easy part, and the part that gates it (a standing libghostty patch) is exactly what I want to avoid. So as it stands I'm going to say this doesn't fit, not because the idea is wrong, the fit really is nice, but because the cost is concentrated in the one place the project is built to keep clean. What would change my answer is a way to feed a surface without a carried engine patch, e.g. ghostty proper growing a PTY-less or attach-an-fd surface API. If that existed, everything above that line becomes interesting again. If you wanted to pursue getting such an API upstream, I'd follow that with interest. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to propose native
tmux -CC(control mode) integration and check whether the directionfits agterm before investing in a PR.
The idea
Attach to a (remote or local) tmux session in control mode and present it natively:
tmux session → agterm workspace (ephemeral, never persisted), tmux window → agterm session,
rendered by real agterm surfaces, with input/resize round-tripped back to tmux. Detach, drop the
ssh connection, reattach later — remote processes survive.
Whatever one thinks of iTerm2 (and there's plenty to think), its
-CCmode is the one feature Igenuinely missed after leaving it — and I'm not aware of another macOS terminal that has it. It
would fit agterm's model unusually well, since the workspace → session hierarchy maps one-to-one
onto tmux's session → window.
On the README's "a tmux-style backend is out of scope" line: this wouldn't touch the restore
design. Restore still restores local shells, and the denylist still keeps multiplexers out of
auto-restart. Attach is an explicit opt-in action (a menu item + control commands); nothing
changes unless you use it.
My main motivation is agent workflows: an agent running inside remote tmux survives laptop sleep
and network drops, while the control API can attach to it and drive its windows as ordinary
sessions (
session.type,session.copy, status hooks). Naturally the feature would come withfull control-API/CLI coverage (
tmux.attach/detach/list/kill) and the usual keep-in-syncsurfaces.
Scope for a v1: no in-window splits (a split window shows its leading pane), one connection per
tmux session. The one architectural cost to flag up front: libghostty has no PTY-less surface /
"feed bytes to the screen" API, so painting tmux panes needs a small additive patch to the engine
(io/apprt layer only) applied over the pinned
GHOSTTY_REV— a maintenance cost on every revbump, and potentially upstreamable to ghostty itself.
Does this direction fit? I'm happy to do the work and would split it into small bottom-up PRs.
Beta Was this translation helpful? Give feedback.
All reactions