Skip to content

feat(#1500)!: support native Codex review and retro dispatch - #1542

Closed
dhshah13 wants to merge 12 commits into
fullsend-ai:mainfrom
dhshah13:codex/1501-local-validation
Closed

dhshah13 wants to merge 12 commits into
fullsend-ai:mainfrom
dhshah13:codex/1501-local-validation

Conversation

@dhshah13

@dhshah13 dhshah13 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Review and retro instructions for Codex native child agents (spawn_agent / wait_agent / close_agent, collaboration V1). Claude Code and pi dispatch is unchanged. Needs the runtime side in fullsend-ai/fullsend#7809.

Related Issue

Addresses #1500, for fullsend-ai/fullsend#6970. Continues and supersedes #1501, whose V2 fork_turns and bare wait calls are rejected by #7809's dispatch guard; closing #1501 is the maintainers' call.

Changes

Codex only:

  • Review keeps its triage-selected personas, risk assessment and fresh challenger, with at most four open children: wait for one, collect it, close it, then refill. Retro uses agent_type: "default" for each investigation. Spawns always pass fork_context: false; models stay a runner decision.
  • A child that ends errored, shutdown, not_found or completed with no result is final: close it and apply that role's existing failure fallback instead of waiting forever.
  • At the time-budget checkpoint, collect only children already completed, then write the time-budget failure; teardown reaps the rest.
  • Skill files are read in chunks, because Codex truncates long command output.

All runtimes:

  • Review reads the base checkout from $FULLSEND_TARGET_REPO_DIR (it is not always target-repo, e.g. on GitLab).
  • Review and retro read inputs by exact name and never dump the environment or read .env.d/, .gcp-oidc-token or /tmp/.gcp-credentials.json. This is hardening beyond feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's scope and needs maintainer sign-off.
  • README and docs/review.md / docs/retro.md say Codex stays unsupported until the runtime lands; no harness runtime: default changes.

BREAKING CHANGE: Codex review/retro need the paired runtime from fullsend-ai/fullsend#7809 and its V1 contract; V2 delegation is refused, not replaced with root-only work.

Testing

  • make lint passes (skillsaw strict, 0 errors/warnings). The pr-review context-budget ceiling moved from 16,784 to 16,926 tokens in feat(#1500): dispatch review and retro children on Codex #1501's 760d846, which this PR includes; the skill now sits at 16,925.
  • Tests added/updated for new or modified logic (Tier 1 helper tests, 44 pass)

Live runs with these instructions, gpt-5.6-luna at medium effort:

Run Codex 0.157.0 Codex 0.158.0
Codex only: review ✅ 8 children, 97 responses ✅ 8 children, 106 responses
Codex only: retro ✅ 4 children, 52 responses ✅ 4 children, 59 responses
Fullsend (#7809): review ✅ 8 children, 98 responses ✅ 8 children, 106 responses
Fullsend (#7809): retro ✅ 4 children, 49 responses ✅ 4 children, 63 responses

Every child completed and was closed before the result was written, with at most 4 open at once. Triage, code and fix on the same build keep the no-child path or complete normally (see fullsend-ai/fullsend#7809).

Not covered: a live child that errors or returns empty, Claude/pi runs with the new text, and GitLab.

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

fullsend-ai-coder Bot and others added 3 commits September 25, 2026 15:06
Teach review and retro to use Codex native spawn_agent children
alongside the existing Claude/pi Agent-tool path. Selection stays
need-based; Codex runs at most four open children, then wait/close
before the rest and the isolated challenger. Retro keeps unnamed
generic children. Docs stay conditional on fullsend #6970 and live
verification.

Note: pre-commit could not fetch hook repos (HTTP 403). Equivalent
checks were run directly (whitespace/EOF, gitleaks, lint-agent-docs,
skillsaw --strict). Live Codex review/retro was not executed because
fullsend #6970 has not landed.

Closes fullsend-ai#1500
Restate the Codex spawn_agent/wait/close_agent lifecycle locally in
the security-triage pre-pass (step 3c-1 item 4) instead of relying on
cross-reference, format the runtime conditions as bold-lead-in
bullets to match step 4 item 2's style, and state explicitly that
instruction-only Explore is the accepted Codex policy for this
pre-pass until fleet review/retro on Codex is supported. Also fix
"Codex sub-agent" to "Codex subagent" in agents/retro.md to match the
file's established spelling. Regenerate .skillsaw-baseline.json's
ceiling for skills/pr-review/SKILL.md's context-budget violation to
reflect the added content (skillsaw baseline; no other content
changed).

Addresses fullsend-ai#1501
Merge current main while preserving the original native-dispatch work.
Require complete skill reads, fresh child context, bounded wait and close
handling, isolated challenge, and explicit generic retro roles. Restrict
review input discovery to task variables and supplied artifacts.

BREAKING CHANGE: Codex review and retro require the paired native-child
runtime update and a supported V1 collaboration model with close_agent.
Parent-only substitution cannot satisfy the required child workflow.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Functional tests are running

Authorization passed for this commit. See the Functional Tests workflow for results.

@github-actions

Copy link
Copy Markdown

Functional tests did not run

Functional tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:38 PM UTC · Completed 7:58 PM UTC

Commit: 2485420 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $5.52

@fullsend-ai-review fullsend-ai-review Bot added the risk/elevated PR risk: elevated label Sep 28, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Risk Assessment: elevated (3/5)

Details

Re-review anchoring applies: Tier 1 signals are unchanged from the prior assessment (10 files, protected-path count 6, no dependency changes, non-first-time author), Tier 2 still shows heavy 90-day fix/revert churn and multi-author contention on the touched skill/agent/doc files, and Tier 3 still shows a self-declared breaking-change title, a disclosed scope overrun needing maintainer sign-off, and no rollback safety net for protected agents/skills changes; no tier gives a specific reason to move off the prior score, so the elevated score of 3 is preserved.

Previous run

Risk Assessment: elevated (3/5)

Details

Re-review anchoring applies: Tier 1 signals are unchanged from the prior assessment (10 files, protected-path count still 6, no dependency changes, non-first-time author), and the diff between the prior head (ad5bc90) and current head (c80352f) is only 2 commits across 4 files consisting of wording/terminology fixes (removing an unvalidated V2 spawn branch, adding a credential path to a never-read list, fixing wait->wait_agent) -- none of which reduce the underlying risk drivers. Tier 2 still shows heavy 90-day fix/revert churn and multi-author contention on the touched skill/agent files, and Tier 3 still shows a self-declared BREAKING CHANGE title, an explicit unchecked human-approval merge gate in the PR body, and no feature-flag/rollback safety net for behavior changes to protected agents/ and skills/ files. No tier provides a specific, articulable reason to move off the prior score, so the elevated score of 3 is preserved.

Previous run (2)

Risk Assessment: elevated (3/5)

Details

Re-review of the current head vs prior assessment (4bbc3f2): Tier 1 signals remain in the same buckets (10 files, protected-path count still >=2 at 6, no dependency changes, non-first-time author), so per re-review anchoring the prior elevated score is the baseline. Tier 2 churn analysis shows continued high-frequency edits and fix/revert history on the touched skill/agent files plus notable change-coupling gaps, and Tier 3 shows unmet acceptance criteria (explicit PENDING live-workflow validation, unchecked merge gates) and no rollback/feature-flag safety net for a self-declared breaking dispatch-behavior change, so the elevated score of 3 is preserved.

Previous run (3)

Risk Assessment: elevated (3/5)

Details

Re-review of head 4bbc3f2: Tier 1 signals are effectively unchanged from the prior assessment (same file-count bucket, protected-path count still >=2, no dependency changes, non-first-time author), so per re-review anchoring the prior elevated score is preserved; the additional commit only added further churn on already high-frequency skill files and did not reduce the protected-path or breaking-change risk drivers, consistent with the protected-path-edit-with-breaking-change anchor (self-declared 'feat!' altering review/retro sub-agent dispatch behavior across 6 protected-path files).

Previous run (4)

Risk Assessment: elevated (3/5)

Details

Weighted composite (Tier1=2, Tier2=3, Tier3=2) computes to ~2.3, but 5 protected-path files touching agents/skills dispatch logic, a self-declared BREAKING CHANGE against review/retro sub-agent behavior, and heavy historical churn on the touched skill files push the score to elevated (3), consistent with the protected-path-edit-with-breaking-change anchor.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] agents/review.md (and 5 other files) — This PR modifies files under the active REVIEW_PROTECTED_PATHS prefixes agents/ and skills/: agents/retro.md, agents/review.md, skills/pr-review/SKILL.md, skills/pr-review/sub-agents/risk-assessment.md, skills/pr-risk-assessment/SKILL.md, skills/retro-analysis/SKILL.md. The PR links to issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500, which gives a detailed six-item implementation scope and explicit acceptance criteria covering most of these changes, and the PR body explains the rationale in depth, including explicitly flagging that some of the included hardening still needs maintainer sign-off — this qualifies as sufficient context. Human approval is still always required for protected-path changes regardless of context; the PR is not a draft (confirmed via the forge API: draft: false).
    Remediation: A human maintainer must review and explicitly approve changes to these protected governance/instruction paths before merge. See also the scope-authorization finding below — part of this protected-path content (env/workspace hardening in both agents/review.md and agents/retro.md) is not covered by issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's stated scope and awaits sign-off.

Low

  • [logic-error] skills/pr-review/SKILL.md:841 — The Codex V1 wait loop's time-budget interaction is still ambiguous: step 4 says "On timeout or running, wait again. Except at the Time budget checkpoint, repeat until queue and open set are empty." The "Except" clause grammatically attaches to the loop's overall termination condition ("repeat until queue and open set are empty"), not to the "wait again" retry itself, and the Time budget checkpoint (line ~111, restated at line 846) still fires only "when a sub-agent returns after step 4" — timeout/running is explicitly defined elsewhere as not completion. Since this text only governs the Codex V1 dispatch path, and Codex is not yet a supported fleet runtime (no harness runtime: default points to it; README/docs/review.md say it stays conditional pending feat(#6970)!: support native Codex review and retro children fullsend#7809), this cannot fire in production today — hence low rather than medium. It should still be tightened before Codex is enabled as a fleet runtime.
    Remediation: Reword the checkpoint so it fires on every wait_agent return — including timeout, running, and absent — not only on completion: recompute REMAINING and apply the 240s failure path before waiting again.

  • [logic-error] agents/retro.md:119 — This PR adds the same Codex singleton wait/close loop to retro ("A timeout frees no slot; wait again... Repeat until the queue and open set are empty"), but retro has no time-budget checkpoint concept at all (no TIMEOUT_SECONDS in harness/retro.yaml, no time-budget language in agents/retro.md or skills/retro-analysis/SKILL.md, confirmed absent from both this diff and the base branch). The Output section (line ~148) unconditionally requires the open-ID set to be empty before the first agent-result.json write, with no exception. A hung or long-pole Codex investigation child has no defined escape before harness/retro.yaml's 30-minute timeout_minutes kills the sandbox, leaving no output written. This mirrors review's still-imperfect fix (see the SKILL.md finding above) but retro doesn't even have the partial escape review has. Low severity for the same reason: Codex is not yet an enabled fleet runtime for retro.
    Remediation: Before enabling Codex for retro, add a time-budget escape analogous to review's: past a defined remaining-time threshold, stop waiting, close only already-completed IDs, and allow writing agent-result.json (summarizing which investigations didn't finish) without requiring an empty open-ID set.

  • [data-exposure] agents/retro.md:93 — The new root-level Execution checkpoints forbid env dumps and reading .env.d/, .gcp-oidc-token, and /tmp/.gcp-credentials.json, but children are explicitly self-contained ("the child starts with no memory of this conversation") and Codex children spawn with fork_context: false. Neither the child-dispatch text nor the example investigation prompts in skills/retro-analysis/SKILL.md repeat these constraints, so a spawned child (e.g. a harness-inspector task reading harness YAML that names these same credential mount paths) is not told to avoid them. This is instruction-level defense-in-depth, not a demonstrated leak.
    Remediation: Include the named env-var lookup and credential never-read list explicitly in every retro child spawn message, and add them to the example prompts in skills/retro-analysis/SKILL.md.

  • [data-exposure] skills/pr-review/SKILL.md:752 — Carried over from the prior review round: review's dimension sub-agent prompts are still composed only from sub-agents/{name}.md + meta-prompt.md + the context package (security-triage uses parts 1-3 only), and neither skills/pr-review/meta-prompt.md nor the sub-agents/*.md files (other than risk-assessment.md, which only gained a CODEX_HOME fallback) were touched by this PR. None of those templates mention .env.d/, .gcp-oidc-token, or /tmp/.gcp-credentials.json. Codex dimension spawns and the security-triage spawn both set fork_context: false, so children do not inherit agents/review.md's root-level never-read rules.
    Remediation: Add the credential never-read list and workspace-search bounds to skills/pr-review/meta-prompt.md, and to the security-triage composed prompt (which doesn't include meta-prompt.md), so every dispatched child carries them.

  • [scope-authorization] agents/review.md:22 — The env-variable allowlist and never-read rules in agents/review.md's Execution checkpoints/Workspace sections — now mirrored into agents/retro.md:17-21 as well — sit outside issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's six-item Codex-dispatch scope, which says nothing about environment-variable read restrictions or workspace-search boundaries. This is unchanged in substance across the last several review rounds. The PR body itself discloses this directly: "This is hardening beyond feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's scope and needs maintainer sign-off." Because the author discloses the gap and explicitly requests sign-off rather than hiding it, this reads as a disclosed process item rather than concealed scope creep — hence low rather than the medium severity used in prior rounds on this same content, now that it's a known, repeatedly-flagged, and openly-acknowledged item awaiting maintainer action.
    Remediation: Obtain the explicit maintainer sign-off the PR body requests before merging this hardening alongside the feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500-authorized Codex-dispatch work, or split it into its own separately-authorized PR. The hardening itself is a legitimate security control — the outstanding issue is process/authorization, not content.


Re-review note: The prior medium logic-error (Codex wait-loop vs. 240s time-budget) persists in skills/pr-review/SKILL.md, but is downgraded to low here: Codex is confirmed still not an enabled fleet runtime for review or retro (no harness runtime: default targets it; README/docs explicitly keep it conditional on fullsend-ai/fullsend#7809), so the ambiguous wording cannot currently produce a stuck run in production. The same class of gap is newly introduced in agents/retro.md's new Codex dispatch text, with no time-budget escape at all (retro never had one). The prior medium scope-authorization finding on agents/review.md's env/workspace hardening persists in substance — that content is still not covered by issue #1500 and still awaits maintainer sign-off, disclosed again in this PR's body — but is downgraded to low here since the author continues to disclose it openly rather than concealing it, and it has now been raised in multiple consecutive rounds without change. The two prior low data-exposure findings (root-level hardening not propagated into dispatched child prompts, for both retro and review) are not observed to be resolved in this diff — retro's root now has the never-read rules, but its child-dispatch text and example prompts still don't, and review's meta-prompt.md/sub-agents/*.md templates remain untouched. The protected-path finding is preserved unchanged: this PR still touches 6 protected files, has sufficient linked-issue/PR-body context, and requires human maintainer approval before merge.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run

Review

Findings

Medium

  • [logic-error] skills/pr-review/SKILL.md:841 — The Codex V1 wait loop makes the 240s time-budget failure checkpoint unreachable whenever the waited-on child has not yet completed. Step 4 requires wait_agent on a single ID until completed with a nonempty result, and treats timeout/running/absent as non-completion: "wait again" (lines 836-843). The time-budget checkpoint fires only "when a sub-agent returns after step 4" under 240s remaining (Time budget section, lines 109-117); a wait timeout is explicitly not a sub-agent return, so the retry loop never re-evaluates REMAINING. Combined with singleton targets: [id], completions of other already-finished open children are also invisible until the chosen ID completes. A long-pole or hung wait target can hold the orchestrator until sandbox kill, so agent-result.json is never written — the exact failure the 240s checkpoint exists to prevent. agents/review.md's Execution checkpoints name the 240s exception next to the timeout rule but still defer to this checkpoint definition, so it does not close the gap.
    Remediation: After every wait_agent return — including timeout, running, and absent — recompute REMAINING and apply the 240s failure checkpoint immediately. Do not "wait again" past that budget. Keep the existing rule that timeouts free no slot and running children must not be closed.

  • [scope-authorization] agents/review.md:28 — The env-variable allowlist block (lines 28-46) and Workspace section (lines 242-253) implement prompt-injection/credential-exposure hardening unrelated to issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's six-item Codex-dispatch scope. Issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500 does not mention environment-variable read restrictions or workspace-search boundaries. This content is unchanged since the prior review round (only a single new credential path was added to the already out-of-scope never-read list this commit), and the PR body itself still states this hardening "is explicit and still needs maintainer signoff" and "does not satisfy protected-path merge approval," with the corresponding merge-gate checkbox still unchecked.
    Remediation: Do not treat this hardening as authorized by issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500. Split it into its own PR with its own issue/authorization, or obtain the explicit maintainer signoff the PR body says is still outstanding before merging it alongside the Codex-dispatch changes feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500 does authorize. Do not strip the hardening to reduce scope — it is a legitimate security control, just one needing separate authorization.

  • [protected-path] agents/review.md (and 5 other files) — This PR modifies files under the active REVIEW_PROTECTED_PATHS prefixes agents/ and skills/: agents/retro.md, agents/review.md, skills/pr-review/SKILL.md, skills/pr-review/sub-agents/risk-assessment.md, skills/pr-risk-assessment/SKILL.md, skills/retro-analysis/SKILL.md. The PR links to issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500, which gives a detailed six-item implementation scope and explicit acceptance criteria covering most of these changes, and the PR body explains the rationale in depth, including an unchecked checklist item explicitly flagging that protected-path changes still need maintainer approval — this qualifies as sufficient context. Human approval is still always required for protected-path changes regardless of context; the PR is not a draft (confirmed via the forge API: draft: false).
    Remediation: A human maintainer must review and explicitly approve changes to these protected governance/instruction paths before merge. See also the scope-authorization finding above — part of this protected-path content (env/workspace hardening) is not covered by issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's stated scope.

Low

  • [data-exposure] agents/retro.md:95 — agents/review.md gained env-dump and credential never-read rules in its Execution checkpoints/Workspace sections this round, but agents/retro.md did not, despite the same sandbox mounts applying to both agents: harness/retro.yaml copies ${GOOGLE_APPLICATION_CREDENTIALS} to /tmp/.gcp-credentials.json, mounts .env.d/ and .gcp-oidc-token, and policies/base.yaml grants the sandbox read_write on /tmp and /sandbox. Retro's Execution checkpoints have no named-var lookup and never forbid printenv/env/set. Codex spawn uses agent_type: "default" with the current tool set (Bash/Read) and fork_context: false, so children neither inherit parent instructions nor receive a denylist in the task message.
    Remediation: Mirror review's named env-var lookup (no printenv/env/set, no FULLSEND_* prefix dumps) and Workspace never-read list (.env.d/, .gcp-oidc-token, /tmp/.gcp-credentials.json; no recursive workspace/session browse) into agents/retro.md. Repeat those constraints in every child spawn message so fork_context: false children still apply them.

  • [data-exposure] skills/pr-review/SKILL.md:823 — The new never-read/env-allowlist rules live only on the review root (agents/review.md Execution checkpoints and Workspace). Codex dispatch sets fork_context: false, so children do not inherit them. Child prompts are sub-agents/{name}.md + meta-prompt.md + the context package; none of those include .env.d/, .gcp-oidc-token, or /tmp/.gcp-credentials.json. Most dimension personas are Read/Grep/Glob (sufficient to open those paths); risk-assessment also has Bash. This is prompt-level defense-in-depth only — policies/base.yaml still allows reading /tmp at the sandbox level.
    Remediation: Add the credential never-read list and workspace-search bounds to skills/pr-review/meta-prompt.md (or spawn Part 0) so every Codex/Claude/pi child prompt includes them. Explicitly pass fork_context: false on the security-triage Codex spawn as well.


Re-review note: Three findings from the prior review round are not observed in the current diff: the agents/retro.md unvalidated-V2 fork_turns branch (now consistently requires verified V1 fork_context: false plus close_agent, reporting unsupported otherwise); the missing /tmp/.gcp-credentials.json entry in agents/review.md's never-read list (now present); and the wait vs wait_agent terminology mismatch in docs/review.md (now consistently wait_agent). The prior medium scope-authorization and protected-path findings on agents/review.md's env/workspace hardening are preserved — that content is unchanged since the prior review, and the PR body's disclosure of the scope gap does not substitute for authorization or maintainer signoff. This round also surfaces a new medium logic-error in the Codex V1 wait-loop's interaction with the 240s time-budget checkpoint, and two new low data-exposure findings on inconsistent credential-hardening coverage between retro and review, and between the review root and its dispatched children.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (2)

Review

Findings

Medium

  • [logic-error] agents/retro.md:100 — agents/retro.md's Codex dispatch bullet for generic retro investigation children still presents unvalidated V2 fork_turns: "none" as a spawn argument (lines 99-100), while the same bullet says only V1 with close_agent is validated and otherwise to report unsupported (lines 108-110). This PR's own latest commit already removed the equivalent V2 branch from skills/pr-review/SKILL.md (now fork_context: false only, "Never ... send V2 arguments"), but left the old dual-schema wording in agents/retro.md. Retro's Output section unconditionally requires an empty open-ID set before writing agent-result.json, with no time-budget-style exception (unlike the review skill, which this same PR patched for an analogous contradiction). This is an instruction inconsistency between the two Codex-dispatch write-ups in the same PR, not a currently-triggerable production deadlock (Codex is not yet a supported fleet runtime for retro, and the same bullet already says to report unsupported rather than proceed without V1 close_agent).
    Remediation: Match skills/pr-review/SKILL.md: drop the unvalidated-V2 fork_turns branch from agents/retro.md. Always require verified V1 (fork_context: false) plus close_agent before spawning; if unavailable, report unsupported and do not spawn.

  • [scope-authorization] agents/review.md:28 — The env-variable allowlist block (lines 28-44) and the rewritten Workspace section (lines 242-253) implement prompt-injection/credential-exposure hardening unrelated to Codex dispatch compatibility. This content is unchanged since the prior review (only time-budget/Codex-closure wording changed in the interim commit, confirmed via the GitHub compare API). Issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's six-item implementation scope does not mention environment-variable read restrictions or workspace-search boundaries anywhere. The PR body discloses this directly: "This additional scope is explicit and still needs maintainer signoff; it does not satisfy protected-path merge approval." The disclosure means the scope creep is not hidden, but it is still not authorized by the linked issue, and the author's own words confirm maintainer signoff remains outstanding.
    Remediation: Do not treat this hardening as authorized by issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500. Either split it into its own PR with its own issue, or obtain the explicit maintainer signoff the PR body itself says is still required, before merging it alongside the Codex-dispatch changes feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500 does authorize. Do not simply strip the hardening to reduce scope — it is a legitimate security improvement, just one that needs separate authorization.

  • [protected-path] agents/review.md (and 5 other files) — This PR modifies files under the active REVIEW_PROTECTED_PATHS prefixes agents/ and skills/: agents/retro.md, agents/review.md, skills/pr-review/SKILL.md, skills/pr-review/sub-agents/risk-assessment.md, skills/pr-risk-assessment/SKILL.md, skills/retro-analysis/SKILL.md. The PR links to issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500, which gives a detailed six-item implementation scope and explicit acceptance criteria covering most of these changes, and the PR body explains the rationale in depth, including an unchecked checklist item explicitly flagging that protected-path changes still need maintainer approval — this qualifies as sufficient context. Human approval is still always required for protected-path changes regardless of context; the PR is currently in draft state.
    Remediation: A human maintainer must review and explicitly approve changes to these protected governance/instruction paths before merge. See also the scope-authorization finding above — part of this protected-path content (env/workspace hardening) is not covered by issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's stated scope.

Low

  • [data-exposure] agents/review.md:251 — The new Workspace "never read" list names .env.d/ and .gcp-oidc-token but not the harness's actual GCP credential mount: harness/review.yaml copies ${GOOGLE_APPLICATION_CREDENTIALS} to /tmp/.gcp-credentials.json, env/gcp-vertex.env exports that path, and policies/base.yaml grants the sandbox read_write on /tmp (confirmed on the base branch, unchanged by this PR). The python3 env-var allowlist correctly omits GOOGLE_APPLICATION_CREDENTIALS, so env-dump discovery of the path is blocked, but nothing in the new denylist stops a direct read of the well-known /tmp/.gcp-credentials.json path.
    Remediation: Add /tmp/.gcp-credentials.json to the never-read list beside .env.d/ and .gcp-oidc-token, and note that credential files must not be read even via a path that is already known rather than discovered through env/printenv.

  • [naming-convention] docs/review.md:259 — docs/review.md describes the Codex tool triplet as spawn_agent / wait / close_agent, but agents/review.md, agents/retro.md, and skills/pr-review/SKILL.md all consistently name the waiting call wait_agent.
    Remediation: Change wait to wait_agent on this line for terminology consistency with the rest of the repo.


Re-review note: The prior review's high-severity logic-error (the Codex close-before-write vs. 240s time-budget contradiction in skills/pr-review/SKILL.md) and both prior medium findings on the security-triage Codex spawn (api-contract, fail-open) are not observed in the current diff — the time-budget checkpoint now carries an explicit exception across skills/pr-review/SKILL.md, agents/review.md, and docs/review.md; unlisted Codex personas now use agent_type: "default"; and an unlisted security-triage persona on Codex now fails closed (no spawn, all-files-security-critical fallback) instead of falling back to a less-constrained generic child. However, the same fork-context/closure inconsistency this PR fixed for review was left unresolved in the analogous agents/retro.md Codex dispatch text (new medium finding above). The prior medium scope-authorization finding on agents/review.md's env-var/workspace hardening is preserved — that content is unchanged since the prior review, and the PR body's new explicit disclosure of the scope gap does not substitute for authorization or maintainer signoff.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (3)

Review

Findings

High

  • [logic-error] skills/pr-review/SKILL.md:1368 — The Codex close-before-write protocol and the existing time-budget failure path cannot both be followed. Time budget (SKILL.md:113-116, restated at 846-847) requires: when a step-4 child returns with under 240s remaining and others still outstanding, stop waiting and write a failure result with reason: time-budget. Pipeline mode (SKILL.md:1368-1369), newly added by this PR, says to close every completed child before writing, that no child ID may remain open, and to never close running children. agents/review.md's Execution checkpoints (~line 82-84) likewise require the open-ID set to be empty before the first agent-result.json write. On a 4-slot Codex run with in-flight (not-yet-completed) IDs at T-240s, the orchestrator can neither close those children (forbidden), nor keep waiting (time budget forbids it), nor write (open-ID set isn't empty) — defeating the exact failure the 240s checkpoint exists to prevent. docs/review.md still describes the 240s write as working unchanged.
    Remediation: Add an explicit Codex exception to the 240s checkpoint, step 7, and agents/review.md's Execution checkpoints: drain singleton wait/close only for IDs already completed with a result, then write the time-budget failure even if other IDs are still running/unclosed. State that remaining children are reaped by sandbox teardown and that the empty-open-ID rule does not apply to this failure path.

Medium

  • [api-contract] skills/pr-review/SKILL.md:829 — Codex spawn for an unlisted persona (step 4 at lines 828-829, and the security-triage fallback at 466-468) is specified only as "the runtime-provided generic child" with no concrete agent_type value. agents/retro.md (line 96) requires the concrete string agent_type: "default" for every Codex generic investigation child. spawn_agent needs an agent_type string, and unlike pi's unlisted path (which explicitly omits subagent_type), the review skill gives Codex no named value or runtime-note field to copy for the unlisted case. The two Codex-dispatch sections added by this PR (retro vs. review) disagree on the generic-child contract.
    Remediation: Use agent_type: "default" (matching agents/retro.md) for the Codex unlisted-persona and security-triage-unlisted cases, or cite the exact runtime-note field whose value must be copied into agent_type.

  • [fail-open] skills/pr-review/SKILL.md:467 — The security-triage pre-pass builds its prompt from untrusted diff excerpts, and Claude/pi always constrain it to a read-only child (Claude: subagent_type: Explore; pi unlisted: keep Explore; the listed security-triage persona's own frontmatter is tools: Read, Grep, Glob, no Bash). On Codex, when the security-triage persona is not in the runtime note, the newly-added text (SKILL.md:466-469) spawns "the runtime-provided generic child" and states "Explore is instruction-only" — i.e. not enforced. A missing/unlisted persona therefore falls back to a less-constrained child instead of refusing the spawn, for the one pre-pass step that previously special-cased staying read-only against attacker-controlled diff text.
    Remediation: When security-triage is not listed for Codex, do not spawn a generic child. Fail closed: skip the spawn and either classify in the orchestrator without Bash/write tools, or apply the existing triage-failure fallback (treat all files as security-critical). Keep spawn_agent agent_type=security-triage only when that persona is actually registered.

  • [scope-authorization] agents/review.md:28 — The new "Execution checkpoints" block in agents/review.md is not only a Codex-dispatch counterpart of agents/retro.md's checkpoints. The opening bullet (lines 28-56: named non-secret workflow-variable allowlist via a python3 script, "never dump env/printenv/set") and the rewritten Workspace section (~236-250: forbidding recursive search of /sandbox/workspace and naming .env.d//.gcp-oidc-token as never-read) is prompt-injection/credential-exposure hardening unrelated to Codex dispatch compatibility. agents/retro.md's checkpoints cover only skill-read completeness, the singleton wait/close loop, and the empty-open-ID-before-write rule — no equivalent env/workspace hardening. Issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's six-item implementation scope does not mention environment-variable read restrictions or workspace-search boundaries; this is a second, distinct improvement bundled into a protected-path file (agents/) alongside the Codex-dispatch changes the issue does authorize.
    Remediation: Split the env-var-allowlist / workspace-boundary hardening into its own PR with its own issue/authorization, or obtain explicit maintainer sign-off that it falls within feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's scope before merging it alongside the Codex-dispatch wording changes.

  • [protected-path] agents/review.md (and 5 other files) — This PR modifies files under the active REVIEW_PROTECTED_PATHS prefixes agents/ and skills/: agents/retro.md, agents/review.md, skills/pr-review/SKILL.md, skills/pr-review/sub-agents/risk-assessment.md, skills/pr-risk-assessment/SKILL.md, skills/retro-analysis/SKILL.md. The PR links to issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500, which gives a detailed six-item implementation scope and explicit acceptance criteria covering most of these changes, and the PR body explains the rationale in depth (including a checklist item explicitly flagging that protected-path changes need maintainer approval) — this qualifies as sufficient context. Human approval is still always required for protected-path changes regardless of context; the PR itself is currently in draft state.
    Remediation: A human maintainer must review and explicitly approve changes to these protected governance/instruction paths before merge. See also: the scope-authorization finding on agents/review.md above — part of the protected-path content (env/workspace hardening) is not covered by issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's stated scope.


Re-review note: Both high-severity findings from the prior review (the wait_agent singleton-vs-multi-target contradiction, and the missing CODEX_HOME fallback in skills/pr-review/sub-agents/risk-assessment.md) are not observed in the current diff — both now consistently use the singleton wait_agent/close_agent loop and the ${CLAUDE_CONFIG_DIR:-${CODEX_HOME:?...}} fallback. The prior style/naming findings (fence style, "the note's generic child" phrasing, the relative markdown link in skills/retro-analysis/SKILL.md) are likewise not observed in the current diff. The findings above are new to this commit's Codex closure/spawn wording and the added agents/review.md workspace-hardening content.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (4)

Review

Findings

High

  • [stale-reference] skills/pr-review/sub-agents/risk-assessment.md:27 — skills/pr-risk-assessment/SKILL.md was updated to resolve the Tier 1 helper via ${CLAUDE_CONFIG_DIR:-${CODEX_HOME:?Set CLAUDE_CONFIG_DIR or CODEX_HOME}} (PR-head line 199), but the untouched sub-agent file still has the bare ${CLAUDE_CONFIG_DIR} form at Procedure step 1. Per skills/pr-review/SKILL.md step 3c-2 item 4, the composed risk-assessment prompt is Part 1 = the full verbatim body of sub-agents/risk-assessment.md, then Part 2 = the full body of pr-risk-assessment/SKILL.md. The assembled prompt therefore contains both the old invocation (the child's own numbered Procedure step 1, most likely followed first) and the new one. On Codex, where CLAUDE_CONFIG_DIR is unset, the old form fails outright, defeating this PR's stated Codex path-resolution goal.
    Remediation: Apply the same fallback expansion to skills/pr-review/sub-agents/risk-assessment.md Procedure step 1 so both copies agree.

  • [api-contract] skills/pr-review/SKILL.md:838 — This PR documents two incompatible wait_agent targeting shapes for the same Codex V1 runtime. agents/review.md and agents/retro.md's Execution checkpoints require a singleton loop: wait_agent with targets: [id], repeat until that ID is completed, then close only that ID. skills/pr-review/SKILL.md:838-841 instead says "wait_agent with targets = open IDs returns on any completion or timeout" — a multi-target wait on the full open set. The skill's own Constraints say the agent definition wins on conflict, so step 4's Codex V1 bullet is self-invalidating; whichever shape doesn't match the paired runtime will fail at runtime for the feature this PR delivers. (Independently raised by three review dimensions, confirming this is a real contradiction, not a false positive.)
    Remediation: Pick one wait_agent targeting semantics and make agents/review.md, agents/retro.md, and skills/pr-review/SKILL.md consistent before merge.

Medium

  • [commit-message-classification] PR title — The PR title uses fix(#1500)!: but linked issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500 is titled feat(review,retro): ... and labeled feature. The diff is additive instructional work: harness defaults stay on claude/pi, and README/docs explicitly say Codex is not a supported fleet runtime yet. A fix!: label mismatches both the issue's own classification and the additive nature of the change.
    Remediation: Retitle to feat(#1500): ... or feat(review,retro): .... The ! marker is a closer call given the PR's own BREAKING CHANGE trailer — keep it only if maintainers agree the Codex close_agent requirement warrants it at the title level.

  • [protected-path] agents/review.md — This PR modifies files under REVIEW_PROTECTED_PATHS prefixes: agents/retro.md, agents/review.md, skills/pr-review/SKILL.md, skills/pr-risk-assessment/SKILL.md, skills/retro-analysis/SKILL.md (all under the protected agents/ and skills/ prefixes). Issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500 authorizes and scopes most of these with a detailed implementation plan, and the PR body explains the rationale — this qualifies as sufficient context. Human approval is still always required for protected-path changes regardless of context. Two changed files (agents/review.md, skills/pr-risk-assessment/SKILL.md) are absent from issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's explicit numbered file list.
    Remediation: A human maintainer must review and explicitly approve changes to these protected governance/instruction paths before merge.

Low

  • [data-exposure] agents/review.md:237 — The new Execution checkpoints forbid env/printenv/set, prefix selection, and recursively searching the workspace root or runtime/session directories to avoid exposing credentials. The pre-existing Workspace section still says that if target-repo/ is missing, "search within /sandbox/workspace" — a directory that does contain secret-bearing files in this sandbox. This is an instruction gap rather than a demonstrated leak.
    Remediation: Replace the Workspace fallback with an explicit named-path lookup and name paths that must never be read (.env.d/, .gcp-oidc-token, CLAUDE_CONFIG_DIR/CODEX_HOME contents).

  • [scope-authorization] agents/review.md — Issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's numbered implementation-scope list does not name agents/review.md, yet this PR adds a ~60-line Execution checkpoints block to it. The issue's stated goal and acceptance criteria reasonably extend to review-agent instruction changes (the counterpart of the authorized retro-agent checkpoints), so this reads as a file-list omission rather than unauthorized new capability.
    Remediation: Note on the issue or PR that agents/review.md is included as the review-agent counterpart of the authorized agents/retro.md checkpoints; no revert needed.

  • [scope-authorization] skills/pr-risk-assessment/SKILL.md — This file is not in issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's numbered file list; the PR body attributes the hunk to carryover from feat(#1500): dispatch review and retro children on Codex #1501. Issue feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's acceptance criteria require a Codex review to schedule risk assessment among the selected tasks, which is why this path needs to resolve on Codex — the hunk is necessary, not scope creep.
    Remediation: Leave the hunk; record on the PR/issue that the risk-helper fallback is required for feat(review,retro): support Codex native sub-agent dispatch alongside fullsend #6970 #1500's Codex risk-assessment acceptance criteria.

  • [code-organization] skills/pr-review/SKILL.md:459 — Step 3c-1 and step 4 item 2 now use different taxonomy/ordering/capitalization for runtime dispatch cases (runtime-first vs persona-status-first bullets; capitalized "Pi" vs lowercase "pi"). Before this change both sections used the same taxonomy.
    Remediation: Harmonize bullet structure, ordering, and capitalization between step 3c-1 and step 4 item 2 (lowercase "pi" throughout).

  • [naming-convention] skills/pr-review/SKILL.md:466 — "the note's generic child" (also at line 829) is inconsistent with nearby established phrasing in the same file, e.g. "this run's servable default" and agent_type: "default".
    Remediation: Replace "the note's generic child" with established terminology such as "the runner's sub-agent default".

  • [doc-style] agents/review.md:33 — The new Execution checkpoints code block uses a sh fence; other shell blocks in agents/review.md and agents/retro.md use bash.
    Remediation: Change sh to bash.

  • [code-organization] skills/retro-analysis/SKILL.md:59 — Introduces a relative markdown link [retro's Codex rules](../../agents/retro.md). Repo skills otherwise reference agent files with backtick paths, and relative upward links are fragile since skills are resolved from multiple roots at runtime. agents/retro.md also has no section literally titled "Codex rules".
    Remediation: Reference agents/retro.md via backtick code formatting instead of a relative link, and cite the actual section names (Execution checkpoints / Exploration approach).


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

fullsend-ai-review[bot]

This comment was marked as outdated.

Use the Claude/Codex config-root fallback in the risk child prompt,
matching the composed risk skill. Align review scheduling with the
validated singleton wait, collect and close sequence.

Restrict missing-checkout discovery to named review inputs while
preserving installed skill/helper reads and protected-path review.
Normalize runtime dispatch wording and the retro section reference.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
@dhshah13 dhshah13 changed the title fix(#1500)!: complete native Codex review and retro dispatch feat(#1500)!: support native Codex review and retro dispatch Sep 28, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:09 PM UTC · Completed 8:29 PM UTC

Commit: 4bbc3f2 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $5.46

fullsend-ai-review[bot]

This comment was marked as outdated.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:02 PM UTC · Completed 9:22 PM UTC

Commit: ad5bc90 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $6.24

Signed-off-by: Dharit Shah <dhshah@redhat.com>
fullsend-ai-review[bot]

This comment was marked as outdated.

Remove the unvalidated V2 example before retro child dispatch, name
wait_agent consistently, and include the harness credential mount
in the review agent's existing never-read boundary.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add guarded Codex child-agent dispatch for review and retro

✨ Enhancement 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Enable native Codex child dispatch without changing which review or retro tasks are selected.
• Require bounded wait-and-close lifecycles, complete evidence, and root-owned synthesis before
 normal output.
• Restrict review input discovery and keep fleet Codex defaults gated on runtime support and live
 verification.
Diagram

graph TD
  Review["Review root"] --> Selection["Selected personas"] --> Codex["Codex lifecycle"] --> Synthesis["Root synthesis"] --> Output["Validated result"]
  Retro["Retro root"] --> Generic["Generic investigations"] --> Codex
  Codex --> Challenger["Fresh challenger"] --> Synthesis
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Enforce scheduling in Fullsend
  • ➕ Could make slot limits, completion evidence, and closure deterministic across agents.
  • ➖ Requires additional runtime work and cannot replace workflow-specific selection and synthesis instructions.

Recommendation: Keep workflow-specific selection and synthesis in the agents while using Codex's native child lifecycle, as proposed. Consider runtime-enforced scheduling separately if live verification shows instruction-level lifecycle controls are insufficient; retain the fleet rollout gate until that verification succeeds.

Files changed (10) +279 / -120

Enhancement (5) +235 / -92
retro.mdDefine guarded Codex retro investigations +60/-5

Define guarded Codex retro investigations

• Requires complete skill reads and generic V1 Codex children with bounded, acknowledged wait-and-close handling. Keeps proposal synthesis and validated output in the root agent.

agents/retro.md

review.mdGuard review inputs and child evidence +85/-8

Guard review inputs and child evidence

• Restricts discovery to named non-secret inputs and staged paths, explicitly forbidding runtime credential reads and broad searches. Adds Codex completion, risk-result retention, challenger closure, and time-budget failure checkpoints.

agents/review.md

SKILL.mdSchedule selected review tasks through Codex V1 +85/-73

Schedule selected review tasks through Codex V1

• Maps selected personas to native Codex children, limits open IDs to four, and requires collected results and acknowledged closure before normal output. Preserves synchronous security triage, isolated challenger dispatch, and the restricted time-budget failure path.

skills/pr-review/SKILL.md

risk-assessment.mdResolve the risk helper under either config root +1/-1

Resolve the risk helper under either config root

• Uses CLAUDE_CONFIG_DIR or CODEX_HOME for the Tier 1 helper and reports an error when neither is set.

skills/pr-review/sub-agents/risk-assessment.md

SKILL.mdAlign skill-level risk helper lookup +4/-5

Align skill-level risk helper lookup

• Matches the composed risk persona's Claude/Codex config-root fallback and clarifies signal parsing and scoring instructions.

skills/pr-risk-assessment/SKILL.md

Documentation (4) +17 / -1
README.mdDocument the Codex rollout gate +2/-0

Document the Codex rollout gate

• States that review and retro remain on Claude or pi until Fullsend runtime support and live Codex verification are available.

README.md

retro.mdDescribe conditional Codex retro support +2/-0

Describe conditional Codex retro support

• Documents generic native children and the requirement for a verified live run before changing fleet runtime defaults.

docs/retro.md

review.mdClarify Codex review rollout and failure behavior +11/-1

Clarify Codex review rollout and failure behavior

• Documents the runtime verification gate and explains that a time-budget failure artifact does not bypass incomplete-child checks or guarantee post-script execution.

docs/review.md

SKILL.mdIdentify retro's generic dispatch policy +2/-0

Identify retro's generic dispatch policy

• Points investigation dispatch guidance to the retro agent's runtime-specific checkpoints and generic-child policy.

skills/retro-analysis/SKILL.md

Other (1) +27 / -27
.skillsaw-baseline.jsonRefresh the skill validation baseline +27/-27

Refresh the skill validation baseline

• Regenerates baseline metadata and ordering, and raises the recorded context-budget ceiling for the expanded review skill.

.skillsaw-baseline.json

@qodo-code-review

qodo-code-review Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (1)

Grey Divider


Action required

1. Codex reviews stall on empty results ✓ Resolved
Description
agents/review.md and agents/retro.md require a nonempty result before closing a child, treating
a terminal empty response as though the child were still running. When a child completes empty,
repeated waits cannot close its ID: review cannot apply its child-failure fallback or write a normal
result, and retro cannot pass its pre-output closure checkpoint; the review time-budget checkpoint
also cannot help when it is the last outstanding child.
Code

agents/review.md[R71-74]

+  per call: `wait_agent` with `targets: [id]`. Repeat for that same ID
+  until it reports `completed` with a nonempty result. Collect the result,
+  immediately close only that ID, and await a successful acknowledgement
+  before selecting another open ID. Never bulk-close a batch after a
Relevance

●●● Strong

This is a concrete terminal-state reliability bug matching the PR’s Codex lifecycle intent.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Both agents’ wait rules require a nonempty result before closing a child, while the review skill
explicitly treats an empty response as a failure to handle. The retro checkpoint and output
instructions prohibit writing while a child ID remains open, and the review time-budget checkpoint
requires other children to remain outstanding, leaving neither path able to resolve a terminal empty
response from the last child.

agents/review.md[70-80]
skills/pr-review/SKILL.md[835-847]
skills/pr-review/SKILL.md[866-885]
skills/pr-review/SKILL.md[109-116]
agents/retro.md[26-36]
agents/retro.md[95-110]
agents/retro.md[134-138]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Codex review and retro can remain blocked when a child completes with an empty result because their closure rules treat it as still awaiting a nonempty response. Review cannot use its child-failure fallback or write a normal result, and retro cannot complete its required pre-output closure checkpoint.

## Fix Focus Areas
- agents/review.md[70-80]
- skills/pr-review/SKILL.md[835-847]
- skills/pr-review/SKILL.md[866-885]
- agents/retro.md[26-36]
- agents/retro.md[95-111]

## Recommended Fix
Distinguish running children from terminal children with empty or failed results, and continue waiting only for running children. Acknowledge closure of terminal children; in review, apply the existing dimension, risk-assessment, triage, or challenger failure fallback as appropriate. In retro, record the missing investigation evidence and either recover the investigation or report failure rather than waiting for a result that cannot arrive.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Reviews fail when the checkout has another name 🐞 Bug ☼ Reliability
Description
The Workspace section of agents/review.md now allows only /sandbox/workspace/target-repo/ or an
alternate path the runner explicitly supplies, and it removes the old fallback of searching
/sandbox/workspace, telling the agent to report missing context instead. The review harness
exports no checkout-path variable, so when the host clone isn't named target-repo (for example a
local --target-repo /tmp/myrepo), the base-branch context and the protected-path checks that read
it are unavailable on every runtime.
Code

agents/review.md[R244-250]

+The target repository is usually checked out at `/sandbox/workspace/target-repo/`.
+That checkout is the base branch. Check only the named workflow paths
+`/sandbox/workspace/target-repo/`, `/sandbox/workspace/pr-head/`,
+`/sandbox/workspace/pr-diff.txt`, `/sandbox/workspace/prior-review.txt`, and
+`/sandbox/workspace/pr-head.manifest`, or exact alternate paths explicitly
+supplied by the runner. If required inputs are missing, report missing
+context instead of searching `/sandbox/workspace`. Never read runtime
Relevance

●● Moderate

Potentially valid harness mismatch, but the PR deliberately restricts workspace discovery for
security hardening.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The old text said the checkout path depends on the path outside the sandbox and told the agent to
search /sandbox/workspace if target-repo/ wasn't found. The new text removes that fallback. The
review harness sets no REPO_DIR or TARGET_REPO_DIR in its sandbox env (the code and fix
harnesses do), and the review env files don't export one either, so the escape hatch for
runner-supplied paths has nothing to use. The eval script and LOCAL.md only work because they happen
to name their clone target-repo.

agents/review.md[244-258]
harness/review.yaml[65-75]
harness/code.yaml[69-69]
env/github/review.env[1-7]
LOCAL.md[82-92]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The review agent now forbids searching `/sandbox/workspace` for the target checkout, but the runner provides no checkout-path variable. When the checkout isn't named `target-repo`, the agent reports missing context instead of reviewing the PR.

## Fix Focus Areas
- agents/review.md[244-258]
- agents/review.md[28-56]
- harness/review.yaml[65-75]

## Recommended Fix
Pick one:
1. Allow a shallow, non-recursive discovery step that skips credential files, for example `find /sandbox/workspace -maxdepth 2 -name .git -type d -not -path '*/.env.d/*'`.
2. Export the checkout path from the harness (for example `TARGET_REPO_DIR` in `env.sandbox`) and add it to the named-variable lookup in the Execution checkpoints section.

Either way, keep the rules that forbid reading `.env.d/`, `.gcp-oidc-token` and `/tmp/.gcp-credentials.json`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

3. Governance changes need human approval 📜 Skill insight § Compliance
Description
The PR changes protected agent instructions in agents/review.md and skills/pr-review/SKILL.md.
Because these paths govern review behavior, the linked issue and explanation justify the work but do
not permit automatic approval.
Code

agents/review.md[R22-24]

+NOTE: sub-agent dispatch MUST ONLY use prompts read from
+`sub-agents/{name}.md` files (Claude Code / pi: Agent tool; Codex:
+`spawn_agent` per the runtime note).
Relevance

● Weak

Recent precedent rejected the same protected-path human-approval finding for governance changes.

PR-#1251

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed review instruction is under agents/, a path that compliance rule 1538392 explicitly
protects and requires to receive human approval even when the PR provides justification.

agents/review.md[22-24]
skills/pr-review/SKILL.md[822-827]
Skill: pr-review


Grey Divider

Context sources
✅ Compliance rules (platform): 58 rules
✅ Skills: 4 invoked
  code-review
  code-implementation
  pr-review
  docs-review
✅ Cross-repo context — repo relationships
  Explored: repo: fullsend-ai/pi-anthropic-vertex (sha: 960eff35) — View relationship
  Explored: repo: fullsend-ai/pi-xai-vertex (sha: 8f50bdda) — View relationship
  ⚠️ Failed to retrieve: fullsend-ai/fullsend
Review mode: 🧠 Deep: This security-sensitive, cross-cutting runtime and workflow change spans multiple agents, dispatch paths, evidence handling, and environment restrictions with many independent, subtle failure modes.

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread agents/review.md Resolved
Comment thread agents/review.md Outdated
Comment on lines +244 to +250
The target repository is usually checked out at `/sandbox/workspace/target-repo/`.
That checkout is the base branch. Check only the named workflow paths
`/sandbox/workspace/target-repo/`, `/sandbox/workspace/pr-head/`,
`/sandbox/workspace/pr-diff.txt`, `/sandbox/workspace/prior-review.txt`, and
`/sandbox/workspace/pr-head.manifest`, or exact alternate paths explicitly
supplied by the runner. If required inputs are missing, report missing
context instead of searching `/sandbox/workspace`. Never read runtime

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Reviews fail when the checkout has another name 🐞 Bug ☼ Reliability

The Workspace section of agents/review.md now allows only /sandbox/workspace/target-repo/ or an
alternate path the runner explicitly supplies, and it removes the old fallback of searching
/sandbox/workspace, telling the agent to report missing context instead. The review harness
exports no checkout-path variable, so when the host clone isn't named target-repo (for example a
local --target-repo /tmp/myrepo), the base-branch context and the protected-path checks that read
it are unavailable on every runtime.
Agent Prompt
## Issue description
The review agent now forbids searching `/sandbox/workspace` for the target checkout, but the runner provides no checkout-path variable. When the checkout isn't named `target-repo`, the agent reports missing context instead of reviewing the PR.

## Fix Focus Areas
- agents/review.md[244-258]
- agents/review.md[28-56]
- harness/review.yaml[65-75]

## Recommended Fix
Pick one:
1. Allow a shallow, non-recursive discovery step that skips credential files, for example `find /sandbox/workspace -maxdepth 2 -name .git -type d -not -path '*/.env.d/*'`.
2. Export the checkout path from the harness (for example `TARGET_REPO_DIR` in `env.sandbox`) and add it to the named-variable lookup in the Execution checkpoints section.

Either way, keep the rules that forbid reading `.env.d/`, `.gcp-oidc-token` and `/tmp/.gcp-credentials.json`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b71798e: review reads the checkout from $FULLSEND_TARGET_REPO_DIR, which the runner always exports.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:47 PM UTC · Completed 10:04 PM UTC

Commit: c80352f · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $5.54

fullsend-ai-review[bot]

This comment was marked as outdated.

Codex wait_agent returns errored, shutdown, not_found, and completed
with a null result at once, and re-waiting never changes them. The
singleton loop only exited on a nonempty completed result, so a failed
child kept the root waiting until the time budget (review) or the
sandbox timeout (retro).

Treat those statuses as final: close the ID (not_found counts as
closed), apply the role's failure fallback, and count closed and
not_found IDs as removed at the open-ID checkpoints. Runtime
completeness checks still fail such a run.

Pass fork_context: false on the Codex security-triage spawn; the
runtime dispatch guard rejects a spawn that omits it.

Tighten nearby Codex-only wording so pr-review stays within its
existing context-budget ceiling.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
The chunked wc/tail/200-line read procedure works around Codex exec
output truncation, but it applied to every runtime and added about ten
extra tool turns to each Claude Code and pi review with no validation
there. Keep the runtime-neutral "read the skill completely" rule and
apply the chunk procedure on Codex only.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
The runner exports FULLSEND_TARGET_REPO_DIR for every agent, but the
checkout is only named target-repo on GitHub Actions; GitLab and local
runs use the project directory name. Add it to the review agent's
named-variable lookup and point the Workspace section at it, keeping
the credential never-read list.

Give retro the same boundary: read environment inputs by exact name,
never dump or prefix-filter the environment, and never read the
runtime credential files.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
close_agent removes the Codex thread, so waiting on or closing a child
that was already collected and closed reports not_found. The final-status
rule was unscoped, so a root that re-checked a closed ID would apply the
role's failure fallback (a sub-agent-failed finding in review, a failed
investigation in retro) for a child that succeeded, while the runtime
counts that child complete.

Limit the rule to open IDs whose result is not collected and say that
not_found on a closed ID is expected. In pr-review, offset the added
tokens by dropping the pipeline-mode not_found repeat and shortening the
principles cross-reference, keeping the existing context-budget ceiling.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
Only the first sentence of the chunked skill-read procedure named Codex;
the steps after it read as unscoped, so Claude Code and pi could still
apply them. Move the whole procedure into a nested "On Codex" bullet in
review and retro and keep the runtime-neutral "read completely" rule in
the parent.

The pr-review time-budget checkpoint said runtime checks still fail
without scoping it; on Claude Code and pi the post-script posts the
time-budget notice. Move that clause into the Codex sentence
(token-neutral).

Give the review checkout's GitLab and local path as
/sandbox/workspace/<project directory>, which is what the runner sets.

Signed-off-by: Dharit Shah <dhshah@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:22 AM UTC · Completed 2:44 AM UTC

Commit: 094ae7f · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $5.27

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • skills/pr-review/SKILL.md (file-level): Line 752 · [low] data-exposure

Carried over from the prior review round: review's dimension sub-agent prompts are still composed only from sub-agents/{name}.md + meta-prompt.md + the context package (security-triage uses parts 1-3 only), and neither skills/pr-review/meta-prompt.md nor the sub-agents/*.md files (other than risk-assessment.md, which only gained a CODEX_HOME fallback) were touched by this PR. None of those templates mention .env.d/, .gcp-oidc-token, or /tmp/.gcp-credentials.json. Codex dimension spawns and the security-triage spawn both set fork_context: false, so children do not inherit agents/review.md's root-level never-read rules.

Suggested fix: Add the credential never-read list and workspace-search bounds to skills/pr-review/meta-prompt.md, and to the security-triage composed prompt (which doesn't include meta-prompt.md), so every dispatched child carries them.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

Comment thread skills/pr-review/SKILL.md
`not_found`, or `completed` with an empty or null result is final: stop
waiting, close it (`not_found` counts as closed), and apply the role's
fallback (3c-1, 3c-2, step 5, 6d); runtime checks still fail. Ignore
`not_found` on closed IDs. On timeout or `running`, wait again. Except

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] logic-error

The Codex V1 wait loop's time-budget interaction is still ambiguous: step 4 says "On timeout or running, wait again. Except at the Time budget checkpoint, repeat until queue and open set are empty." The "Except" clause grammatically attaches to the loop's overall termination condition ("repeat until queue and open set are empty"), not to the "wait again" retry itself, and the Time budget checkpoint (line ~111, restated at line 846) still fires only "when a sub-agent returns after step 4" — timeout/running is explicitly defined elsewhere as not completion. Since this text only governs the Codex V1 dispatch path, and Codex is not yet a supported fleet runtime (no harness runtime: default points to it; README/docs/review.md say it stays conditional pending fullsend-ai/fullsend#7809), this cannot fire in production today — hence low rather than medium. It should still be tightened before Codex is enabled as a fleet runtime.

Suggested fix: Reword the checkpoint so it fires on every wait_agent return — including timeout, running, and absent — not only on completion: recompute REMAINING and apply the 240s failure path before waiting again.

Comment thread agents/retro.md
`close_agent` with `target` = that same ID only after collecting its
completed, nonempty result or a final failure status above. Await the
close acknowledgement, remove that ID, then refill. Repeat until the
queue and open set are empty. A timeout frees no slot; wait again.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] logic-error

This PR adds the same Codex singleton wait/close loop to retro ("A timeout frees no slot; wait again... Repeat until the queue and open set are empty"), but retro has no time-budget checkpoint concept at all (no TIMEOUT_SECONDS in harness/retro.yaml, no time-budget language in agents/retro.md or skills/retro-analysis/SKILL.md, confirmed absent from both this diff and the base branch). The Output section (line ~148) unconditionally requires the open-ID set to be empty before the first agent-result.json write, with no exception. A hung or long-pole Codex investigation child has no defined escape before harness/retro.yaml's 30-minute timeout_minutes kills the sandbox, leaving no output written. This mirrors review's still-imperfect fix (see the SKILL.md finding above) but retro doesn't even have the partial escape review has. Low severity for the same reason: Codex is not yet an enabled fleet runtime for retro.

Suggested fix: Before enabling Codex for retro, add a time-budget escape analogous to review's: past a defined remaining-time threshold, stop waiting, close only already-completed IDs, and allow writing agent-result.json (summarizing which investigations didn't finish) without requiring an empty open-ID set.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retro has no time budget on any runtime; a hung child already runs to the 30-minute kill on Claude and pi. Adding one is outside #1500.

Comment thread agents/retro.md
**Dispatch subagents for every read-heavy operation.** Your main
context window is for synthesis, not data gathering. Investigation
tasks are unnamed and have no persona roster — do not invent
`sub-agents/*.md` files for retro. Each child prompt is self-contained:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] data-exposure

The new root-level Execution checkpoints forbid env dumps and reading .env.d/, .gcp-oidc-token, and /tmp/.gcp-credentials.json, but children are explicitly self-contained ("the child starts with no memory of this conversation") and Codex children spawn with fork_context: false. Neither the child-dispatch text nor the example investigation prompts in skills/retro-analysis/SKILL.md repeat these constraints, so a spawned child (e.g. a harness-inspector task reading harness YAML that names these same credential mount paths) is not told to avoid them. This is instruction-level defense-in-depth, not a demonstrated leak.

Suggested fix: Include the named env-var lookup and credential never-read list explicitly in every retro child spawn message, and add them to the example prompts in skills/retro-analysis/SKILL.md.

Comment thread agents/review.md

NOTE: the Agent tool MUST ONLY be invoked with prompts read from
`sub-agents/{name}.md` files
NOTE: sub-agent dispatch MUST ONLY use prompts read from

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] scope-authorization

The env-variable allowlist and never-read rules in agents/review.md's Execution checkpoints/Workspace sections — now mirrored into agents/retro.md:17-21 as well — sit outside issue #1500's six-item Codex-dispatch scope, which says nothing about environment-variable read restrictions or workspace-search boundaries. This is unchanged in substance across the last several review rounds. The PR body itself discloses this directly: "This is hardening beyond #1500's scope and needs maintainer sign-off." Because the author discloses the gap and explicitly requests sign-off rather than hiding it, this reads as a disclosed process item rather than concealed scope creep — hence low rather than the medium severity used in prior rounds on this same content, now that it's a known, repeatedly-flagged, and openly-acknowledged item awaiting maintainer action.

Suggested fix: Obtain the explicit maintainer sign-off the PR body requests before merging this hardening alongside the #1500-authorized Codex-dispatch work, or split it into its own separately-authorized PR. The hardening itself is a legitimate security control — the outstanding issue is process/authorization, not content.

@dhshah13

Copy link
Copy Markdown
Contributor Author

Draft until ADR 0126 (fullsend-ai/fullsend#7827) is decided; this encodes its V1 fork_context: false and four-slot contract.

@dhshah13

Copy link
Copy Markdown
Contributor Author

Closing in favour of a smaller Codex-only dispatch PR after ADR 0126 (fullsend-ai/fullsend#7827) is decided.

@dhshah13 dhshah13 closed this Sep 29, 2026
@fullsend-ai-retro

fullsend-ai-retro Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 1:50 PM UTC · Completed 2:03 PM UTC

Commit: 094ae7f · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $2.99

@fullsend-ai-retro

Copy link
Copy Markdown

PR #1542 (fullsend-ai/agents) never merged. It layered 10 human fix commits by dhshah13 onto bot-authored PR #1501, aiming to add Codex-native child-dispatch support to agents/review.md, agents/retro.md, and skills/pr-review/SKILL.md (issue #1500). Across 5 rounds of fullsend-ai-review over ~18 hours, every High/Medium logic/consistency finding (wait_agent contradictions, fail-open security-triage gap, close-before-write deadlock) was fixed within ~30-40 minutes of being raised — a strong rework-efficiency signal. Two findings persisted unresolved through all 5 rounds because they required a maintainer decision the author could not self-resolve: the protected-path human-approval gate (agents/.md and skills/ are protected) and scope-authorization for env/workspace hardening the author disclosed as beyond issue #1500's scope. No human other than the author ever commented on the PR. It was ultimately self-closed citing an unrelated pending ADR (fullsend-ai/fullsend#7827) in another repo, not because review findings were resolved.

Two structural gaps surfaced during this retro already have open tracking issues, and this PR provides fresh corroborating evidence rather than a new proposal: (1) #1322 documents that agent-definition resolution under pull_request_target is pinned to main, not the PR head — PR #1542's workflow logs (Fetching agent review from fullsend-ai/agents@... -> resolved from fullsend-ai/agents@main) confirm this also applies to agents/retro.md and skills/pr-review/SKILL.md (not just agents/fix.md as in #1322's original example), and that the ok-to-test-gated functional-tests(review)/(retro) jobs are the only pipeline that actually exercises head-SHA instructions -- a workaround #1322 doesn't mention. (2) fullsend-ai/fullsend#7186 already proposes a staleness nudge for PRs blocked solely on the protected-path approval gate; PR #1542 (5 review rounds, 18 hours, zero human responses, self-closed for an unrelated reason) is a concrete new data point supporting that proposal.

One genuine gap: a third-party review bot (qodo-code-review) found a real bug in the new dispatch logic -- a child agent that completes with an empty (but terminal) result can never be closed, because the instructions only distinguish 'has nonempty result' from 'still running.' fullsend-ai-review missed this across all 5 of its rounds, including the round that ran after qodo had already posted it. No existing issue covers this. Filed as a proposal below, scoped as guidance for whenever issue #1500's Codex-dispatch work is resumed, plus a systemic review-dimension improvement so this class of bug (unenumerated terminal states in wait/poll loops) is caught without relying on a third-party bot.

Proposals filed

dhshah13 added a commit to dhshah13/agents that referenced this pull request Oct 30, 2026
When the runtime note announces a Codex roster, review and retro
dispatch through spawn_agent within the open-child limit, collect with
bounded wait_agent calls, close every child, and treat errored,
shutdown, not-found and completed-empty children, and a child running
past 900 s, as final. On Codex a challenger still running when under
240 s remain is closed and falls back. Claude Code and pi wording keeps
its behaviour. The docs name the fullsend #6970 dependency and the live
verification gate; no support claim.

Supersedes fullsend-ai#1501, replaces fullsend-ai#1542. Part of fullsend-ai#1500. Fixes fullsend-ai#1552.

Signed-off-by: Dharit Shah <dhshah@redhat.com>

This branch was previously deployed

1 inactive deployment
dev — 094ae7f2 Deployed Sep 29, 2026 by dhshah13 via behaviour #196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant