Skip to content

Durable sessions (step5): keep-running session-host spike (tmux vs psmux)#441

Open
DDKinger wants to merge 1 commit into
dev/yuazha/durable-workspacesfrom
dev/yuazha/durable-keeprunning-spike
Open

Durable sessions (step5): keep-running session-host spike (tmux vs psmux)#441
DDKinger wants to merge 1 commit into
dev/yuazha/durable-workspacesfrom
dev/yuazha/durable-keeprunning-spike

Conversation

@DDKinger

Copy link
Copy Markdown
Contributor

Durable sessions — step5 (spike, stacked on step4)

Base branch: dev/yuazha/durable-workspaces (step4). Docs-only.

Investigation for the hardest durable-sessions requirement — keep running in the background (tmux-style detach/reattach). Adds doc/specs/durable-sessions-keep-running-spike.md.

Findings (both verified live on a dev machine)

  • Native tmux on Windows: not viable. POSIX-only; runs only under WSL/Cygwin/MSYS2, and a WSL tmux can't own native Windows shells. tmux -CC control mode is iTerm2/macOS-only — no Windows terminal ships a -CC client.
  • psmux is viable (native Windows, Rust, ConPTY, MIT, tmux-compatible). Verified: a detached session survives its creator (new-session -dls still lists it), and psmux speaks the tmux control protocol (psmux -CC emits %begin/%window-add). It is the "persistent local session host" the spec describes, and it already exposes the -CC transport we'd attach/detach over.

Recommendation

