Skip to content

fix(review): run fanout's Codex surface through the Codex plugin's companion runtime - #12514

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-12495-41522754351-1
Nov 2, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-12495-41522754351-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Refs: #12495

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Fanout named /codex:review --wait --base <review-base> as its Codex surface, but the Codex plugin's commands set disable-model-invocation: true, so Codex never ran. A new skills/fanout/scripts/codex-review.sh finds codexopenai-codex through claude plugin list --json (installPath, or readFromFolder for an in-place plugin). It checks the Codex CLI and its login with the plugin's read-only setup --json, then runs codex-companion.mjs review --wait --base <ref> (or adversarial-review with --adversarial), the same command /codex:review runs. Its first output line is codex: ran, codex: skipped (<reason>) or codex: failed (<reason>). SKILL.md and run-everything-mode.md now dispatch through the script and say how each status is reported, so a missing CLI or login is reported as skipped, never as ran. Two choices: the script sits in the review plugin, not the Codex plugin, because a plugin cannot reference another plugin's ${CLAUDE_PLUGIN_ROOT}, and claude plugin list --json is the documented way to find an install path. It is also left out of the skill's allowed-tools, because running it sends the diff to OpenAI, so the user's own permission prompt still applies. The 24 X-arm eval prompts (-lx, -mx) no longer name /codex:review. They now ask the model to report Codex by the status the script prints, so a skipped Codex fails the arm check and no longer passes as a false Ran.

The run went past its turn budget (turns=145 max-turns=113): the work may be too big for one run.

Remaining work

  • Rerun #12151's X-arm cases (the fanout-diversity-*-lx and -mx eval cases) with this dispatch path. That needs a host run with codexopenai-codex installed in the run's home and a logged-in Codex CLI, which this lane cannot provide

Not verified

  • codex-review.test.sh was not executed here: this lane's Bash runs only the named wrappers, and check-affected's output does not show whether it ran the new test. It is left to the PR's CI
  • check-evals-quality was not run on the changed eval cases: the wrapper takes an evals.json file, and the changed files are case-directory prompt.md files. It is left to CI's evals-quality job
  • tidy skipped: the change is 30 files, over the 10-file tidy cutoff
  • Review suggestion not applied: adding codex-review.sh to the fanout skill's allowed-tools. Running it sends the diff to OpenAI, so the user's permission prompt stays. In a headless session the call can be denied, and the skill then reports codex: skipped (permission denied)
  • The script was not run against a real codexopenai-codex 1.0.6 install with a logged-in Codex CLI; the upstream companion's behavior is from reading its source, and the offline test covers it with stubs
  • Untracked .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile and .zshrc at the checkout root were not created by this run and are not part of the change

