Skip to content

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

Closed as duplicate

Description

@V8-Software

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

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

Activity

  1. adrienpesa commented on Apr 24, 2026

    @adrienpesa

    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.

  2. dkundel-openai commented on Aug 11, 2026

    @dkundel-openai
    Collaborator

    Duplicate of #211.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions