fix: v2.5.7 — panes work on psmux, the Windows tmux

psmux (the WinGet `tmux` on Windows) has no `=name` exact-match targets: it
answered "no server running on session '=agenthub-lane-1'" for a live pane,
so every Windows start reported "the session's command exited as soon as it
started" while the session ran on, and the browser could not attach.

- server/lib/tmux.js: `session`/`pane` targets probe the first live session
  once — `=name` failing where the bare name answers means bare names from
  then on; real tmux keeps `=name` / `=name:` (it matches by prefix otherwise)
- pty-attach.js and cc-update-all-helper.js use the same targets
This commit is contained in:
2026-10-06 23:56:12 +07:00
parent fcf8d8010a
commit 4163f431bb
9 changed files with 88 additions and 13 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ function attach(ws, runId, { cols, rows }) {
} catch {
/* session gone or tmux unavailable — attach below will surface that */
}
const pty = spawnImpl(attachBinary(), ["attach-session", "-t", `=${runId}`], {
const pty = spawnImpl(attachBinary(), ["attach-session", "-t", tmux.session(runId)], {
name: "xterm-256color",
cols: cols || 80,
rows: rows || 24,