Skip to content
Open
4 changes: 4 additions & 0 deletions changes/codex-wake-up-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
author: oliver-mee
---
Shipping and Autopilot-full now check whether the session can wake itself after the turn ends before they start work that outlasts the turn. When it cannot, Shipping requests no merge that can outlast the turn, queued or automatic, cancels one already pending on entry, starts no unattended work, and stops a PR that would need such a merge at merge-ready with the limit reported. Autopilot-full arms no audit tick, starts no unattended work, and tells the operator before the first owner starts. The Codex `loop` mapping now says where a wake-up comes from: a scheduled task in the chat, armed from the ChatGPT desktop app, which runs while the computer is on and the app is running, and is a wake-up only when the default sandbox lets the step's commands reach the network. On the Codex CLI and IDE extension, which don't provide scheduled tasks, and on the web, where a scheduled task keeps no local folder or worktree, the session cannot wake itself. The CLI's `clock.sleep` waits only inside the active turn, and a Codex goal has no wake-up time, so without a wake-up the step is re-run only while the turn is active. Before, both playbooks assumed Claude Code's `/loop`, and the Codex mapping offered "a Codex scheduled task if available" without saying when one is. [#535](https://github.com/michael-denyer/pstack-claude/issues/535)
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ A verdict covers one patch and green CI covers one head. Step 4 runs a full swar
The owner presents the merge-ready PR to the operator with its verdict and pinned head SHA, then returns, and a fresh owner takes the next item per poteto-mode's Subagents section. If trunk moves again before the operator merges, the patch-id rule in `playbooks/shipping.md` governs re-verification.
6. **Run the root layer.** Anything that loosens a gate, such as a raised budget or an allowlist entry, needs a verifier's proof and then your fresh countersign, because the owner is the one who wants green. Under a grant that covers approvals, that countersign is the approval, and the owner's record of it points at your countersign for a lane to check. A disabled or soft-failed check always comes out, because it stops guarding every case. Never give or bypass an approval the forge enforces, because no countersign covers it.

On the operator's go, arm an hourly audit tick as a real `/loop` in dynamic mode, which schedules its own wake-up rather than blocking on a sleep, and keep it until no delegated work is left, because long runs drift and agents stall silently. Each tick re-reads this playbook from disk under the installed plugin and the objective in the store's `notes.md`, and fixes drift, such as an unreported head or an unrecorded agent, by having its owner record it, because drift is a gap in the record, not a stall. It probes every agent, down to the leaf lanes, and judges each by its side effects, because status text and summaries can hide a stuck child. An agent is stuck when it errors, cannot start turns, or shows nothing new past its stuck-after runtime, and so is an owner that has neither pushed nor written a trail row by the first tick. One waiting on you or the operator is not stuck, so answer it. Replace a stuck agent at once, without waiting for its stop to land. A tick that changed something for the operator ends by catching them up per the **ketchup** skill, and one that changed nothing stays quiet.
On the operator's go, arm an hourly audit tick as a real `/loop` in dynamic mode, which schedules its own wake-up rather than blocking on a sleep, and keep it until no delegated work is left, because long runs drift and agents stall silently. When the session cannot wake itself after the turn ends, there is no tick to arm, so start no unattended work and report the limit to the operator before the first owner starts. Each tick re-reads this playbook from disk under the installed plugin and the objective in the store's `notes.md`, and fixes drift, such as an unreported head or an unrecorded agent, by having its owner record it, because drift is a gap in the record, not a stall. It probes every agent, down to the leaf lanes, and judges each by its side effects, because status text and summaries can hide a stuck child. An agent is stuck when it errors, cannot start turns, or shows nothing new past its stuck-after runtime, and so is an owner that has neither pushed nor written a trail row by the first tick. One waiting on you or the operator is not stuck, so answer it. Replace a stuck agent at once, without waiting for its stop to land. A tick that changed something for the operator ends by catching them up per the **ketchup** skill, and one that changed nothing stays quiet.
7. **Stand down at once on the operator's stop.** A hold reaches every owner as a zero-writes order. Each reports where it stands and keeps its brief until the operator releases it.

**Reply:** catch the operator up per the **ketchup** skill, covering each PR's state and verdict, what is merge-ready for the operator's click, countersigns and why, open operator gates, and parked follow-ups, with links to each PR and the trails.
2 changes: 2 additions & 0 deletions plugins/pstack/skills/poteto-mode/playbooks/shipping.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Resolve the driver skill through [poteto-mode's Non-negotiables](../SKILL.md#non

When GitHub refuses GraphQL, as in a Claude Code cloud session where `ship-pr inspect` reports `unavailable`, nothing lands. The watcher still reports PR status there, over REST. Stop at merge-ready, report the limit, and read PR state with the REST commands in [Reading a PR from a Claude Code cloud session](../references/cloud-session-pr-reads.md).

When the session cannot wake itself after the turn ends, nothing watches a request that outlasts the turn. Request no merge that can outlast the turn, queued or automatic, and start no unattended work. A PR that would need one stops at merge-ready, and you report the limit. A merge already pending on entry outlasts the turn the same way, so cancel and read it back in step 1, and report it.

1. **Resolve the forge, then verify each PR independently before it lands.** GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, use `origin pr` for every PR operation. Otherwise stay on `gh` and record the fallback. Never require Graphite (`gt`). Capture the affected chain bottom-to-top, each head branch and SHA, base branch and SHA, and the intended destination repository and branch, and leave unrelated PRs alone. Read [Merge and restack safety](../references/merge-safety.md) before merging, arming, rebasing, or retargeting. Inspect pending merge requests on entry, and cancel and read back any that lack the verification gates in step 4 before a lengthy review. One verifier per PR, each a subagent in its own worktree, runs the change the way a user would through the driver skill, parent against head, and posts `PASS`, `PASS+NOTES`, or `FAIL` on that PR. Only a verdict from an agent that did not write the code counts, because an author checks what it meant to build. Green CI and an approving bot review are not verdicts, because neither runs the change as a user would. Record each verdict's head SHA, base SHA, base branch, and stable `git patch-id` of the base-to-head diff.
2. **Land only the contiguous verified run rooted at the bottom.** Walk up from the lowest unmerged PR and stop at the first one without `PASS` or `PASS+NOTES`. The PRs below it are the run, and the top one is the ceiling. A verified PR above an unverified one waits, because it cannot land without the code below it. One whose branch neither holds nor needs that code can move onto trunk and land on its own. It needs a fresh verdict first, because its old one ran with that code beneath it and trunk does not have it.
3. **Re-check that the verdicts still describe the code.** A verdict covers a patch, and a chain rebase moves every PR above it to a new SHA without failing any check. Compare `git patch-id` at the verdict SHA with the current head before trusting an older verdict. When the patches differ only in tests, docs, or lint config, a lane's result stands if what it ran builds the same at both SHAs apart from noise. Noise is a difference that also shows up between two builds of the verdict SHA, or an embedded commit SHA. Report each kind of noise with its files, so a reader can check the call. The change itself still gets fresh checks and a review, because the old verdict never saw it. A lane with no build output, such as a dev server, cannot show this, so rerun it, and re-verify anything else that drifted. A matching patch-id keeps a review only after you check that it applies to the new destination and dependencies, so re-verify changed behavior or uncertain applicability, and rerun checks and mergeability after every rewrite or retarget.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The [driver policy](../SKILL.md#non-negotiables) selects the app driver. For ski
| `run` (drive a CLI/TUI to see a change work) | Run the app yourself via `shell` and observe the real output. |
| Project UI driver | Drive the UI with whatever automation you have, or hand the user a concrete manual check. Do not claim done without observing the artifact. |
| `plugin-dev:skill-development` (Claude's SKILL.md authoring guidance) | Follow your platform's skill-authoring guidance; the `writing-skills` skill if present. Keep `name` + `description` frontmatter and progressive disclosure. |
| `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. |
| `loop` (recurring/self-paced re-invocation, used by `babysit`) | Codex has no `loop` skill. Re-run the step yourself on a cadence. In the ChatGPT desktop app, arm a wake-up as a scheduled task in this chat, which returns to the chat with its context while the computer is on and the app is running. The task runs unattended under your default sandbox, so it is a wake-up only when that sandbox lets the step's commands, such as `gh`, reach the network. The session cannot wake itself after the turn ends on the Codex CLI and IDE extension, which don't provide scheduled tasks, or on the web, where a scheduled task keeps no local folder or worktree. The CLI's `clock.sleep` waits only inside the active turn, and a Codex goal (`create_goal`) has no wake-up time. Without a wake-up, re-run the step only while the turn is active, and report the last state you saw when it ends. |

## Per-skill notes

Expand Down
4 changes: 2 additions & 2 deletions tools/forks.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"plugins/pstack/skills/poteto-mode/playbooks/autopilot-full.md": {
"kind": "policy",
"why": "Owners stop at merge-ready and the operator clicks every merge, with the patch-id rule governing re-verification if trunk moves first, instead of each owner merging after a clean verdict, and the root writes the program objective into the store's notes.md on the go and re-reads it each tick, arms the tick as a dynamic-mode /loop, states the program's size before the first owner starts and waits for the operator's go above three owners, scopes review lanes to what the diff breaks, and stops a PR at two fix-forwards.",
"why": "Owners stop at merge-ready and the operator clicks every merge, with the patch-id rule governing re-verification if trunk moves first, instead of each owner merging after a clean verdict, and the root writes the program objective into the store's notes.md on the go and re-reads it each tick, arms the tick as a dynamic-mode /loop, states the program's size before the first owner starts and waits for the operator's go above three owners, scopes review lanes to what the diff breaks, and stops a PR at two fix-forwards. When the session cannot wake itself after the turn ends, the root arms no tick, starts no unattended work, and reports the limit before the first owner starts.",
"since": "0.9.39",
"upstream": "not-proposed"
},
Expand Down Expand Up @@ -110,7 +110,7 @@
},
"plugins/pstack/skills/poteto-mode/playbooks/shipping.md": {
"kind": "policy",
"why": "Lands one PR at a time under the user's landing authority, cancelling pending merges before any chain change, merging only under a service-enforced head condition, arming auto-merge or a queue only behind repository rules that enforce the verdict, and confirming each landing in the destination's history before advancing, with verifiers that drive the real surface through the driver skill in their own worktrees, a matching patch-id that keeps a review only after its applicability to the new base is checked, and the watcher owning blocker classification, with a branch behind its base routed to the topology owner. Stops at merge-ready when GitHub refuses GraphQL, as in a Claude Code cloud session, and points at the REST reads in `cloud-session-pr-reads.md`.",
"why": "Lands one PR at a time under the user's landing authority, cancelling pending merges before any chain change, merging only under a service-enforced head condition, arming auto-merge or a queue only behind repository rules that enforce the verdict, and confirming each landing in the destination's history before advancing, with verifiers that drive the real surface through the driver skill in their own worktrees, a matching patch-id that keeps a review only after its applicability to the new base is checked, and the watcher owning blocker classification, with a branch behind its base routed to the topology owner. Stops at merge-ready when GitHub refuses GraphQL, as in a Claude Code cloud session, and points at the REST reads in `cloud-session-pr-reads.md`. When the session cannot wake itself after the turn ends, requests no merge that can outlast the turn, cancels one already pending, starts no unattended work, and stops a PR that would need one at merge-ready.",
"since": "0.9.34",
"upstream": "not-proposed"
},
Expand Down