From 56cd00dac2c354b1ff641a1f8180885582fafadb Mon Sep 17 00:00:00 2001 From: disqualifier Date: Thu, 15 Oct 2026 11:54:07 -0400 Subject: [PATCH] Codex is per-project, not machine-wide The installer cannot run `--runtime codex` for you: the verb requires a project, since one of its targets is the project's own AGENTS.md. It now detects codex and prints the command to run in each project instead. Signed-off-by: disqualifier --- README.md | 16 +++++++++++----- install.ps1 | 18 +++++++++--------- install.sh | 16 +++++++++------- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 63b87aa..d1fcebb 100644 --- a/README.md +++ b/README.md @@ -31,17 +31,23 @@ already set up prints status and changes nothing. | --- | --- | | `--skill-only` | skill and hooks only; no daemon, no service | | `--no-node` | never provision Node; falls back to skill-only if yours is too old | -| `--no-codex` | don't wire Codex, even if it's installed | +| `--no-codex` | don't mention Codex, even if it's installed | | `--registry ` | install from somewhere other than the default registry | | `--yes` | don't prompt | Node 20 is the floor for single mode. The daemon needs 22.13 or newer, because it uses `node:sqlite` without a flag. -Claude Code gets wired up either way. If `codex` is on your PATH that gets -wired too — hooks, the skill, and a marked block in your project's `AGENTS.md`. -If it isn't installed, nothing is written for it. `--no-codex` skips it on a -box that does have it. +Claude Code gets wired up machine-wide here. **Codex is per-project** — one of +the things it writes is a block in the project's own `AGENTS.md` — so the +installer can't do it for you. If `codex` is on your PATH, the installer says +so and prints the command; run it inside each project you want Codex in: + +```sh +standup install --runtime codex +``` + +`--no-codex` tells the installer not to mention it. Windows uses the same flags with PowerShell spelling: `-SkillOnly`, `-NoNode`, `-NoCodex`, `-Registry `, `-Yes`. diff --git a/install.ps1 b/install.ps1 index 618f41d..dcd1809 100644 --- a/install.ps1 +++ b/install.ps1 @@ -243,15 +243,6 @@ if (-not $serviceOnly) { & standup install --runtime claude if ($LASTEXITCODE -ne 0) { Warn 'runtime install reported a problem; see doctor below' } - # Codex only where its binary exists: `--runtime codex` writes to - # $CODEX_HOME/hooks.json, ~/.agents/skills/ and the project's AGENTS.md, and - # leaving marked blocks for a tool that is not installed is worse than - # skipping. -NoCodex opts out on a box that does have it. - if (-not $NoCodex -and $codexBin) { - & standup install --runtime codex - if ($LASTEXITCODE -ne 0) { Warn 'codex runtime install reported a problem; see doctor below' } - } - if ($probe -and -not $probe.HasExited) { Stop-Process -Id $probe.Id -Force -ErrorAction SilentlyContinue } Remove-Item -Recurse -Force $probeDir -ErrorAction SilentlyContinue } @@ -309,4 +300,13 @@ Write-Host '' & standup code Write-Host '' Write-Host 'Next: cd ; standup create' +# Codex's runtime is per-project -- one of its three targets is the project's +# own AGENTS.md -- so the installer cannot wire it from here: there is no +# project yet, and the runtime step's throwaway is deleted. Name the command +# instead, only where codex exists and the user has not opted out. +if (-not $NoCodex -and $codexBin) { + Write-Host '' + Write-Host 'Codex is installed here. In each project you want it in:' + Write-Host ' standup install --runtime codex # hooks, skill, a block in AGENTS.md' +} } diff --git a/install.sh b/install.sh index 8f347ee..9b4d399 100755 --- a/install.sh +++ b/install.sh @@ -426,13 +426,6 @@ if [ "$SERVICE_ONLY" = 0 ]; then done fi standup install --runtime claude || warn "runtime install reported a problem; see doctor below" - # Codex only where its binary exists: `--runtime codex` writes to - # $CODEX_HOME/hooks.json, ~/.agents/skills/ and the project's AGENTS.md, and - # leaving marked blocks for a tool that is not installed is worse than - # skipping. `--no-codex` opts out on a box that does have it. - if [ "$NO_CODEX" = 0 ] && [ -n "$CODEX_BIN" ]; then - standup install --runtime codex || warn "codex runtime install reported a problem; see doctor below" - fi [ -n "$PROBE_PID" ] && { kill "$PROBE_PID" 2>/dev/null || true; wait "$PROBE_PID" 2>/dev/null || true; PROBE_PID=""; } rm -rf "$PROBE_DIR"; PROBE_DIR="" fi @@ -501,3 +494,12 @@ say "" standup code 2>/dev/null || say " (run 'standup code' for the operator code)" say "" say "Next: cd && standup create" +# Codex's runtime is per-project -- one of its three targets is the project's +# own AGENTS.md -- so the installer cannot wire it from here: there is no +# project yet, and step 7's throwaway is deleted. Name the command instead, +# only where codex exists and the user has not opted out. +if [ "$NO_CODEX" = 0 ] && [ -n "$CODEX_BIN" ]; then + say "" + say "Codex is installed here. In each project you want it in:" + say " standup install --runtime codex # hooks, skill, a block in AGENTS.md" +fi