Adopt psmux as the keep-running session host; prototype WT as a psmux -CC control-mode client (modeled on iTerm2's tmux integration, reusing our ConPTY/TermControl + per-tab routing), gated behind the "continue running commands" startup setting. A transparent session-wrapping fallback (Option B) is documented for a faster proof of the detach/reattach lifetime.


1. Can we just run **tmux** on Windows (and drive it via `tmux -CC` control
mode, the way iTerm2 does)?
2. If not, is **[psmux](https://github.com/psmux/psmux)** a viable session host?

1. Can we just run **tmux** on Windows (and drive it via `tmux -CC` control
mode, the way iTerm2 does)?
2. If not, is **[psmux](https://github.com/psmux/psmux)** a viable session host?

1. Can we just run **tmux** on Windows (and drive it via `tmux -CC` control
mode, the way iTerm2 does)?
2. If not, is **[psmux](https://github.com/psmux/psmux)** a viable session host?
* Conclusion: "just run tmux" forces a WSL dependency and still can't host
native Windows shells. **Rejected** for the durable-sessions session host.

## Q2 — psmux: **Yes**, and it already speaks control mode

## Q2 — psmux: **Yes**, and it already speaks control mode

[psmux](https://github.com/psmux/psmux) ("the native Windows tmux, born in
that uses **Windows ConPTY directly** — no WSL/Cygwin/MSYS2 — and implements the
tmux command language and control protocol.

### Verified on a dev machine (already installed via winget `marlocarlo.psmux`, exposed as `tmux.exe`)
## Risks / open questions

* **Third-party dependency.** psmux is MIT but young; adopting it means vetting,
version-pinning, vendoring/attribution (same process as the Rust crates in
@github-actions

This comment has been minimized.

@DDKinger
DDKinger force-pushed the dev/yuazha/durable-workspaces branch from f4a327c to b8a7a0a Compare July 18, 2026 02:22
… vs psmux)

Investigation for the durable-sessions 'keep running in the background'
(tmux-style detach) requirement. Adds doc/specs/durable-sessions-keep-running-spike.md.

Findings (both key capabilities verified live on a dev machine):
- Native tmux on Windows is not viable (WSL/Cygwin/MSYS2 only; tmux -CC control
  mode is iTerm2/macOS-only, no Windows terminal ships a -CC client; a WSL tmux
  can't own native Windows shells).
- psmux (native Windows, Rust, ConPTY, MIT) IS a viable session host: detached
  sessions survive their creator (verified via new-session -d + ls) and it
  speaks the tmux control protocol (verified: psmux -CC emits %begin/%window-add).
  It is exactly the 'persistent local session host' the spec calls for.

Recommends adopting psmux as the keep-running session host and prototyping WT as
a psmux -CC control-mode client (modeled on iTerm2's tmux integration), gated
behind the 'continue running commands' startup setting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99c4f6fb-6ea5-4902-aa34-a68733db9393
@DDKinger
DDKinger force-pushed the dev/yuazha/durable-keeprunning-spike branch from 321f7fb to 6ccad2e Compare July 18, 2026 02:22
@github-actions

Copy link
Copy Markdown

@check-spelling-bot Report

⚠️ Dictionary not found

Problems were encountered retrieving check dictionaries (cspell:cpp/src/lang-jargon.txt cspell:public-licenses/src/generated/public-licenses.txt cspell:node/dict/node.txt cspell:golang/dict/go.txt cspell:scala/dict/scala.txt cspell:clojure/src/clojure.txt cspell:elixir/dict/elixir.txt cspell:python/src/python/python-lib.txt cspell:python/src/python/python.txt cspell:monkeyc/src/monkeyc_keywords.txt cspell:cpp/src/ecosystem.txt cspell:sql/src/tsql.txt cspell:swift/src/swift.txt cspell:php/dict/php.txt cspell:lua/dict/lua.txt cspell:k8s/dict/k8s.txt cspell:npm/dict/npm.txt cspell:software-terms/dict/webServices.txt cspell:rust/dict/rust.txt cspell:cpp/src/people.txt cspell:latex/dict/latex.txt cspell:redis/dict/redis.txt cspell:java/src/java-terms.txt cspell:cpp/src/compiler-gcc.txt cspell:powershell/dict/powershell.txt cspell:css/dict/css.txt cspell:cpp/src/template-strings.txt cspell:html/dict/html.txt cspell:cpp/src/stdlib-cpp.txt cspell:django/dict/django.txt cspell:public-licenses/src/additional-licenses.txt cspell:dart/src/dart.txt cspell:java/src/java.txt cspell:svelte/dict/svelte.txt cspell:python/src/additional_words.txt cspell:fullstack/dict/fullstack.txt cspell:sql/src/sql.txt cspell:typescript/dict/typescript.txt cspell:cpp/src/stdlib-cmath.txt cspell:gaming-terms/dict/gaming-terms.txt cspell:cpp/src/lang-keywords.txt cspell:python/src/common/extra.txt cspell:haskell/dict/haskell.txt cspell:dotnet/dict/dotnet.txt cspell:cpp/src/compiler-clang-attributes.txt cspell:ada/dict/ada.txt cspell:cpp/src/compiler-msvc.txt cspell:shell/dict/shell-all-words.txt cspell:software-terms/dict/softwareTerms.txt cspell:ruby/dict/ruby.txt cspell:docker/src/docker-words.txt cspell:r/src/r.txt cspell:cpp/src/stdlib-c.txt cspell:cpp/src/stdlib-cerrno.txt).

⚠️ For more information, see check-dictionary-not-found.

🔴 Please review

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

Unrecognized words (4)

marlocarlo
psmux
shellsession
vendoring

These words are not needed and should be removed AHP Backgrounder CANTCALLOUT Ccc cplusplus ctl Debian dotnet drv endptr EOFs evt Fullwidth gitlab hdr idl IME inbox ININPUTSYNCCALL INJ intelligentterminal Ioctl KVM lbl lld lsb NODEFAULT NONINFRINGEMENT notif oss outdir Podcast pri prioritization rcv segfault SND sourced SWP Tbl testname transitioning unk unparseable unregisters Virt VMs webpage websites WINVER xsi

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:microsoft/intelligent-terminal.git repository
on the dev/yuazha/durable-keeprunning-spike branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/intelligent-terminal/actions/runs/29626926862/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (2090) from .github/actions/spelling/expect/alphabet.txt .github/actions/spelling/expect/expect.txt .github/actions/spelling/expect/web.txt and unrecognized words (4)

Dictionary Entries Covers Uniquely
cspell:csharp/csharp.txt 32 2 2
cspell:aws/aws.txt 232 2 2
cspell:fonts/fonts.txt 536 1 1

Consider adding to the extra_dictionaries array (in the .github/actions/spelling/config.json file):

    "cspell:csharp/csharp.txt",
    "cspell:aws/aws.txt",
    "cspell:fonts/fonts.txt",

To stop checking additional dictionaries, put (in the .github/actions/spelling/config.json file):

"check_extra_dictionaries": []
Warnings ⚠️ (1)

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

⚠️ Warnings Count
⚠️ check-dictionary-not-found 54

See ⚠️ Event descriptions for more information.

✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

An error occurred while trying to automatically change base from dev/yuazha/durable-workspaces to dev/yuazha/durable-agent-display July 19, 2026 12:38
An error occurred while trying to automatically change base from dev/yuazha/durable-workspaces to dev/yuazha/durable-agent-display July 19, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants