Summary
When creating a new session with an initial shell command, the window name often appears as pwsh (or the host shell) first, then updates to the expected name (e.g. the actual child process or command) after a short delay. This is confusing when the intent is to see the running command or program name immediately.
Environment
- Windows (ConPTY / PowerShell 7
pwsh as default shell)
automatic-rename enabled (typical default)
Steps to reproduce
-
Start a new session with a non-interactive command that stays running long enough to observe the status line / window list:
psmux new -s repro-timeout 'timeout /T 300 > NUL'
Or with a named session:
psmux new -s start-session-with-command 'timeout /T 300 > NUL'
-
Attach if you used -d, or watch the window name in the status bar / window list as the session starts.
Observed behavior
- The window name initially shows pwsh (or similar shell host name), not the command or executable you passed.
- After a noticeable delay, the name updates to reflect the foreground process / expected title.
Expected behavior
- The window name should reflect the initial command or the real foreground program without an intermediate misleading pwsh label (or should stabilize much faster), consistent with user expectations when launching a specific command in a new session.
Notes
- Reproducible when the initial command is executed via the default shell wrapper (e.g.
pwsh -Command "…"), so automatic rename may resolve to the shell process before the child process is visible in the process tree.
Summary
When creating a new session with an initial shell command, the window name often appears as pwsh (or the host shell) first, then updates to the expected name (e.g. the actual child process or command) after a short delay. This is confusing when the intent is to see the running command or program name immediately.
Environment
pwshas default shell)automatic-renameenabled (typical default)Steps to reproduce
Start a new session with a non-interactive command that stays running long enough to observe the status line / window list:
Or with a named session:
Attach if you used
-d, or watch the window name in the status bar / window list as the session starts.Observed behavior
Expected behavior
Notes
pwsh -Command "…"), so automatic rename may resolve to the shell process before the child process is visible in the process tree.