Set ANTHROPIC_SMALL_FAST_MODEL to Control Background Task Performance
Claude Code quietly uses a secondary, lightweight model for background tasks — things like generating conversation titles, summarising memory, and other housekeeping operations. By default this is Claude Haiku, but you can override it with ANTHROPIC_SMALL_FAST_MODEL.
# Use a specific Haiku version for all background tasks
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4-5-20251001"
# Or set it inline for a single session
ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4-5-20251001" claude
You can also set it permanently in your shell profile:
# ~/.zshrc or ~/.bashrc
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4-5-20251001"
Why change it? A few reasons:
- Cost control: Pin to the most economical Haiku version to keep background task costs predictable as new models are released
- Speed: If background operations feel slow, a lighter model sharpens them up
- Team consistency: When routing through a team proxy or Bedrock/Vertex, pin a specific model string that your provider has explicitly enabled
Note: this variable only affects background/housekeeping operations. The primary reasoning model is controlled separately via --model, ANTHROPIC_MODEL, or settings.json.
Background tasks should be fast and cheap — pin ANTHROPIC_SMALL_FAST_MODEL so they always are.
Log in to leave a comment.
When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.
Use the --agent flag with custom markdown files in .claude/agents/ to launch purpose-built Claude sessions with restricted tools and scoped system prompts.
Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.