Skip to content

fix(codex): translate the remaining loop recipes - #550

Open
oliver-mee wants to merge 22 commits into
michael-denyer:mainfrom
oliver-mee:codex-loop-recipes
Open

oliver-mee wants to merge 22 commits into
michael-denyer:mainfrom
oliver-mee:codex-loop-recipes

Conversation

@oliver-mee

@oliver-mee oliver-mee commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Codex has no /loop. Beside the wake-up that #536 maps, two kinds of caller name it. Visual Parity repeats a per-component diff until it reaches zero. A recipe that poteto-help adapts may carry the literal command. The Codex loop row now covers both, by what the reader is doing:

  • Repeat a check whose stop condition your own work can reach within the turn, in that turn, until it holds. Any other step, such as one that waits on CI, a reviewer, or a merge queue, is re-run on a cadence and falls to fix(codex): check wake-up support before unattended work #536's wake-up sentences.
  • In a recipe or prompt that contains a literal /loop, drop only the command and keep the rest of the prompt.

Related to #535 and #536.

Changes on top of @oliver-mee's commit

The commit from @oliver-mee stays as it was. Merges of main and of the #536 branch, and three commits, sit on top of it. The branch is up to date with main at 14b4b8f and with #536's head 206abbd.

  • b63adf9 follows the 2026-11-25 review comment.
    • Deleted the ## Repeating work on Codex section and moved its two translations into the loop row, one line long like the rest of the table.
    • Dropped the sentence about confirming an authorized wake-up. fix(codex): check wake-up support before unattended work #536 carries the wake-up check, and this row extends fix(codex): check wake-up support before unattended work #536's wording.
    • Reverted the poteto-help pointer and its tools/forks.json why change. poteto-help already sends recipe adaptation to the Codex mapping, so this PR changes one skill file.
    • Added changes/codex-loop-translations.md with author: oliver-mee.
  • 9b1cbd4 follows one independent review of the diff.
    • "A check that can finish within the turn" also matched a single poll of CI or a merge queue. On the desktop app that reading skipped the scheduled-task wake-up. The in-turn case is now named by its stop condition, and waits go to the cadence and wake-up sentences.
    • "Keep the goal, checkout, checks, and stop condition" read as a complete list, and the overnight recipe also carries "don't ask me before committing". The row now says to keep the rest of the prompt.
    • The fragment claimed more than the diff does and now matches it.
  • 3a41ca9 follows a second independent review, of 9b1cbd4. Naming the cadence case by its waits dropped the catch-all from main's row, so a long bug hunt or an Autonomous run fit neither sentence. The row now re-runs any other step on a cadence, with the waits as examples, and the fragment matches.
  • Merged the fix(codex): check wake-up support before unattended work #536 branch, because both PRs edit the same table row. Until fix(codex): check wake-up support before unattended work #536 lands, GitHub shows its changes in this diff too. The diff from #536's head is the part this PR adds.

Test run

At head 3a41ca9, on macOS with Bun 1.4.4 and frozen installs in the root, plugins/, and the poteto-mode scripts:

bun tools/generate.mjs --check: ok, 87 generated files current
bun tools/release.mjs check <merge base 14b4b8fd>: ok
bun test tests/: 2951 pass, 300 skip, 0 fail (3251 tests, 79 files)
markdownlint-cli2 0.18.1 and lychee --offline --include-fragments on the changed files: 0 errors
git diff origin/main HEAD -- plugins/pstack/skills/poteto-help/SKILL.md: empty
CI on 3a41ca9: all five workflows succeeded

The first pushed head, ce45ec7, carried #536's /goal denylist hit, and its CI test job failed on it.

Rough edges


Developed with AI agents, with a human in the loop. Model: GPT-6 (Codex).

@michael-denyer

Copy link
Copy Markdown
Owner

Thanks @oliver-mee for picking up the Codex reading of /loop. Codex has no such command, and the Visual Parity step and the overnight recipe both need a Codex answer, so this gap is real. I reviewed head 6a38762. Points 1 and 2 block merging. The rest are smaller and can land in the same push.

1. Two answers for loop on Codex in one file. This blocks merging. The new ## Repeating work on Codex section at codex-tools.md:57-67 says to repeat an in-turn check until its stop condition, to drop the literal /loop from recipes, and to confirm a wake-up exists before promising unattended progress. The existing loop row of the driver table at codex-tools.md:84 is unchanged:

