fix: allow model invocation for codex commands except review#227
Open
BastianZim wants to merge 2 commits intoopenai:mainfrom
Open
fix: allow model invocation for codex commands except review#227BastianZim wants to merge 2 commits intoopenai:mainfrom
BastianZim wants to merge 2 commits intoopenai:mainfrom
Conversation
) Remove `disable-model-invocation: true` from adversarial-review, cancel, result, and status commands so Claude can route explicit user requests and other skills/workflows can invoke them. The flag is intentionally kept on `review` to prevent proactive Codex spend on the heavyweight native review. An explicit guardrail is added to adversarial-review telling Claude to only run it when explicitly asked. Also fixes a pre-existing test regression from openai#168 where the quoted `$ARGUMENTS` pattern was not reflected in the test regex. Closes openai#211 Supersedes openai#156 openai#157 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0115b09eab
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
cancel is destructive — it terminates a running Codex job and with no job-id it auto-resolves to the single active job. Add a prompt-level guardrail matching the one on adversarial-review to prevent proactive invocation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
If this restriction is deliberate that's completely understandable, but since there is a lot of debate around out, I wanted to put in a PR so we can at least have it documented somewhere. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
disable-model-invocation: truefromadversarial-review,cancel,result, andstatuscommands so Claude can route explicit user requests and skills/workflows can invoke themreviewintentionally — it's a heavyweight Codex call most at risk of proactive invocationadversarial-reviewpreventing Claude from running it on its own initiative$ARGUMENTSwas not reflected in the test regexCloses #211
Supersedes #156 #157
Context
disable-model-invocation: trueconflates two concerns: preventing proactive model invocation and hiding commands from Claude entirely. With the flag set, Claude cannot invoke the command even when the user explicitly asks for it in a message, and other skills/workflows cannot compose with it. There is no native Claude Code frontmatter option that separates "known" from "invokable" (confirmed in docs).The fix removes the flag from 4 of 5 affected commands.
reviewkeeps the flag because it's expensive and takes no user-supplied focus text, making it the most likely target for unwanted proactive invocation.adversarial-reviewgets an explicit prompt-level guardrail instead.Test plan
commands.test.mjspasses 9/9 (was 8/9 before — pre-existing$ARGUMENTSquoting regression fixed)/codex:adversarial-reviewappears in Claude's skill list after plugin reload/codex:status,/codex:result,/codex:cancelcan be invoked by Claude when user asks in a message/codex:reviewremains user-only (typing it in a message should not route)adversarial-reviewwithout being asked🤖 Generated with Claude Code