Open
Conversation
Mirrors the Unix dtach/tmux/screen integration for Windows: when psmux is installed and on PATH, okena auto-detects it and wraps non-WSL shells through `psmux new-session -A`, so PowerShell/cmd sessions survive okena restart and reconnect transparently. WSL terminals continue to use their own per-distro backend inside the distro. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
psmux new-session -A, so PowerShell/cmd sessions survive okena restart.Psmuxfor a WSL terminal falls back to dtach/tmux/screen inside WSL.winget install psmux/cargo install psmux/scoop install psmux), okena handles the rest. No manual attach.Implementation notes
SessionBackend::Psmux+ResolvedBackend::Psmuxvariants;Autoresolution prefers psmux on Windows, dtach > tmux > screen on Unix (unchanged).is_psmux_available()runspsmux -Vviacrate::process::command(CREATE_NO_WINDOW).build_commandfor Psmux: bypasses host shell (cmd.exe doesn't honor sh-style quoting);;is psmux's literal command separator when received as its own argv token.kill_session:psmux kill-session -t <name>.pty_manager::build_terminal_commandnow wraps non-WSL shells via host backend through awrap_with_host_backendclosure.Known limitations (documented in code)
default_shellsetting isn't propagated into psmux sessions — psmux uses its owndefault-shellfrom~/.psmux.conf(PowerShell out of the box). Custom command override viacmd.exe /cworks.Test plan
okena-terminaltests pass on Linux hostokena-workspacetests passokena-terminalcross-checks cleanly forx86_64-pc-windows-gnuresolve_for_wsl,build_wsl_session_command,kill_wsl_session) handle the new variant correctly🤖 Generated with Claude Code