fix: allow model invocation for codex commands except review#227
fix: allow model invocation for codex commands except review#227BastianZim 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>
|
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! |
|
@dkundel-openai would you mind having a look at this PR and saying if OpenAI would be willing to allow us to change the invocation? |
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