Replies: 10 comments 9 replies
-
|
Thanks for exploring this - looks great. If workmux were to be multiplexer agnostic, this is probably the way to do it. I would still probably keep tmux as the "main" backend with the documentation and examples mainly focusing it, but would not mind introducing best-effort support for other multiplexers, I think. Alternative backends could have their own page in the documentation. Might start cherry-picking your commits at some point and see how it goes.
What is |
Beta Was this translation helpful? Give feedback.
-
Oh yeah, tmux is the "main", this should be seen as more experiment to open up workmux to more users.
yep, that sounds very reasonable.
yeah I tried hard to make the commits clear of their intention and the "progression". I would start with the I think you will hate
Note that on in wezterm (for my config)
NO! I think its a fools game to keep the file up to date. I think there really should be one source of truth and it should live on the "server". I first tried to put all sessions details etc in there thinking it would be awesome to have a persistent file. It was a nightmare. Just consider what happens when a user manually closes panes. Think about two claude session trying to update (possible with file locks but more complexity). I would recommend to skip with trying as hard as you can to put the truth of the sessions on the "server". In fact, I wonder if I can just just port over the status json file as a suffix at the end of tab_title. |
Beta Was this translation helpful? Give feedback.
-
|
@JeremyBYU Hey, I cherry-picked your 50b9be6 and started experimenting with using JSON files in {
"pane_key": {
"backend": "tmux",
"instance": "/private/tmp/tmux-501/default",
"pane_id": "%79"
},
"workdir": "/Users/raine/code/workmux__worktrees/state",
"status": "done",
"status_ts": 1768847345,
"pane_title": "⠐ Backend-agnostic state",
"pane_pid": 98659,
"command": "node",
"updated_ts": 1768847345
}There are probably some rough edges and I'll be running this branch to see how the approach works, but seems promising. If you think it makes sense, might be worth rebasing your wezterm changes on top of this. (I did remove some unused things from the cherry-picked refactor commit that were probably only used in later commits, so you might have to add them again.) |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for taking a look at this! I've been thinking about it more, and I'm still a bit hesitant about the file-based strategy. Though it is growing on me a bit after reading Moving to individual files per pane definitely helps with race condition concerns! That's a real improvement over a single registry file. But I keep getting stuck on this statement from the design:
I'm not sure this can fully be true in practice. Even with this design, reconciliation is still required on every read:
If the filesystem were truly the source of truth, we wouldn't need to validate it against the multiplexer. But we do and now we're also validating against live process lists. To me, that makes the filesystem more of a cache than a source of truth. Which raises my main question: what benefit is the cache giving us? If querying the multiplexer directly is already cheap, what do we gain by maintaining a parallel copy that needs reconciliation on every read? Maybe there's a use case where persistence across restarts matters more than I'm seeing? Or maybe the uniformity across backends (everything uses the same StateStore) is the real win, even if it means tmux/wezterm loses its native options approach? I think that might be the core tradeoff: unified storage vs best-fit-per-backend? The file approach gives consistency; the native approach lets each backend use what it's good at. Finally, the code itself looks great. The StateStore encapsulation is very clear, the atomic writes are solid, and the reconciliation logic is nicely isolated. I'm not questioning the implementation, just wondering if the pattern (constant reconciliation) is the right tradeoff. But I could be way off here! And I am starting to come around to it... |
Beta Was this translation helpful? Give feedback.
-
Not a big difference, except native @options auto-cleanup when panes die (sessions or manual close), whereas files need explicit pruning. But like I said, the implementation you arrived at handles this cleanly, the reconciliation is nicely isolated. I think what you have is great and I'll try to rebase off of it later. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
|
@raine , Ready for review: https://github.com/JeremyBYU/workmux/tree/jc/wezterm-new . I can PR if that is preferred, but you mentioned liking to cherry pick. 3 commits:
Built on top of the state branch as discussed. F |
Beta Was this translation helpful? Give feedback.
-
I think thats fair, but I would still allow some type of override for testing if possible. I can test both tmux and wezterm in the same wezterm terminal. However, thats a niche thing! Maybe just a simple environment variable? But leave it up to you! |
Beta Was this translation helpful? Give feedback.
-
|
@JeremyBYU WezTerm support is now in I actually tried it briefly and it seemed to work. There was initially some weirdness with a completed agent disappearing from dashboard but I couldn't reproduce it second time. Feel free to send future improvements as PRs, makes more sense from now on. |
Beta Was this translation helpful? Give feedback.
-
|
W00t! I will give it a try tomorrow sometime! |
Beta Was this translation helpful? Give feedback.
-
|
Its working great for me, no issues! |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
So I did something crazy: https://github.com/JeremyBYU/workmux/tree/jc/wezterm
The basic idea: make workmux backend-agnostic so it can work with tmux or WezTerm (or potentially other multiplexers in the future).
What I did:
Some interesting challenges with WezTerm:
Bonus feature: The dashboard now supports --all flag to view agents across all WezTerm workspaces (tmux sessions) at once, with a workspace column to show where each agent lives.
Also updated all tests to be backend-agnostic with a --backend pytest flag.
The WezTerm support is definitely alpha! Not everything is fully supported yet. But the core workflow works! Figured I'd put it out there in case anyone's interested or the maintainer(s) want to explore this direction.
Beta Was this translation helpful? Give feedback.
All reactions