codex-plugin-cc icon indicating copy to clipboard operation
codex-plugin-cc copied to clipboard

Document workaround for `disable-model-invocation: true` commands (agents refuse to invoke until nudged)

Open V8-Software opened this issue 7 months ago • 2 comments

Summary

Users running Claude Code with this plugin hit a predictable friction every time they type a /codex:* command that has disable-model-invocation: true (5 of 7 commands: adversarial-review, cancel, result, review, status):

  1. User types e.g. /codex:status in chat
  2. Autocomplete offers the command
  3. Agent refuses: "Skill /codex:status is not listed as available to me. I have codex:rescue, codex-dual-review-file-based..."
  4. User has to manually convince the agent to try the Skill tool anyway

This is a Claude Code bug — tracked upstream as anthropics/claude-code#50075. Reproduced in multiple unrelated sessions with different agents. The root cause is that Claude Code hides commands with disable-model-invocation: true from the agent's skills list entirely, so the agent has no knowledge the command exists.

Why this is a plugin-side concern too

The plugin uses disable-model-invocation: true correctly — for commands that shouldn't be auto-fired by the model (cancel, status, etc.). That's by design. But until the upstream Claude Code bug is fixed, every user of this plugin independently runs into the same refusal and has to figure out the workaround.

Suggested action

Two low-cost additions would let plugin users skip the friction:

1. Document the workaround in the plugin README

Add a short note under "Usage" or a new "Troubleshooting" section:

If the agent tells you a /codex:* command (like /codex:status) is not available, paste it again or tell the agent to "try via the Skill tool anyway". This is a known Claude Code limitation (anthropics/claude-code#50075) — commands with disable-model-invocation: true are hidden from the agent's skill list even when you explicitly invoke them. The workaround is one line and then the command runs normally.

2. Provide a ready-to-paste CLAUDE.md snippet users can drop into their global ~/.claude/CLAUDE.md

Something like:

## Slash-commands from the user

If the user explicitly types `/<skill-name>`, try invoking it through the Skill tool
right away — even if the skill is missing from the system-reminder list. Commands
with `disable-model-invocation: true` (e.g. most of the codex-plugin-cc commands:
`/codex:status`, `/codex:adversarial-review`, `/codex:result`, `/codex:cancel`,
`/codex:review`) are hidden from the agent, but an explicit user command is not
auto-invocation. Only report failure if the Skill tool itself returns an error.

That makes the first sessions of any new user of the plugin frictionless. Once upstream #50075 is fixed, both the README note and the CLAUDE.md snippet can be retired.

Context

  • Reproduced with @openai/codex-plugin-cc v1.0.3, Claude Code on Windows and Linux
  • Upstream bug (Claude Code): https://github.com/anthropics/claude-code/issues/50075 (contains full repro and history of prior reports closed by inactivity)
  • Related prior Claude Code issues, all closed NOT_PLANNED: #24042, #26251, #21649

If this direction sounds reasonable, happy to open a PR with the README change.

V8-Software avatar Apr 17 '26 19:04 V8-Software

Field report: using codex:codex-rescue as a read-only review fallback

Adding our concrete workaround in case it's useful for the README snippet this issue proposes.

Our team's policy (in ~/.claude/CLAUDE.md) is: before any gh pr create / gh pr merge / protected-branch push, the agent asks the user via AskUserQuestion whether to run Codex review. On "yes", it was supposed to invoke /codex:review --wait — but that's gated with disable-model-invocation: true, so the agent can't call it directly.

We updated the policy to fall back to the Agent tool with subagent_type: codex:codex-rescue, briefed in explicit REVIEW MODE ("read-only, do NOT edit files or apply fixes, return findings only"). It's not byte-identical to /codex:review (rescue is forked-context and doesn't use the review-specific prompt template), but it routes to the Codex runtime, returns findings, and respects the consent step. In practice it caught a real accuracy bug in a UI sublabel before merge.

The exact CLAUDE.md clause that worked:

"Yes, run review first" — Invoke /codex:review --wait (or the codex:review skill if available). If /codex:review is gated with disable-model-invocation and cannot be model-invoked, fall back to the Agent tool with subagent_type: codex:codex-rescue in explicit REVIEW MODE (brief it with "read-only, do NOT edit files or apply fixes" and hand it the diff scope). Wait for output. Summarize findings to the user. Then ask whether to proceed with the ship action, abandon it, or address findings first.

Strong +1 to either the README note or a canonical snippet in the plugin. Once upstream Claude Code fixes #50075 (issue #211 here), this can retire.

adrienpesa avatar Apr 24 '26 06:04 adrienpesa

Duplicate of #211.

dkundel-openai avatar Aug 11 '26 00:08 dkundel-openai