Slash command model: frontmatter override does not consistently switch model

Resolved 💬 3 comments Opened May 6, 2026 by FrankC01 Closed May 10, 2026

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

  1. Open a Claude Code session (model: claude-sonnet-4-6).
  2. Run /clear to reset context.
  3. Invoke /schema-check (a project slash command with model: haiku frontmatter).
  4. 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 /clear command (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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