Fix

  • plugins/review/skills/fanout/scripts/codex-review.sh: new. Finds the Codex plugin via claude plugin list --json, checks readiness with setup --json, runs the companion's review or adversarial-review with --wait --base <ref>, and prints a ran/skipped/failed status line first
  • plugins/review/skills/fanout/scripts/codex-review.test.sh: new offline test with a stub claude CLI and a stub codex-companion.mjs. Covers usage errors, no claude CLI, the plugin absent, disabled or garbled in the list, a missing companion, no Codex CLI (skipped, review never invoked), no login (skip
  • plugins/review/skills/fanout/SKILL.md: the codex orchestrator bullet says never to invoke /codex:*, to run codex-review.sh with the resolved review base and the longest Bash timeout, and how to report each status (ran, skipped, failed, timed out, permission denied)
  • plugins/review/skills/fanout/context/run-everything-mode.md: Flow step 3 dispatches Codex through codex-review.sh instead of /codex:review and /codex:adversarial-review
  • plugins/review/evals/fanout-diversity.md: the X-arm Codex sentence names the script path and says a skipped Codex fails the arm check. It also notes that a host rerun needs codexopenai-codex installed in the run's home, because claude plugin list lists a --plugin-dir plugin only when that fla
  • plugins/review/evals/fanout-diversity--lx/prompt.md and fanout-diversity--mx/prompt.md (24 files): the Codex sentence drops the /codex:review --wait --base <review-base> literal and asks the model to report Codex by the status its script prints
  • .changes/review/work-resolve-issue-issue-12495-41522754351-1-3c05f8d2.md: patch changelog fragment (Fixed)

Verification

The runner ran each check from the base copy against 338cb50:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read https: //github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/review.md: sets disable-model-invocation: true and runs node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" review "$ARGUMENTS" in the foreground; accepts --wait/--background, --base <ref>, --scope
  • read https: //raw.githubusercontent.com/openai/codex-plugin-cc/main/plugins/codex/skills/codex-cli-runtime/SKILL.md: documents calling codex-companion.mjs via ${CLAUDE_PLUGIN_ROOT}/scripts; user-invocable: false; says to return nothing when Codex cannot be invoked
  • read https: //raw.githubusercontent.com/openai/codex-plugin-cc/main/plugins/codex/scripts/codex-companion.mjs: review parses --base, --scope, --wait, --background, --json and rejects focus text; a missing Codex CLI exits 1 with 'Codex CLI is not installed...'; setup --json reports ready, codex.avail
  • read https: //code.claude.com/docs/en/plugins/cli-reference: claude plugin list --json prints id, version, scope, enabled and installPath for every entry, plus readFromFolder for an in-place plugin; a --plugin-dir plugin is listed only when the flag precedes the subcommand
  • read https: //code.claude.com/docs/en/plugins-reference: ${CLAUDE_PLUGIN_ROOT} resolves to the plugin's own installed version and is not in the Bash tool's environment
  • check-changelog-fragments: all 19 fragments valid
  • check-changed-skills: fanout PASS, 0 errors, 4 pre-existing size and gotchas warnings (the first run flagged a broken skill-internal ref scripts/codex-companion.mjs at SKILL.md:165; I reworded it, and the rerun passed)
  • check-affected: 12 passed, 6 skipped over 30 changed files
  • cant-fail-scan --file plugins/review/skills/fanout/scripts/codex-review.test.sh --check: PASS, no gating findings
  • fresh-context review subagent over the whole diff: no script or test bugs found; I applied two IMPORTANT findings (eval prompts told the model to list Codex under Ran unconditionally; no timeout handling) and three suggestions (mktemp failure, unreadable plugin list reason, where a skipped Codex goe
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41522754351

Left out: the items under Not verified.

Related

#12495

Lane-Activity: work-resolve-issue/resolve-issue

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on 338cb50db8c58a644ae3f86ab43c94412d829a08; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread plugins/review/skills/fanout/SKILL.md Resolved
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 439da1399f3744063ab38e8bd0f72fc46c97f84f: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #12514, incremental (338cb50 → 439da13)

Scope. This review covers the change since 338cb50d, which touches two files: plugins/review/skills/fanout/SKILL.md and plugins/review/skills/fanout/context/run-everything-mode.md. I read every hunk of both. The other 28 files have not changed since that review.

Prior finding resolved. Last round's advisory (discussion_r4448064355) is fixed:

  • SKILL.md:165 no longer says the upstream /codex:* commands set disable-model-invocation: true. It now states our own decision: never invoke /codex:*, run the script instead. It also adds the links-only record that .claude/rules/skill-bodies-state-current-rules.md requires:
    • a pointer to plugins/codex/commands/review.md in openai/codex-plugin-cc (a repository file, so it needs no docs-section anchor);
    • an as-of date (2026-11-02);
    • a recheck trigger (that file's frontmatter drops disable-model-invocation).
  • run-everything-mode.md:11 no longer carries the repeated claim "which the model cannot invoke". It now points back to SKILL.md "Orchestrator plugins".

New findings: none.

Other checks

  • Closing issue: the PR body says only Refs: #12495 and has no closing-issue section, so there are no acceptance criteria to check.
  • Manifests: no plugin.json or marketplace.json changes in this increment.
  • Embedded instructions: none in the PR context or prior-findings files.
  • Round cap: not reached (1 earlier round with findings, cap 3).

Not verified by this lane: I had no shell, so I ran nothing. I did not fetch the upstream file the pointer names.

Spend (not a hold): same as last round. A fanout run that reaches Codex sends the diff to OpenAI and uses the user's own Codex login. Eval reruns use subscription or prepaid usage.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 439da1399f3744063ab38e8bd0f72fc46c97f84f: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental since 338cb50): no findings

I read every hunk of the two files that changed since this lane's last review. Both are one-paragraph rewordings of the instructions for dispatching Codex:

  • plugins/review/skills/fanout/SKILL.md (codex bullet, L165): the old sentence said the plugin's /codex:review and /codex:adversarial-review commands set disable-model-invocation: true, "so never invoke them". The new text says "Never invoke the plugin's /codex:* commands; run the script instead". It also adds a dated pointer to the upstream openai/codex-plugin-cc command file as the source of that frontmatter choice, with a recheck trigger.
  • plugins/review/skills/fanout/context/run-everything-mode.md (Flow step 3): the clause "which the model cannot invoke" is dropped. The prohibition "never the /codex:* commands" stays, still pointing to SKILL.md.

Instruction-surface check. Both edits keep the prohibition. The SKILL.md version is actually wider, because it now covers every /codex:* command instead of the two it named. The pointer to the upstream file is reading material for a link the model is told to check. It does not make the prohibition conditional on that file. Nothing is narrowed or softened. The dispatch path is unchanged: the same codex-review.sh --base <review-base> call, still outside the skill's allowed-tools, so the user's own Bash permission prompt still applies before the diff goes to OpenAI.

The trusted-path globs match neither file. No trust control, merge hold, token scope, kill switch or plugin manifest is touched by this increment.

The prior-findings file lists only this lane's earlier no-findings summary (0 findings), so there is nothing to restate. The round cap does not apply (past the cap: no).

Spend (not a finding): this increment adds none beyond what was noted last round, which was the user's own Codex/OpenAI usage when a run-everything pass dispatches Codex.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 338cb50db8c58a644ae3f86ab43c94412d829a08.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6y4BW1
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 439da13.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 2d75a94 Nov 2, 2026
57 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-12495-41522754351-1 branch November 2, 2026 22:08
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 439da1399f3744063ab38e8bd0f72fc46c97f84f. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate holds it on its risk score (evidence-unbound:claude-review: not bound: no-run;
  evidence-unbound:claude-security-review: not bound: no-run)

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 5, survived 2, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 71%; mutation score 71%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/review/skills/fanout/scripts/codex-review.sh 5 2 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/review/skills/fanout/scripts/codex-review.sh:126 SBR productive no-assertion
plugins/review/skills/fanout/scripts/codex-review.sh:130 other productive input-gap

The run's summary has the full report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants