Slash command model: frontmatter override does not consistently switch model
Description
A slash command with model: haiku in its frontmatter did not switch the running session from Sonnet to Haiku when invoked. The user has seen the switch work correctly in prior sessions, making this inconsistent/intermittent behavior rather than a design gap.
Command definition
The command lives at .claude/commands/schema-check.md and begins:
---
model: haiku
---
# /schema-check — GQL Schema Snapshot, Tidy, and Diff
...
Steps to reproduce
- Open a Claude Code session (model: claude-sonnet-4-6).
- Run
/clearto reset context. - Invoke
/schema-check(a project slash command withmodel: haikufrontmatter). - Observe: the skill instructions are inlined into the Sonnet session; no model switch occurs. The skill executes under Sonnet.
Expected behavior
The session model switches to Haiku (claude-haiku-4-5-20251001) for the duration of the slash command execution, consistent with what the user has observed in prior sessions.
Actual behavior
The model: frontmatter is silently ignored. The slash command runs under the invoking session's model (Sonnet). No error or warning is surfaced to indicate that the override was not applied.
Environment
- Platform: macOS Darwin 25.4.0
- Shell: bash
- Session model: claude-sonnet-4-6
- Immediately preceded by a
/clearcommand (possibly relevant)
Additional context
The user confirmed this override has worked correctly in previous sessions with the same command file, so this appears to be intermittent. A /clear immediately before the slash command invocation may be a contributing factor worth investigating.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