From f55f1919e55be42582ac9a089575759a9fe9e11b Mon Sep 17 00:00:00 2001 From: "Notorious D.E.V" Date: Tue, 14 Jul 2026 12:39:14 +0800 Subject: [PATCH 1/4] docs(codex-first): cover ChatGPT-app-bundled Codex on PATH Codex merged into the ChatGPT desktop app (July 2026), so the CLI now also ships as a bundled binary at /Applications/ChatGPT.app/Contents/Resources/codex. Document both install shapes and the symlink trap: the bundled binary resolves sibling helpers (e.g. codex-code-mode-host) relative to its invocation path, so symlinking it onto PATH makes exec fail with "the workspace execution host is missing" (agent runs, file edits fail). Use an exec-wrapper or the standalone installer instead. Reproduced on codex-cli 0.144.0-alpha.4: symlink -> fail, exec-wrapper -> ok, direct binary -> ok. --- skills/codex-first/SKILL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skills/codex-first/SKILL.md b/skills/codex-first/SKILL.md index e523aee..eb29291 100644 --- a/skills/codex-first/SKILL.md +++ b/skills/codex-first/SKILL.md @@ -48,7 +48,9 @@ command codex exec --yolo -C \ - Model default: `gpt-5.6-sol`, effort `high`, fast mode on — pin all three explicitly; don't rely on user config. - `--yolo` is the house default; Codex may run commands/tests freely. Keep prompts scoped to the target repo. -- `command codex` bypasses the interactive zsh wrapper; if not on PATH: `fnm exec --using default -- codex` +- `command codex` bypasses any interactive shell alias. Codex must resolve to a **real binary path, not a symlink** (see below). Two install shapes: + - node/standalone install: usually already on PATH; if not, `fnm exec --using default -- codex`. + - ChatGPT desktop app (Codex merged into it, July 2026): the binary ships at `/Applications/ChatGPT.app/Contents/Resources/codex` and shares the app's ChatGPT sign-in. Put it on PATH with an **exec-wrapper, never a symlink** — codex locates sibling helpers (e.g. `codex-code-mode-host`) relative to its invocation path, so a symlink misresolves them and `exec` dies with `the workspace execution host is missing` (agent runs, but every file edit fails). Wrapper: `printf '#!/bin/sh\nexec "/Applications/ChatGPT.app/Contents/Resources/codex" "$@"\n' > ~/.local/bin/codex && chmod +x ~/.local/bin/codex`. Or install the self-contained CLI via `curl -fsSL https://chatgpt.com/codex/install.sh | sh`, which has no wrapper caveat. - stderr suppressed (thinking noise bloats context); drop `2>/dev/null` only to debug a failing run - read `-o` file for the result; don't parse the JSONL stream - long runs: Bash run_in_background, read `-o` file on exit; don't kill quiet runs <30 min From a9293db15f05733bc171b61c92e04393612181da Mon Sep 17 00:00:00 2001 From: "Notorious D.E.V" Date: Wed, 15 Jul 2026 16:48:46 +0800 Subject: [PATCH 2/4] =?UTF-8?q?docs(codex-first):=20address=20review=20?= =?UTF-8?q?=E2=80=94=20scope=20no-symlink=20to=20app=20bundle,=20safe=20wr?= =?UTF-8?q?apper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Narrow the no-symlink rule to the ChatGPT-app-bundled binary; package manager symlinks/shims (npm/standalone) are fine and no longer discouraged. - Make the wrapper recipe non-destructive: `mkdir -p ~/.local/bin` first and skip if a launcher already exists, so it works on a fresh app-only machine and never clobbers an existing codex. Addresses ClawSweeper P2 findings on PR #29. --- skills/codex-first/SKILL.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/skills/codex-first/SKILL.md b/skills/codex-first/SKILL.md index eb29291..148e7c2 100644 --- a/skills/codex-first/SKILL.md +++ b/skills/codex-first/SKILL.md @@ -48,9 +48,14 @@ command codex exec --yolo -C \ - Model default: `gpt-5.6-sol`, effort `high`, fast mode on — pin all three explicitly; don't rely on user config. - `--yolo` is the house default; Codex may run commands/tests freely. Keep prompts scoped to the target repo. -- `command codex` bypasses any interactive shell alias. Codex must resolve to a **real binary path, not a symlink** (see below). Two install shapes: - - node/standalone install: usually already on PATH; if not, `fnm exec --using default -- codex`. - - ChatGPT desktop app (Codex merged into it, July 2026): the binary ships at `/Applications/ChatGPT.app/Contents/Resources/codex` and shares the app's ChatGPT sign-in. Put it on PATH with an **exec-wrapper, never a symlink** — codex locates sibling helpers (e.g. `codex-code-mode-host`) relative to its invocation path, so a symlink misresolves them and `exec` dies with `the workspace execution host is missing` (agent runs, but every file edit fails). Wrapper: `printf '#!/bin/sh\nexec "/Applications/ChatGPT.app/Contents/Resources/codex" "$@"\n' > ~/.local/bin/codex && chmod +x ~/.local/bin/codex`. Or install the self-contained CLI via `curl -fsSL https://chatgpt.com/codex/install.sh | sh`, which has no wrapper caveat. +- `command codex` bypasses any interactive shell alias. If codex isn't on PATH, it depends on how it was installed: + - node/standalone install: `fnm exec --using default -- codex` (a package-manager symlink or shim on PATH is fine — this caveat is only about the app bundle below). + - ChatGPT desktop app (Codex merged into it, July 2026): the CLI ships bundled at `/Applications/ChatGPT.app/Contents/Resources/codex` and shares the app's ChatGPT sign-in. Expose **that** binary with an **exec-wrapper, not a symlink** — it locates sibling helpers (e.g. `codex-code-mode-host`) relative to its own invocation path, so a symlink to it misresolves them and `exec` dies with `the workspace execution host is missing` (the agent runs, but every file edit fails). Non-destructive wrapper (won't clobber an existing launcher): + ```sh + mkdir -p ~/.local/bin + [ -e ~/.local/bin/codex ] || { printf '#!/bin/sh\nexec "/Applications/ChatGPT.app/Contents/Resources/codex" "$@"\n' > ~/.local/bin/codex && chmod +x ~/.local/bin/codex; } + ``` + Or install the self-contained CLI via `curl -fsSL https://chatgpt.com/codex/install.sh | sh`, which needs no wrapper. - stderr suppressed (thinking noise bloats context); drop `2>/dev/null` only to debug a failing run - read `-o` file for the result; don't parse the JSONL stream - long runs: Bash run_in_background, read `-o` file on exit; don't kill quiet runs <30 min From 9f813ef8e3076450962120c50c9daf67e8b7f677 Mon Sep 17 00:00:00 2001 From: "Notorious D.E.V." Date: Wed, 15 Jul 2026 16:55:30 +0800 Subject: [PATCH 3/4] Update Codex usage instructions in SKILL.md simplify --- skills/codex-first/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/codex-first/SKILL.md b/skills/codex-first/SKILL.md index 148e7c2..8ceb337 100644 --- a/skills/codex-first/SKILL.md +++ b/skills/codex-first/SKILL.md @@ -49,8 +49,8 @@ command codex exec --yolo -C \ - Model default: `gpt-5.6-sol`, effort `high`, fast mode on — pin all three explicitly; don't rely on user config. - `--yolo` is the house default; Codex may run commands/tests freely. Keep prompts scoped to the target repo. - `command codex` bypasses any interactive shell alias. If codex isn't on PATH, it depends on how it was installed: - - node/standalone install: `fnm exec --using default -- codex` (a package-manager symlink or shim on PATH is fine — this caveat is only about the app bundle below). - - ChatGPT desktop app (Codex merged into it, July 2026): the CLI ships bundled at `/Applications/ChatGPT.app/Contents/Resources/codex` and shares the app's ChatGPT sign-in. Expose **that** binary with an **exec-wrapper, not a symlink** — it locates sibling helpers (e.g. `codex-code-mode-host`) relative to its own invocation path, so a symlink to it misresolves them and `exec` dies with `the workspace execution host is missing` (the agent runs, but every file edit fails). Non-destructive wrapper (won't clobber an existing launcher): + - node/standalone install: `fnm exec --using default -- codex` + - ChatGPT desktop app: the CLI ships bundled at `/Applications/ChatGPT.app/Contents/Resources/codex` and shares the app's ChatGPT sign-in. Expose **that** binary with an **exec-wrapper, not a symlink** ```sh mkdir -p ~/.local/bin [ -e ~/.local/bin/codex ] || { printf '#!/bin/sh\nexec "/Applications/ChatGPT.app/Contents/Resources/codex" "$@"\n' > ~/.local/bin/codex && chmod +x ~/.local/bin/codex; } From 2deb764eef261edebc1654bad2a1cfee108b2159 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 16 Jul 2026 10:40:48 -0700 Subject: [PATCH 4/4] docs: clarify bundled Codex authentication --- skills/codex-first/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/codex-first/SKILL.md b/skills/codex-first/SKILL.md index 26e14a9..5c45246 100644 --- a/skills/codex-first/SKILL.md +++ b/skills/codex-first/SKILL.md @@ -57,7 +57,7 @@ command codex exec --yolo -C \ - `--yolo` is the house default; Codex may run commands/tests freely. Keep prompts scoped to the target repo. - `command codex` bypasses any interactive shell alias. If codex isn't on PATH, it depends on how it was installed: - node/standalone install: `fnm exec --using default -- codex` - - ChatGPT desktop app: the CLI ships bundled at `/Applications/ChatGPT.app/Contents/Resources/codex` and shares the app's ChatGPT sign-in. Expose **that** binary with an **exec-wrapper, not a symlink**. Ensure `~/.local/bin` stays on PATH (for zsh, persist the export in `~/.zshrc`), then: + - ChatGPT desktop app: the CLI ships bundled at `/Applications/ChatGPT.app/Contents/Resources/codex`. Expose **that** binary with an **exec-wrapper, not a symlink**. Ensure `~/.local/bin` stays on PATH (for zsh, persist the export in `~/.zshrc`), then: ```sh mkdir -p "$HOME/.local/bin" export PATH="$HOME/.local/bin:$PATH"