$ recombobulate _
home / tips / set-a-persistent-default-model-in-settings-json
0

Set a Persistent Default Model and Lock Available Models in settings.json

bagwaa @bagwaa · Mar 26, 2026 · Configuration
set-a-persistent-default-model-in-settings-json

Instead of passing --model on every command, set a persistent default in your settings.json and forget about it:

{
  "model": "claude-sonnet-4-6"
}

This lives at ~/.claude/settings.json for a user-level default. Drop a .claude/settings.json into a project directory to override it project-wide — the project setting always wins.

For teams, the availableModels key restricts which models anyone can select during a session. This prevents a team member from accidentally spinning up an expensive Opus run on a task that only needs Haiku:

{
  "model": "claude-sonnet-4-6",
  "availableModels": ["claude-sonnet-4-6", "claude-haiku-4-5-20251001"]
}

With this config, the /model picker only shows the listed models. Commit this to your repo and the whole team gets consistent, cost-controlled model access.

For CI pipelines where you don't want to commit a config file, use the environment variable instead:

ANTHROPIC_MODEL=claude-haiku-4-5-20251001 claude -p "Quick summary of today's commits"

The full precedence order, from highest to lowest priority:

--model flag > ANTHROPIC_MODEL env var > project settings.json > user settings.json

If you want to switch models mid-session without changing your defaults, use the /model command — it applies only to the current conversation and leaves settings.json untouched.

Set it once in settings.json and stop specifying the model on every command — save --model for the exceptions.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Switch to the Stable Update Channel with autoUpdatesChannel

The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.

bagwaa @bagwaa · 1 hour ago
0
Set Claude's Response Language with the language Setting

The language setting makes Claude respond in your preferred language by default, across every session and project.

bagwaa @bagwaa · 1 hour ago
0
Customize or Remove Claude's Git Attribution with the attribution Setting

The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.

bagwaa @bagwaa · 1 hour ago