Repository navigation
Keep nested agents waiting on their results; define one payload digest - #128
Conversation
Delegated Claude Code owners launched their independent reviewer in the background, ended their turn and handed back "review pending", so the verdict reached the controller instead. The shared subagent reference now limits background launches to the top-level session and tells a subagent to pass `run_in_background: false` for agents whose result it needs, batching independent launches to stay parallel. Project handoff no longer treats a running reviewer or helper as `pending`, and the Wayfinder research provider runs in a separate rather than background subagent. Planners and controllers hashed different bytes for the same plan comment because no reference defined the payload digest. to-plan's GitHub mode now defines it once (decoded body, CRLF to LF, plan payload from `## Implementation plan`, trailing newlines stripped, bare lowercase hex SHA-256) with a worked example, and every plan and runner-marker digest mention links to it. Add a direct, novel and restraint calibration triad for each fix, plus tests for the digest rule, its worked example and the case fixtures.
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 051a6a7fc0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The payload digest rule removed "a final `</details>` line" before stripping trailing newlines, so a wrapped body ending in a newline kept its closing tag when the steps were followed literally. It now removes the last nonempty line when it is `</details>`. Records published before the rule may carry a different digest of the same comment, and the ranker compares plan and replan-report digests exactly. A verified pre-rule digest of the decoded body, raw or with trailing newlines stripped and with or without a `sha256:` prefix, is now accepted as a legacy identity and normalized to the rule's digest. Any other mismatch still blocks. Published amendment chains keep the plan digest they pinned.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7dab93b1ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Medium impact] The PR appears safe to merge; no new blocking issue was found.
|
Wayfinder reconciliation digests were defined to exclude a presentation wrapper, but the payload digest rule kept every non-plan marker's whole body, so a wrapped marker would hash differently from its pinned digest. The rule now drops lines before the payload's first line (the plan heading, or the marker line for runner markers) and removes the closing `</details>` only when a dropped line opened the wrapper. A plan payload's own trailing `<details>` block is no longer mistaken for a wrapper, and the legacy path also accepts the wrapper-stripped form.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2047637246
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Fast-path revisions publish the plan marker with a `## Fast path` heading, so the payload digest rule had no starting line for them. The rule now starts a plan payload at `## Implementation plan` or `## Fast path`, treats a plan comment with neither as a blocker, and the fast-path publication step names that heading level. The rule also dropped the last nonempty line of a wrapped comment without checking it, so text appended after a missing closer could reproduce an unmodified digest. The last line must now be `</details>`; otherwise the comment is a blocker. Add tests for the fast-path shape, the missing closer, and the pre-rule extracted payload with its trailing newline, which the legacy path already accepts.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6cc70b63f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The minimization fallback placed the wrapper before a predecessor's `## Implementation plan` line, which a `## Fast path` revision lacks. Both the to-plan and Project controller fallbacks now place it before the first payload line the digest rule defines.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46dba9b17b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A pre-rule replan report can name its predecessor plan by a raw-body digest. Wrapping that predecessor when native minimization fails changes the body, so no legacy form can verify the report and the ranker blocks the chain. Both wrapper fallbacks now skip the edit in that case and report it as the existing presentation hygiene failure; the chain stays authoritative. A regression test pins why the wrapped body cannot match.
Two problems from a real
run-github-project drain --auto-mergerun on chrisbanes/haze (2026-10-18).Nested owners handed back before their reviewer reported
Claude Code ticket owners for haze #1584 and #1585 launched their independent reviewer in the background, ended their turn and returned "review pending" with no push. The reviewer's verdict went to the controller, which had to relay it and resume the owner, and one owner did it twice.
Root cause: the shared
subagent-selection.mdsaid "Run workers in the background and wait for the completion notification". That only works for the top-level session, because a subagent receives no completion notifications, and Claude Code's Agent tool already defaults to the background. In addition, Project handoff allowed returningpendingwithout limiting it to remote gates.Changes:
references/subagent-selection.md, synced into its five skill copies: background launches are for the top-level session only. A subagent passesrun_in_background: falsefor agents whose result it needs, and puts independent launches in one message so they still run in parallel.deliver-spec/references/project-handoff.md:pendingnames only remote or controller-owned gates; never return while your own reviewer or helper is still running.The top-level controller's background launches (ticket owners, watcher relay, repair-gate evidence helper) are unchanged.
Ambiguous plan-comment payload digest
For haze #1570, the planner hashed the comment body without its trailing newline and the controller hashed the raw API body, so the values differed. Common tools disagree too:
jq -randjq -jgive different digests for the same body. The skills described the "payload" in three inconsistent ways and never said which bytes to hash. That also affectsrank_tickets.py, which compares a plan digest with a replan report'spreviousPlanDigestby exact string.Changes:
to-plan/references/github-mode.mdgains a### Payload digestsection:## Implementation planon, without a final</details>line. Other markers keep their whole body.It includes a worked example.
The superseded-wrapper fallback now places the wrapper where that rule expects it.
Every plan and runner-marker digest mention (authority pause/resume, parked/resume-parked, configuration renewal, Wayfinder renewal, replan chain, amendment pinning) now links to that section. The
sha256:placeholders for payload digests are replaced.Evals and tests
test_to_plan_contract.py: a reference implementation of the digest rule. It checks the doc's worked example, that tool-newline, CRLF and wrapper variants agree, and that the case fixtures carry the expected digests.test_workflows_writing_matrix.py: accepted, missing, unsafe and contradictory field variants for each new case.Validation:
npm run build,npm run lint,npm run evals:validate(212 cases) andnpm testpass. No live model evals were run. The new cases grade written decision artifacts, so they don't prove live nested-agent behaviour. Also note that the eval harness setsCLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1, which may hide the reviewer bug in live runs.No version bump.