Summary
I maintain Herdr, a terminal runtime that detects coding agents from the foreground process.
I’m trying to add Command Code support, but Command Code replaces its process name and command line with the current terminal title. That title changes with the project or session, so there is no stable name Herdr can detect.
Expected Behavior
Command Code should keep a stable process name such as command-code. The terminal tab title can still show the project or session name through the normal OSC escape sequence.
Actual Behavior
I launched Command Code with command-code. Once the UI started, Linux reported:
comm: ⌘ Command Cod
cmdline: ⌘ Command Code · review-pr-3332-command-code
exe: /home/can/.local/share/fnm/node-versions/v24.15.0/installation/bin/node
The original command and node_modules/command-code/dist/index.mjs path are both gone. Linux truncates the changing title even further in comm.
The published package appears to couple the terminal title and process title:
function writeTitle(title) {
setProcessTitle(title)
process.stderr.isTTY && process.stderr.write(oscTitle(title))
}
Steps to reproduce the issue
-
Start Command Code on Linux:
-
From another terminal, inspect the process:
pid=$(pgrep -n -f 'Command Code ·')
ps -p "$pid" -o comm=,args=
tr '\0' ' ' < "/proc/$pid/cmdline"
readlink "/proc/$pid/exe"
-
The process name and command line now contain the changing terminal title instead of a stable Command Code identity.
Command Code Version
1.38.1
Operating System
Linux
Terminal/IDE
Ghostty, running through Herdr
Shell
zsh
Additional context
The npm aliases cmd, cmdc, command-code, and commandcode all end up with the same changing process title.
Could you keep process.title stable as command-code, or stop changing it? The terminal title can continue changing independently. Without a stable process identity, I can’t add reliable Command Code detection to Herdr.
More generally, using a changing terminal title as the process identity makes Command Code harder to inspect, monitor, and integrate with using standard CLI tooling such as ps, top, and process supervisors.
Summary
I maintain Herdr, a terminal runtime that detects coding agents from the foreground process.
I’m trying to add Command Code support, but Command Code replaces its process name and command line with the current terminal title. That title changes with the project or session, so there is no stable name Herdr can detect.
Expected Behavior
Command Code should keep a stable process name such as
command-code. The terminal tab title can still show the project or session name through the normal OSC escape sequence.Actual Behavior
I launched Command Code with
command-code. Once the UI started, Linux reported:The original command and
node_modules/command-code/dist/index.mjspath are both gone. Linux truncates the changing title even further incomm.The published package appears to couple the terminal title and process title:
Steps to reproduce the issue
Start Command Code on Linux:
From another terminal, inspect the process:
The process name and command line now contain the changing terminal title instead of a stable Command Code identity.
Command Code Version
1.38.1
Operating System
Linux
Terminal/IDE
Ghostty, running through Herdr
Shell
zsh
Additional context
The npm aliases
cmd,cmdc,command-code, andcommandcodeall end up with the same changing process title.Could you keep
process.titlestable ascommand-code, or stop changing it? The terminal title can continue changing independently. Without a stable process identity, I can’t add reliable Command Code detection to Herdr.More generally, using a changing terminal title as the process identity makes Command Code harder to inspect, monitor, and integrate with using standard CLI tooling such as ps, top, and process supervisors.