You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 38942a7
Browse filesBrowse the repository at this point in the historyBrowse files
fix(desktop): run an agent command on tmux that cannot tag its pane, untracked (#8705)
* fix(desktop): run an agent command on tmux that cannot tag its pane, untracked
Agent `run` inside tmux tagged its pane with a pane option (`set-option -p`,
tmux 3.0+) and refused the command when that failed, so on older tmux every
agent run failed, with the background executor off too.
A run whose pane cannot be tagged now goes ahead untracked: Stop, sign-out and
switching Terminal off leave it alone, since nothing could tell its pane from
one of the user's. Tagged runs are unchanged. The gate still holds every
command until the tagging call has finished.
* fix(desktop): report an untracked run a Stop could not end as still running, and reap it once its pane is gone
* fix(desktop): run untracked only on tmux without pane options, and reap and close finished untracked panes
- Only tmux before 3.0, which refuses `set-option -p` as an unknown flag or
invalid option, runs a command untracked. A tmux that can tag panes but did
not (it timed out, or failed otherwise) gets the run refused, as before, so
no command starts that Stop and sign-out could never end.
- tmux 3.x answers `display-message` for a pane that is gone with an empty line
rather than an error, so an untracked run's pane is gone unless tmux echoes
its id back.
- A finished untracked run's pane is closed, and a run that finishes after its
call returned has its pane closed when it is reaped, so dead panes kept by
`remain-on-exit` do not pile up.
* fix(desktop): close a finished untracked run's pane only when its start command proves it is the run's
* fix(desktop): recognise how real tmux before 3.0 refuses pane options, and use a separator no field can straddle
- Real tmux 2.9a refuses `set-option -p` with its own getopt's
`unknown option -- p` and set-option's usage line (BSD getopt on macOS:
`illegal option -- p`). The untracked fallback only matched later wordings,
so on real pre-3.0 tmux every run was refused. The fake tmux and the tests
now use the text captured from real 2.9a.
- The `-F` separator `|~sim~|` began and ended with the same character, so a
field ending in `|~sim~` was misread rather than dropped. `<~sim~>` has no
proper prefix that is also a suffix, so it is only found where it was
written or wholly inside a field, whose line is then dropped.
0 commit comments