| `loop` (recurring/self-paced re-invocation, used by `babysit`) | Codex has no `loop` skill. Re-run the step yourself on a cadence, or use a Codex scheduled task if available. |

That row doesn't link to the new section, and the only link to #repeating-work-on-codex is the one this PR adds in poteto-help/SKILL.md:41. A Codex reader who meets /loop in visual-parity.md:8, shipping.md:13, autopilot-full.md:28, or through the babysit note at codex-tools.md:101 follows the driver row and gets the old rule. Please put both cases in the loop row and delete the standalone section. The Copilot mapping already works this way. At copilot-tools.md:81, one "Recurring wake-up (loop, the /loop audit tick, babysit's cadence)" row covers every caller.

2. The wake-up check overlaps #536. This blocks merging. #536 edits the same loop row and adds its own wake-up preflight to codex-tools.md. Its version is stricter. It requires an armed wake-up with a recorded handle, where this PR only requires that the host exposes one. The merge-tree check in the PR body shows that the hunks don't collide as text. It can't show that the file ends up with one rule. If both PRs land as written, the same check appears twice, at two strengths. We'd like one home for it, so #536 carries the wake-up preflight. That means a runtime-neutral gate in the Shipping and Autopilot playbooks, plus the Codex mechanism in the loop row. This PR carries only the two /loop translations, added to that same row:

  • A check that can finish within the turn repeats in the active turn until its stop condition.
  • A recipe or prompt drops the literal /loop and keeps the goal, checkout, checks, and stop condition.

So please drop the "confirm that the current host exposes an authorized wake-up" sentence here. #536's review comment uses the same wording.

3. Merge main. #551 also edited codex-tools.md and has merged. Please merge main into this branch, and again if #536 lands before this PR. Then extend whichever loop row is on main at that point.

4. The mapping names its callers. The new text says "such as Visual Parity's image diff", "an unattended recipe from poteto-help", and "keep the original baseline". The baseline rule already lives in Visual Parity step 2, which says "no baseline tampering". Every other entry in codex-tools.md maps a Claude Code tool or command, not a calling playbook. Please write the row by what the reader is doing, such as "a check that can finish within the turn" and "a prompt that contains a literal /loop". Then the row won't need an edit when Visual Parity's text changes.

5. The poteto-help sentence may be unnecessary. poteto-help/SKILL.md:41 already says "Before giving runtime-specific instructions or adapting a recipe, read the Codex mapping". Once the loop row carries the recipe case, that sentence covers it. This PR then becomes a one-file edit to codex-tools.md, with no change to the forks.json why. If you'd rather keep a direct pointer, aim it at the driver table rather than at a separate section.

6. Two style points. The new bullets are hard-wrapped at about 76 columns. Everywhere else in codex-tools.md, each paragraph, bullet, or table row is a single line. Also, "authorized wake-up" isn't defined anywhere in the file, while the existing row names the mechanism, a Codex scheduled task. Please use the one term #536 settles on.

Checks that passed at this head:

  • The generator doesn't overwrite the new section. generate.mjs stamps ## Model names only up to the next ## heading.
  • codex-tools.md is port-only, so it needs no forks.json entry.
  • The poteto-help paragraph is port text inside the declared fork, and the why update is the bookkeeping CONTRIBUTING.md asks for.
  • No file comes near 1000 lines.

I didn't rerun the test suite or drive a Codex session.

@michael-denyer

Copy link
Copy Markdown
Owner

Thanks @oliver-mee for this one too. I'm making the requested edits on this branch now, so you don't need to. The edits are these:

Your commit stays as it is, 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
"A check that can finish within the turn" also matched a single poll of CI or a merge queue, which on the desktop app would skip the scheduled-task wake-up. Name the in-turn case by its stop condition, which the agent's own work can reach, and send waits on CI, a reviewer, or a merge queue to the cadence and wake-up sentences. Keep the whole prompt when dropping a literal /loop, since recipes carry more than the goal and checks. Narrow the fragment to match.
…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.
# Conflicts:
#	plugins/pstack/skills/poteto-mode/references/codex-tools.md
9b1cbd4 named the cadence case by its waits on CI, a reviewer, or a merge queue, which dropped the catch-all from main's row. A long bug hunt or an Autonomous run fits neither the in-turn sentence nor the waits. The row now re-runs any other step on a cadence, with the waits as examples, and the fragment matches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants