claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Allow custom slash commands to switch default model

Open crsmithdev opened this issue 2 months ago • 1 comments

Feature Request

Allow custom slash commands to execute built-in commands like /model haiku or provide a mechanism to change the session's default model programmatically.

Use case: Creating shortcut commands like /h that can both:

  1. Switch default model to haiku when run without args
  2. Run a one-off query with haiku when given args

Current behavior: The model: frontmatter in slash commands only affects that command's execution model, not the session default. Editing settings.json doesn't take effect until restart.

Desired behavior: Either:

  • Live-reload settings.json when modified
  • Expose a mechanism for slash commands to call built-in commands
  • Add a switch_model: frontmatter option that persists the change

crsmithdev avatar Dec 02 '25 02:12 crsmithdev

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7795
  2. https://github.com/anthropics/claude-code/issues/4937
  3. https://github.com/anthropics/claude-code/issues/12645

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 02 '25 02:12 github-actions[bot]

This issue has been automatically closed as a duplicate of #7795.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 05 '25 09:12 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 13 '25 14:12 github-actions[bot]