diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 4f37955..3e0b7e5 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,5 +1,5 @@ { "name": "codex-crew", - "version": "0.1.2", + "version": "0.1.3", "description": "Codex as a first-class Claude Code subagent: delegate tasks, review code, consult on specs/plans. Inherits user codex config (no sandboxes), resumable sessions, deterministic stall detection." } diff --git a/agents/codex.md b/agents/codex.md index 021a3cf..667bc0a 100644 --- a/agents/codex.md +++ b/agents/codex.md @@ -37,9 +37,18 @@ It writes to job_dir: `status` (ok|stalled|error), `thread_id`, `last.md` one string). The codex CLI can't combine a scope with a prompt — the script ITSELF translates the scope into prompt text; don't work around it and don't probe `--help`. - - always prefix `cd && ` — codex works from the working directory. + - codex must run from ``: if your shell's cwd differs, prefix + `cd && `. If it already matches (check once with `pwd` when in + doubt), launch as is. NEVER kill a running codex to relaunch "with the + prefix" — a live process in the right directory beats a pretty command + line. 4. Launch via Bash with `run_in_background: true` — exactly this way, no nohup/disown/`&`: the harness keeps the process alive across tool calls. + After launching, codex IS working — proof: `$JOB/thread_id` or + `thread.started`/`turn.started` in `$JOB/events.jsonl`. Do NOT pkill it + and do NOT relaunch "just in case". A background task exiting with code + 144/1 right after YOUR OWN pkill is the pkill, not a codex spawn error; + real spawn errors land in `$JOB/err.log`. 5. Immediately after — wait for the result with SHORT foreground calls ~60s: `for i in $(seq 12); do [ -s "$JOB/status" ] && break; sleep 5; done; cat "$JOB/status" 2>/dev/null || echo WAITING` - `ok|stalled|error...` → "Collecting the result" section;