Skip to content

process.title on Windows returns different value in v24.16.0 vs 24.15.0 #63858

Description

@jfeingold35

Version

v24.16.0

Platform

Microsoft Windows NT 10.0.26200.0 x64

Subsystem

No response

What steps will reproduce the bug?

STR:

  1. On Windows, install node v24.15.0 either directly or through nvm-windows.
  2. Open Powershell and run node
  3. process.title, and observe that the result is something like "Windows Powershell".
  4. Install node v24.16.0.
  5. Repeat steps 2-3

How often does it reproduce? Is there a required condition?

It happens every time.

What is the expected behavior? Why is that the expected behavior?

EXPECTED: The output should be "Windows Powershell" as it was in every version prior to this. Otherwise, I'm unsure of how Node running on a Windows machine can know whether it was instantiated in Powershell or CMD.

What do you see instead?

ACTUAL: The output will be the path to 'node.exe'.

Additional information

No response

Activity

  1. changed the title [-]`process.title()` on Windows returns different value in v24.16.0 vs 24.15.0[/-] [+]`process.title` on Windows returns different value in v24.16.0 vs 24.15.0[/+] on Jun 11, 2026
  2. MikeMcC399 commented on Jun 12, 2026

    @MikeMcC399
    Contributor

    I can reproduce. I used the msi packages to avoid any interaction with nvm-windows

    Execute: node -p "process.title"

    Windows 11 25H2

    Terminal Node.js 24.15.0 Node.js 24.16.0
    Git Bash MINGW64:/c/Users/mikem C:\Program Files\nodejs\node.exe
    Windows PowerShell Windows PowerShell C:\Program Files\nodejs\node.exe
    PowerShell PowerShell C:\Program Files\nodejs\node.exe
    cmd Command Prompt - node -p "process.title" C:\Program Files\nodejs\node.exe

    and just for comparison:

    Ubuntu 24.04 LTS

    Terminal Node.js 24.15.0 Node.js 24.16.0
    bash node node
  3. richardlau commented on Jun 12, 2026

    @richardlau
    Member

    Suspect this is libuv/libuv#5023 included in the libuv update.

    cc @StefanStojanovic

  4. MikeMcC399 commented on Jun 12, 2026

    @MikeMcC399
    Contributor

    Confirmed with bisect to 493ac40e12 from #61829 (which was also landed into Node.js 26.0.0)

  5. StefanStojanovic commented on Jun 16, 2026

    @StefanStojanovic
    Contributor

    Thanks for the detailed check @MikeMcC399. Yes, you are both correct about the reason for this change. However, this is a fix, as what we had before (for a long time) was incorrect, and the Windows implementation is now in line with Linux. I'm aware that when something works in a certain way for a long time, even if it is incorrect, it becomes the accepted and expected behavior, but that doesn't change the fact that it was wrong.

    Based on the issue description, it seems the old behavior was used to determine whether Node was running in CMD, PowerShell, etc. While it probably worked in most cases, there were never any guarantees for it (eg. if Window Title was changed before starting node.exe, it could have shown anything).

  6. MikeMcC399 commented on Jun 16, 2026

    @MikeMcC399
    Contributor

    The docs https://nodejs.org/docs/latest-v24.x/api/process.html#processtitle don't support the assumption that process.title could be used on Windows to determine which type of terminal window was in use. So probably this should be closed.

    It does make more sense to me to have the outputs of Windows and Linux aligned.

  7. StefanStojanovic commented on Jun 24, 2026

    @StefanStojanovic
    Contributor

    Since there was no comment from the issue opener, I'm closing the issue.

  8. added
    windowsIssues and PRs related to the Windows platform.
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions