Today I Learned

🍌 Giant Monkeys Learning

2 posts about #AI

Choose subagent model

Fresh from Anthropic:

You can now set CLAUDE_CODE_SUBAGENT_MODEL to choose which model your subagents run on by default. ~/.claude/settings.json:

{
  "env": {
    "CLAUDE_CODE_SUBAGENT_MODEL": "opus"
  }
}

You may want to do this when working with Fable 5.1, which tends to spin up many subagents. Not all of the subagents need Fable, so you can let them run on Opus while the main conversation stays on Fable.

You can run /tasks while a subagent is running to see which model it's using.

Global prompt for Claude Code (CLI)

For Claude Code CLI there are two mechanisms for cross-project preferences:

1. ~/.claude/CLAUDE.md – For instructions and context (equivalent to the claude.ai preferences in https://claude.ai/settings/general)

# My Coding Standards

- Test Driven Development: Specs first
- Focus on relevant specs (request, feature, complex methods)
- No trivial boilerplate specs
- Indentation: 2 spaces
- Lean, human-readable code
- When unclear: ask one clarifying question
...

2. ~/.claude/settings.json – For technical settings (permissions, tools, hooks)

{
  "permissions": {
    "allowedTools": ["Read", "Write", "Bash(bundle exec rspec *)"]
  }
}

The CLAUDE.md is loaded at every session start and is the right place for your coding preferences. The settings.json is more for tool permissions and hooks.

NOTE: The settings in https://claude.ai/settings/general are only for the web chat and do not take effect in Claude Code nor in API calls.