[BUG] Mid-message user-typed slash command with disable-model-invocation: true is silently ignored despite UI highlighting

Open 💬 1 comment Opened Jul 3, 2026 by riptscripts

Summary

A custom skill/slash command with disable-model-invocation: true in its frontmatter cannot be invoked at all when the user types it mid-message rather than at position 0 of the prompt. The command highlights blue in the prompt UI (the input parser recognizes it), but it is never expanded or dispatched, and the model cannot invoke it either because the skill is hidden from the Skill tool. The result is an explicit, user-typed slash command that silently does nothing — with UI feedback that misleads the user into thinking it was recognized.

Repro

  1. Create a custom skill/command /my-command with disable-model-invocation: true in its frontmatter.
  2. Send a message where the command is not the first token, e.g.:

``
yo can u run /my-command
``

  1. Observe: /my-command highlights blue in the input UI, but nothing runs.

Why nothing runs:

  1. The harness only expands/dispatches slash commands at position 0 of the message, so the mid-message command is passed through as plain text.
  2. Because of disable-model-invocation: true, the model cannot invoke it via the Skill tool as a fallback — the skill is hidden from the model entirely.

Expected

A user-typed slash command anywhere in the message is a user invocation and should dispatch. At minimum, the model should be permitted to invoke a disable-model-invocation: true skill when the user explicitly typed its slash command — that setting is meant to block model-initiated invocation, and this invocation was user-initiated.

If neither is changed, the blue highlight on a mid-message command should not appear (or should indicate it won't dispatch), since it currently signals recognition for something that will be silently ignored.

Actual

The command is silently ignored. No expansion, no dispatch, no model invocation, no error — only a misleading blue highlight.

Related issues

  • #68482 (closed) — confirms slash commands only dispatch at the start of the message (there caused by a system-reminder prefix on built-in commands).
  • #50075 (open) — disable-model-invocation: true blocks explicit user-typed invocation because the skill is hidden from the agent.

Neither covers the combination reported here: mid-message position plus disable-model-invocation: true, which together leave zero invocation paths for an explicitly user-typed command.

Environment

  • Claude Code CLI (current release as of 2026-07)
  • macOS (Darwin 25.2.0)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