Skip to content

Window name briefly shows pwsh when starting a session with an initial command #229

@pbolduc

Description

@pbolduc

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

  1. 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'
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions