Skip to content

fix(review): pass codex skills natively instead of paraphrasing them#1655

Open
peyton-alt wants to merge 1 commit into
mainfrom
feat/review-codex-skill-invocation
Open

fix(review): pass codex skills natively instead of paraphrasing them#1655
peyton-alt wants to merge 1 commit into
mainfrom
feat/review-codex-skill-invocation

Conversation

@peyton-alt

@peyton-alt peyton-alt commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

https://entire.io/gh/entireio/cli/trails/776

Problem

expandCodexBuiltinReview silently replaced a configured /review skill with a generic 28-word instruction before composing the codex prompt — the configured skill never ran. This is the codex sibling of the claude -p slash-expansion bug fixed in #1647: in both cases the child executed something other than what the user configured.

Change

Slash-form skill invocations (the agent-portable form profiles are configured with) are rewritten to codex's native $name form, which codex's skill system resolves against its installed-skill catalog and loads the matching SKILL.md. Non-slash entries (plain instruction text) pass verbatim; PromptOverride is untouched. The paraphrase constant and expansion are deleted.

With #1647 (claude Skill-tool invocation) and #1651 (skill fan-out), this completes faithful parallel skill execution for both agents: N configured skills → N parallel children, each natively running exactly its skill.

Relationship to #1370

Extracted from #1370 (codex review correctness), which this supersedes for merge purposes:

  • skill invocation → this PR
  • live token tailing (claude streaming + codex rollout) → remains queued as its own follow-up
  • per-spawn reasoning_effort → dropped by product decision (entire invokes skills; it does not alter how they run)
  • skilldiscovery refactor → superseded by main's evolution

Testing

  • TDD: native-form + no-paraphrase + override-verbatim tests watched fail first; the old paraphrase-pinning assertion inverted deliberately
  • mise run test (7,558) green, lint clean

🤖 Generated with Claude Code


Note

Low Risk
Localized change to codex review prompt assembly; fixes incorrect behavior without touching auth, data, or shared review core beyond skill string rewriting.

Overview
Codex review no longer substitutes configured slash skills with a generic paraphrase. Profile skills like /review are rewritten to codex’s native $name form so codex loads the real SKILL.md; plain text lines stay unchanged.

The old expandCodexBuiltinReview path and codexBuiltinReviewPrompt are removed. codex exec - with the composed prompt on stdin is unchanged (still avoids codex exec review limitations).

Tests now expect $review in the prompt and add coverage for multi-skill $ rewriting and PromptOverride bypassing skill transforms.

Reviewed by Cursor Bugbot for commit 3c75670. Configure here.

expandCodexBuiltinReview silently REPLACED a configured /review skill
with a generic 28-word instruction before composing the prompt — the
configured skill never ran. This is the codex sibling of the claude -p
slash-expansion bug: in both cases the child executed something other
than what the user configured.

Rewrite slash-form skill invocations (the agent-portable form profiles
are configured with) into codex's native $name form, which codex's
skill system resolves against its installed-skill catalog and loads the
matching SKILL.md. Non-slash entries (plain instruction text) pass
verbatim; PromptOverride is untouched.

Extracted from PR #1370 (codex review correctness), which is closed in
favor of this narrower fix: its live-token tailing remains queued as a
separate follow-up, its per-spawn reasoning_effort was dropped by
product decision (entire does not alter how skills run), and its
skilldiscovery refactor is superseded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Entire-Checkpoint: 281a46a17694
Copilot AI review requested due to automatic review settings July 6, 2026 22:20
@peyton-alt peyton-alt requested a review from a team as a code owner July 6, 2026 22:20

Copilot AI 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.

Pull request overview

Fixes Codex reviewer skill execution so configured /review-style skills are no longer silently replaced with a generic paraphrase. Instead, slash-form skills are rewritten into Codex’s native $name prompt form so Codex resolves and runs the installed SKILL.md workflows as configured.

Changes:

  • Replace the old /review → paraphrase expansion with slash-form → $name rewriting for Codex prompts.
  • Remove the hardcoded paraphrase constant and expansion helper.
  • Update/add tests to assert $review (and other $... skills) appear in the composed prompt, and that PromptOverride remains verbatim.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmd/entire/cli/agent/codex/reviewer.go Rewrites configured slash skills into Codex-native $name invocations and removes the old paraphrase behavior.
cmd/entire/cli/agent/codex/reviewer_test.go Updates expectations for $review and adds coverage for multi-skill rewriting and PromptOverride bypass.

Comment on lines 33 to +35
// buildCodexReviewCmd builds the exec.Cmd for a codex review run.
// Exposed at package level for test inspection of argv, stdin, and env.
// buildCodexReviewCmd builds the exec.Cmd for a codex review run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants