Skip to content

Codex agent toolbelt does not appear on Linux because Node.js script process shows as 'node' not 'codex' #9870

@JangMan-J

Description

@JangMan-J

Summary

On Linux, the Codex CLI agent toolbelt never appears when running codex inside a Warp terminal. The root cause is that codex is a Node.js shebang script (#!/usr/bin/env node), so the OS process name (/proc/PID/comm) is always node, not codex. Warp's agent detection matches against comm/argv[0], which resolves to node for any Node.js script — so the toolbelt is never triggered.

Problem

Warp detects CLI agents by observing the foreground process name in the terminal session. On Linux, /proc/PID/comm is initialised from the basename of the executable (i.e. node), not from argv[0] or the symlink name used to invoke the script. Because codex is installed as:

/usr/local/bin/codex -> ../lib/node_modules/@openai/codex/bin/codex.js

...and codex.js has the shebang #!/usr/bin/env node, the foreground process that Warp observes is:

  • /proc/PID/comm = node
  • argv[0] = node
  • argv[1] = /usr/local/bin/codex

Warp never sees a process named codex, so the toolbelt does not activate. The issue does not reproduce on macOS where process naming for shebang scripts behaves differently.

Additionally, codex.js does not call process.title = 'codex' anywhere in its source, which is the Node.js mechanism that calls prctl(PR_SET_NAME, ...) on Linux and would update /proc/PID/comm to codex at runtime.

Expected behavior

The Codex agent toolbelt should appear at the bottom of the Warp pane when codex is launched inside a Warp terminal on Linux, matching the behaviour on macOS.

Actual behavior

The toolbelt never appears. All other settings are correctly configured:

  • agents.third_party.should_render_cli_agent_toolbar = true
  • agents.third_party.cli_agent_toolbar_enabled_commands.codex = "Codex"
  • TERM_PROGRAM=WarpTerminal, WARP_CLI_AGENT_PROTOCOL_VERSION=1 are set in the shell environment
  • Warp shell integration marker (SourcedRcFileForWarp) is present in ~/.bashrc

Reproduction steps

  1. Install Warp Preview on Ubuntu Linux (apt, x86_64).
  2. Install Codex CLI via npm install -g @openai/codex.
  3. Open a new Warp terminal window.
  4. Run codex in the foreground.
  5. Observe that no agent toolbelt appears at the bottom of the pane.

To confirm the process name issue independently:

# Create a shebang script and symlink, identical to how codex is installed
TMPSCRIPT=$(mktemp /tmp/codex_sim_XXXXXX.js)
printf '#!/usr/bin/env node\nsetTimeout(()=>{}, 5000);\n' > "$TMPSCRIPT"
chmod +x "$TMPSCRIPT"
TMPSYM=$(mktemp -u /tmp/codex_XXXXXX)
ln -s "$TMPSCRIPT" "$TMPSYM"
"$TMPSYM" &
SIM_PID=$!
sleep 0.3
cat /proc/$SIM_PID/comm   # prints: node
tr '\0' ' ' < /proc/$SIM_PID/cmdline  # prints: node /tmp/codex_...
kill $SIM_PID

Artifacts

None attached.

Warp version

0.2026.04.27.15.33.preview.02 (Warp Preview, installed via apt from releases.warp.dev/linux/deb preview/main)

Operating system

Ubuntu Linux, kernel 7.0.0-14-generic, x86_64. Wayland (GNOME Shell). Node.js shebang scripts present this process-naming behaviour on all Linux distributions.

Possible source references

  • Agent detection logic likely reads /proc/PID/comm or argv[0] to identify the foreground process. Extending the match to also check argv[1] (the script path) when argv[0] is node (or another JS/Python runtime) would cover this case.
  • The cli_agent_toolbar_enabled_commands setting in settings.toml maps codex = "Codex", suggesting the detection key is the literal string codex — which will never match /proc/PID/comm for a Node.js script on Linux.
  • Workaround: adding process.title = 'codex' to /usr/local/lib/node_modules/@openai/codex/bin/codex.js causes Node.js to call prctl(PR_SET_NAME, 'codex') on Linux, updating /proc/PID/comm to codex and unblocking detection. The correct fix is either in Warp's detection logic or upstream in the Codex CLI package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.bugSomething isn't working.duplicateThis issue or pull request already exists.os:linuxLinux-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions