Skip to content

process.title is set to version number instead of "claude", breaking tmux window names #49852

Closed as not planned

Description

@tim-hilde

Description

When Claude Code starts, it sets process.title to its version string (e.g. 2.1.112). On macOS (and Linux), Node.js propagates this to the OS-level process name via pthread_setname_np() / prctl(). Tools that read the process name — most notably tmux's automatic-rename — then display the version number as the window name instead of claude.

Steps to reproduce

  1. Open a tmux session with automatic-rename enabled (the default)
  2. Run claude in a pane
  3. Observe the window name becomes e.g. 2.1.112 instead of claude

Expected behavior

Window name shows claude (or claude code).

Actual behavior

Window name shows the version string, e.g. 2.1.112.

Root cause

process.title is being set to the version number. The fix is a one-liner:

// before
process.title = version; // e.g. "2.1.112"

// after
process.title = "claude";

Notes

Activity

  1. 0xbrainkid commented on Apr 17, 2026

    @0xbrainkid

    process.title being set to the version number (e.g., "1.2773.0") instead of "claude" is an agent identity display bug — terminal multiplexers, process managers, and monitoring tools that rely on process.title to identify the process will show a version string instead of the agent name.

    From a behavioral monitoring perspective, this breaks tmux window names, process list filtering (pgrep claude), and any tool that uses process title to identify Claude Code sessions. For users running multiple Claude Code sessions in a tmux setup, all tabs showing the same version string makes it impossible to distinguish sessions by name.

    The fix is a one-liner in the startup code:

    // Instead of:
    process.title = version;  // or whatever is setting it to the version
    
    // Use:
    process.title = `claude (${version})`;  // includes version for disambiguation
    // Or simply:
    process.title = "claude";

    The version is already visible in /status, --version, and the update notifications — it does not need to be the primary process title. The agent's name ("claude") should be the primary identifier in the process table.

    From an agent identity perspective, this is a minor but meaningful issue: an agent should be identifiable by its name in the operating system's process table, not by its version string. "claude" is the stable identity; the version is an attribute of that identity, not the identity itself.

  2. brian-deane-gusto commented on Apr 27, 2026

    @brian-deane-gusto

    Seeing this as well, would love a fix! ❤️

  3. brian-deane-gusto commented on Apr 27, 2026

    @brian-deane-gusto

    +1 — confirming on Claude Code 2.1.119 / tmux 3.6a (macOS).

    Concrete repro of the tmux symptom:

    $ tmux list-panes -aF '#{pane_current_command} | #{pane_title}'
    zsh       | <hostname>
    vim       | <hostname>
    2.1.119   | · Claude Code
    2.1.119   | ∗ Claude Code
    2.1.119   | ∗ <user task description>
    

    The tmux 3.6 stock automatic-rename-format is
    #{?pane_in_mode,[tmux],#{pane_current_command}}#{?pane_dead,[dead],} — it
    renders pane_current_command directly, so every claude window in the status
    bar collapses to <idx>:2.1.119*. Indistinguishable across multiple
    concurrent claude sessions.

    Tmux-side workaround for anyone hitting this before the fix lands:

    set -g automatic-rename-format '#{?pane_in_mode,[tmux],#{?#{m:*.*.*,#{pane_current_command}},claude:#{b:pane_current_path},#{pane_current_command}}}#{?pane_dead,[dead],}'

    Detects the version-shape via fnmatch *.*.* and substitutes
    claude:<cwd-basename>. Brittle by design — it stops triggering the moment
    process.title is fixed in this issue, which is exactly the point.

    🤖 Generated with Claude Code

  4. davidchambers commented on Apr 28, 2026

    @davidchambers

    I believe this to be a duplicate of #12433.

  5. github-actions commented on May 30, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  6. github-actions commented on Jul 30, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  7. locked as resolved and limited conversation to collaborators on Jul 30, 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

    area:tuibugSomething isn't workinghas reproHas detailed reproduction stepsstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions