You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Command Code overwrites its process name with the terminal title #764
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 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.
Hello, @ogulcancelik Thanks for reaching out. Cool to see Command Code being added to Herdr. I am working on this right now. Any other blockers you see with integrating Command Code?
Additional data point from an end-to-end test (Command Code v1.50.0, Herdr 0.8.2 patched build, Linux), in case it helps the fix:
I ran Command Code in a Herdr pane and watched process identity over time:
During startup / -p (print) mode, the process is node /usr/bin/cmd ... — a normal node wrapper. A tool that inspects argv (or resolves the /usr/bin/cmd symlink to node_modules/command-code/dist/index.mjs) can identify it.
Once the TUI is up, process.title overwrite kicks in and both comm and /proc/<pid>/cmdline become the changing title (⌘ Command Code · <model>; comm truncated to 15 chars). The original argv is gone, so path/argv-based detection stops working mid-session.
So the window where process-based detection works is only startup and non-interactive runs. For a running TUI session, the process itself has to volunteer its identity.
One cheap option that requires no Herdr change: Herdr already reads a HERDR_AGENT=<agent> env hint from /proc/<pid>/environ (docs: "Set HERDR_AGENT= on the wrapper command to tell Herdr which existing agent screen manifest to use"). If Command Code sets HERDR_AGENT=command-code in its own environment whenever it detects HERDR_ENV=1 / HERDR_SOCKET_PATH in its parent environment, Herdr can keep treating the pane as Command Code for the whole session even after the process title is overwritten. The terminal title can keep changing freely.
Keeping process.title stable (e.g. command-code) would also work and is more generally useful for ps/supervisors, but the env hint is the minimal integration surface.
Activity
vipulgupta2048 commentedon Sep 2, 2026
Hello, @ogulcancelik Thanks for reaching out. Cool to see Command Code being added to Herdr. I am working on this right now. Any other blockers you see with integrating Command Code?
abuamar142 commentedon Sep 7, 2026
Additional data point from an end-to-end test (Command Code v1.50.0, Herdr 0.8.2 patched build, Linux), in case it helps the fix:
I ran Command Code in a Herdr pane and watched process identity over time:
-p(print) mode, the process isnode /usr/bin/cmd ...— a normal node wrapper. A tool that inspects argv (or resolves the/usr/bin/cmdsymlink tonode_modules/command-code/dist/index.mjs) can identify it.process.titleoverwrite kicks in and bothcommand/proc/<pid>/cmdlinebecome the changing title (⌘ Command Code · <model>;commtruncated to 15 chars). The original argv is gone, so path/argv-based detection stops working mid-session.So the window where process-based detection works is only startup and non-interactive runs. For a running TUI session, the process itself has to volunteer its identity.
One cheap option that requires no Herdr change: Herdr already reads a
HERDR_AGENT=<agent>env hint from/proc/<pid>/environ(docs: "Set HERDR_AGENT= on the wrapper command to tell Herdr which existing agent screen manifest to use"). If Command Code setsHERDR_AGENT=command-codein its own environment whenever it detectsHERDR_ENV=1/HERDR_SOCKET_PATHin its parent environment, Herdr can keep treating the pane as Command Code for the whole session even after the process title is overwritten. The terminal title can keep changing freely.Keeping
process.titlestable (e.g.command-code) would also work and is more generally useful forps/supervisors, but the env hint is the minimal integration surface.vipulgupta2048 commentedon Sep 10, 2026
Hello @ogulcancelik changes have been shipped to v1.50.1 - https://commandcode.ai/changelog#v1.50.1
I even shipped wiring to allow herdr to parse Command Code idle/busy states
Please reach out if you need more help