Repository navigation
fix(codex): check wake-up support before unattended work - #536
oliver-mee wants to merge 10 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
michael-denyer
left a comment
There was a problem hiding this comment.
Thanks for this. The gap in #535 is real. autopilot-full step 6 and shipping step 5 assume Claude Code's /loop, and the old Codex loop row didn't say what to do when Codex can't wake itself. I'm requesting changes because of where the fix lives, not what it says.
1. Runtime branches in shared playbooks
No playbook on main branches on a runtime. This finds nothing:
git grep -n -i -E "\bon (codex|pi|github copilot|copilot|muse|minimax|antigravity|omp|kimi|opencode|claude code)\b" origin/main -- plugins/pstack/skills/poteto-mode/playbooksPlaybooks are written in Claude Code terms, and each runtime translates them in its references/<runtime>-tools.md. copilot-tools.md:81 handles the same /loop audit tick that way.
This PR adds "On Codex / On Claude Code" pairs to five playbooks. bun tools/sync.mjs pstack <pinned sha> --dry-run shows forked files going from 55 to 57, because autonomous-run.md and visual-parity.md become forks. Your rewritten loop row in codex-tools.md already reaches every site that names loop, including babysit.
What I'd keep and drop:
- Keep the
looprow incodex-tools.md. Fold the four bullets ofcodex-wakeups.mdinto it, or into a short section under the table, so a reader takes one hop instead of two. - Keep the Codex gate sentence in
autopilot-fullstep 1 andshippingstep 1. You're right that the check has to run before owners start or a merge can queue, which is earlier than where those playbooks nameloop. Both files are already forks, so this adds no new fork. - Revert the rest. That means the edits to
autonomous-run.md,bug-fix.md,visual-parity.md,autopilot-full.mdstep 6 andshipping.mdstep 5, plus the two newforks.jsonentries.
2. Claude Code text changed
Three hunks replace text instead of adding beside it, which changes behaviour outside Codex:
visual-parity.mdstep 4. "/loopper component until the diff is zero" becomes "Repeat per component", so Claude Code loses/loop.autopilot-full.mdstep 6. "which schedules its own wake-up rather than blocking on a sleep" is gone. "because long runs drift and agents stall silently" now attaches to the Claude-only sentence.autonomous-run.mdstep 2. The parenthetical "(a built-in, not a pstack skill)" is dropped.
Reverting those files as described above clears all three.
3. Overlap with #538
The two PRs conflict on autopilot-full.md step 1 and on its forks.json why string. Whichever lands second needs a rebase.
|
Thanks @oliver-mee for finding and fixing this. The gap from #535 is real. Autopilot and Shipping can start unattended work, or request a merge that may queue, before anything checks that the session can wake itself up after the turn ends. I reviewed head 1. The Codex check is a runtime branch inside upstream's runtime-neutral playbooks. This blocks merging. The PR adds "On Codex, apply the wake-up preflight ..." to step 1 of Shipping already has the pattern to copy. The GraphQL stop at 2. The Codex mapping should be one 3. The check sits at step 1, away from the step that arms the wake-up. In Shipping, step 1 is forge resolution and verification. The merge request is step 4 and the 4. One wake-up home shared with #550. #550 adds a 5. Merge order. #551 also edited
|
|
Thanks @oliver-mee for this fix. I'm making the requested edits on this branch now, so you don't need to. The edits are these:
Your commits stay as they are, and mine go on top. The PR body will list what I changed. |
…x loop row Drop the two "On Codex" step-1 sentences and the Wake-ups on Codex section, per the 2026-11-25 review. Shipping gains a rule beside its GraphQL stop, and Autopilot-full one where the audit tick is armed: when the session cannot wake itself after the turn ends, request no merge that may queue, start no unattended work, and report the limit. The Codex loop row names the wake-up (a scheduled task in the chat, from the ChatGPT desktop app or web) and says the CLI and IDE extension have none. Adds the changelog fragment crediting oliver-mee.
Per the 2026-11-25 review: delete the Repeating work on Codex section and its wake-up sentence, since michael-denyer#536 carries the wake-up check, and add the in-turn repeat and the recipe rule to the loop row by what the reader is doing. Revert the poteto-help pointer and its forks.json why, because poteto-help already sends recipe adaptation to the Codex mapping. Adds the changelog fragment crediting oliver-mee.
Say "a Codex goal" instead of the /goal token, which the sync denylist rejects and which failed the CI test job. Bar any merge that can outlast the turn, queued or automatic, so an armed auto-merge is not left unwatched, while a guarded merge that completes in the turn still lands. Name only the desktop app as the wake-up source, since a scheduled task on the web keeps no local folder or worktree, and give the CLI its fallback: re-run only while the turn is active and report the last state seen.
…ecipes # Conflicts: # plugins/pstack/skills/poteto-mode/references/codex-tools.md
…un the step A second review of eb0e033 found that a desktop scheduled task runs unattended under the default sandbox, which may block the network calls a Shipping step needs. The loop row now names that condition, says the web gives no wake-up either, and says the IDE extension doesn't provide scheduled tasks rather than that it can't create them. Shipping's rule covered only merges the session requests. A merge already pending on entry outlasts the turn the same way, so step 1 now cancels and reads it back when the session cannot wake itself. The forks.json why and the fragment said "such a PR" with nothing for it to point at. They now name a PR that would need such a merge.
What and why
Autopilot-full step 6 and Shipping step 5 arm a
/loopwake-up, and Codex has no/loop(#535). When the session cannot wake itself after the turn ends, nothing watches a queued merge or an unattended program.looprow names the wake-up, a scheduled task in this chat from the ChatGPT desktop app. It counts only when the task's default sandbox lets the step's commands reach the network. The row says the session on the Codex CLI, the IDE extension and the web cannot wake itself after the turn ends, gives the reasons, and says to re-run the step only while the turn is active.Fixes #535
Changes on top of @oliver-mee's commits
The three commits from @oliver-mee stay as they were. Three merges of main and three commits sit on top of them. The branch is up to date with main at 14b4b8f.
### Wake-ups on Codexsection and put the Codex answer in thelooprow.tools/forks.jsonwhyadditions to match.changes/codex-wake-up-check.mdwithauthor: oliver-mee./goal, which the sync denylist rejects, and CI's test job failed on it. It now says "a Codex goal (create_goal)".gh. The row now counts the task as a wake-up only when that sandbox lets the step's commands reach the network.tools/forks.jsonwhyand the fragment said "such a PR" with nothing for it to point at. They now name a PR that would need such a merge.How the Codex row was checked
I probed Codex CLI 0.173.0-alpha.4.1, the copy bundled in ChatGPT.app, against a local stub provider, from a throwaway home with no login. The stub recorded each request and answered 400, so no signed-in model turn ran. In
codex execand in the TUI, withgpt-6.1-sol, the CLI offeredexec_command,apply_patch, the three goal tools,clock.sleep, and the sub-agent tools. The TUI added thread and worktree tools. None of them schedules a wake-up after the turn ends.clock.sleeptakes up to 43,200,000 ms and ends early when new input arrives for the active turn. With a model the CLI didn't know, it sent plain JSON tools and noclock.sleep.The scheduled-task facts come from OpenAI's scheduled tasks page. It says the Codex CLI and IDE extension don't provide the scheduled-task interface, that a task can be created from a ChatGPT or Codex chat, and that a task in a chat keeps the chat's context. It also says a task runs unattended with the default sandbox settings, that workspace-write fails network calls, and that a task on the web keeps no local folder or worktree between runs. The goal tools' schemas take an objective, a token budget and a status, and no time.
Test run
At head 206abbd, on macOS with Bun 1.4.4 and frozen installs in the root,
plugins/, and the poteto-mode scripts:The first pushed head, 20040c8, failed CI's test job on the
/goaldenylist hit. eb0e033 fixed it.Rough edges
send_message_to_threadsends a prompt to another task, and a sub-agent's final answer returns to the root. If either can start a turn on an idle root, the CLI can wake itself and the row is wrong in the cautious direction.looprow. Land this PR first.looprows that leave the question to judgement.tools/forks.jsonwhy, "would need one" can read as pointing at "one already pending".tests/skill-rules.test.mjspin covers the new Shipping or Autopilot rule. Main pins nothing inshipping.mdtoday.Developed with AI agents, with a human in the loop. Model: GPT-6 (Codex).