codex process title shows as "node", should probably be "codex"

Open 💬 3 comments Opened Mar 19, 2026 by haraschax

This patch fixes:
```diff
diff --git a/codex-cli/bin/codex.js b/codex-cli/bin/codex.js
index 67ab3e2d9..3e0f8570e 100755
--- a/codex-cli/bin/codex.js
+++ b/codex-cli/bin/codex.js
@@ -7,6 +7,9 @@ import { createRequire } from "node:module";
import path from "path";
import { fileURLToPath } from "url";

+process.title = "codex";
+
// __dirname equivalent in ESM
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
```

see in image below my tmux pane one is stock codex. Pane 2 is clode. And pane 3 is my codex fork with the applied patch

<img width="800" height="490" alt="Image" src="https://github.com/user-attachments/assets/c9f36536-6a42-4c10-b06f-aafb10537952" />

View original on GitHub ↗

3 Comments

haraschax · 5 months ago

Tried to make a PR with the patch, but it seems that I am not allowed to

mvanhorn · 5 months ago

I've prepared a fix for this in branch mvanhorn:fix/process-title-codex: adds process.title = "codex" after imports in codex-cli/bin/codex.js. PR creation is blocked by org OAuth policy, but the branch is ready at https://github.com/mvanhorn/codex/tree/fix/process-title-codex

middleDuckAi · 5 months ago

Repro

  • Reproduced the launcher-side process-title mismatch on current main.
  • Process listings were showing node even when the Codex launcher was the process users actually invoked.

Root Cause

  • The Node launcher was inheriting the default process title.
  • I prepared a launcher-only fix that sets process.title = "codex", keeps the change behind a tiny helper, and adds builtin Node coverage for that helper.

Validation

  • node --check codex-cli/bin/codex.js
  • node --check codex-cli/bin/process_title.js
  • node --check codex-cli/tests/process_title.test.js
  • node --test codex-cli/tests/process_title.test.js
  • manual repro with a temporary local vendor binary and ps -o pid=,comm=,command=

Risk

  • Low to medium. The code change is tiny, but I am keeping the manual ps proof because OS-level process-title display is runtime-facing.

Maintainer Pickup

gh pr create --repo openai/codex --base main --head middleDuckAi:middleDuck/codex-15238-process-title --title "$(gh pr view 2 --repo middleDuckAi/codex --json title --jq .title)" --body "$(gh pr view 2 --repo middleDuckAi/codex --json body --jq .body)"