fix: stop self-kill loop over the cd prefix rule
A live codex in the right cwd must not be pkilled to relaunch 'with the prefix'; exit codes after the wrapper's own pkill are not spawn errors. Bump to 0.1.3.
This commit is contained in:
1 parent
54aabcab23
commit
805fe4f11f
2 files changed
+11
-2
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "codex-crew",
|
"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."
|
"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."
|
||||||
}
|
}
|
||||||
+10
-1
@@ -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
|
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
|
script ITSELF translates the scope into prompt text; don't work around
|
||||||
it and don't probe `--help`.
|
it and don't probe `--help`.
|
||||||
- always prefix `cd <cwd> && ` — codex works from the working directory.
|
- codex must run from `<cwd>`: if your shell's cwd differs, prefix
|
||||||
|
`cd <cwd> && `. 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
|
4. Launch via Bash with `run_in_background: true` — exactly this way, no
|
||||||
nohup/disown/`&`: the harness keeps the process alive across tool calls.
|
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:
|
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`
|
`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;
|
- `ok|stalled|error...` → "Collecting the result" section;
|
||||||
|
|||||||
Reference in new issue
Block a user