Try free

Last updated 13 October 2026

Change the model used by Claude Code

Select the right model for the task

Developers often face a trade-off between the speed of an agent and the quality of its reasoning. When you are performing simple tasks like renaming variables or moving files with the Bash tool, you want a model that responds instantly. However, when you are solving a complex architectural problem, you need the deepest reasoning possible. Claude Code allows you to switch between these different levels of intelligence to suit the specific needs of your project.

Choosing the wrong model for a task can lead to frustration. A model that is too simple might struggle to use the Edit tool correctly in a large file. It might make mistakes in logic or fail to understand the connections between different modules. On the other hand, using a very high-level model for a trivial task wastes tokens and makes you wait longer for a response. Understanding how to navigate these choices makes you a more efficient developer.

You do not have to stick with one choice for the entire life of a project. The CLI is designed to be flexible. You can start with a fast model to explore the codebase and then upgrade to a more powerful one when it is time to write the actual implementation. This dynamic approach ensures that you always have the right tool for the job at hand. It also helps you control your API costs by only using high-power reasoning when it is truly necessary.

Use the model slash command

The fastest way to change the model while you are already working is the /model slash command. When you type this inside an active session, the CLI displays an interactive menu. You can use your arrow keys to scroll through the available options and select the one that fits your current requirements. This change takes effect immediately for the very next prompt you send to the agent.

This method is particularly useful when you hit a wall during a debugging session. If the current model cannot find the source of a bug after several attempts with the Grep and Read tools, you can use /model to upgrade to a more capable version. The agent will then look at the existing conversation history with fresh eyes and higher reasoning power. It does not require you to restart your session or lose any of the work you have already completed.

You should also consider downshifting when the hard part of a task is finished. After the agent has written the core logic for a new feature, you might switch back to a faster model to write the accompanying unit tests or to update the README.md file. This keeps your workflow moving at a high tempo and prevents unnecessary delays. The /model command is your primary tool for manual, on the fly adjustments to the reasoning engine.

Configure models in settings files

If you find yourself manually switching models every time you start the CLI, you should update your configuration files instead. Claude Code uses settings.json files to manage your preferences across different scopes. The most global configuration is located at ~/.claude/settings.json. Any model you specify here will be the default for every project on your machine, provided there is no project specific override.

For project specific needs, you can create a .claude/settings.json file in the root directory of your repository. This is helpful if a particular project is extremely complex and always requires a high level of reasoning. You can also use .claude/settings.local.json if you want to set a personal default for a project that does not get committed to the shared repository. This gives you the freedom to choose your own balance of speed and cost without affecting your teammates.

When you edit these files, you must ensure the model name is a valid string recognized by the system. If you are unsure of the correct name, you can check the interactive menu in the /model command or use the /config command to see your current settings. Setting a default model in these files saves you time and ensures that the agent always starts with the intelligence level you expect. It removes the friction of repeated setup and allows you to get straight to coding.

Track costs and token usage

Every model has a different price for input and output tokens. Higher reasoning models are generally more expensive to run, which can add up during long development sessions. To stay informed about your spending, you can use the /cost and /usage commands. These commands provide a detailed breakdown of the financial cost and the number of tokens used in your current session.

Monitoring these metrics helps you decide when it is time to switch models. If you notice that a simple search task is consuming a large number of expensive tokens, it is a clear sign that you should switch to a more economical model. The CLI makes it easy to see how much each tool use, such as WebSearch or Read, is contributing to your total spend. This transparency allows you to make data driven decisions about which model to use for specific phases of your work.

You can also use the /compact command to manage costs. As a conversation grows longer, every new prompt sends the entire history back to the model, which increases the token count. By using /compact, you summarize the session and reduce the amount of data being processed. This is especially important when using premium models, as it keeps the context focused and the costs manageable. Combining model selection with context management is the key to an efficient workflow.

Organize workflows with adhdTerminal

Managing multiple sessions with different models can be difficult in a standard terminal. This is where adhdTerminal becomes a valuable part of your setup. The app allows you to run many Claude Code sessions side by side on a single wall. Each session is a tile that you can color and name. This visual organization makes it easy to maintain different environments for different types of work.

You can dedicate one tile to a high level reasoning model for your most difficult architectural tasks and another tile to a faster model for routine maintenance. Because adhdTerminal is a native app for macOS and Windows, it handles the window management for you. You do not have to remember which terminal tab has which model active. You can simply look at your wall of tiles and see the status of each agent at a glance.

The tiles in adhdTerminal also persist through restarts. If you have a session configured with a specific model for a long running task, it will reopen in the same place and resume exactly where you left off. This eliminates the need to reconfigure your model settings every time you start your computer. The app also offers a free iPhone mirror, so you can check the progress of your high reasoning tasks even when you are away from your desk.

Scale reasoning across multiple tiles

When you use adhdTerminal, you can effectively scale your productivity by running different models in parallel. While one tile is performing a slow, deep analysis of a bug using a powerful model, you can use a neighboring tile with a faster model to perform quick file edits or run shell commands. This parallel workflow prevents your primary terminal from being locked up by a single long running task.

Each tile can be configured with its own .claude/settings.local.json or managed via the /model command independently. This allows for a highly customized environment where the intelligence level matches the specific task of that tile. You can see whether a tile is working, waiting for you, or idle, which helps you manage your attention across multiple models. This is the honest advantage of using a dedicated wall for your agents.

The app is made by MINDBALANCER OU and costs 99 dollars once. It provides a 7 day free trial and does not require an account, making it easy to see if this multi tile workflow fits your style. By separating your tasks into distinct tiles with specific models, you reduce the mental load of context switching. You can focus on the logic of your code while the wall manages the different reasoning engines for you.

Update the tool for new versions

To ensure you have access to the latest models and features, you must keep your CLI updated. You can do this by running the 'claude update' command in your terminal. This command downloads the latest version of the tool and updates the internal list of models available in the /model menu. If you hear about a new model release but do not see it in your CLI, an update is usually the solution.

If you encounter issues after an update or if a specific model is not behaving as expected, you can use the 'claude doctor' command or the /doctor slash command. These tools perform a health check on your installation and your connection to the API. They can identify problems with your credentials or your local environment that might be preventing a model from loading correctly. Regular health checks keep your development environment stable.

You can also review the changes in each version by using the /release-notes command. This command shows you what has been added or improved in the recent updates. Understanding these changes helps you take advantage of new capabilities in the models as they are integrated into the CLI. Staying current with the software ensures that your settings.json configurations remain valid and that you are using the most efficient tools available.

Manage context with the compact command

The context window is the memory of your current session. It contains everything you have typed and everything the agent has read or written. As this window fills up, the model has more information to process, which can slow down response times and increase costs. When you switch to a more powerful model, it may have a larger context capacity, but it is still good practice to keep the conversation clean.

Using the /compact command is the best way to manage this memory. This command tells the agent to summarize the conversation so far and clear out unnecessary details. It preserves the essential state of your project while making the session more efficient. If you are moving from a very intelligent model to a faster one, compacting the session first can help the faster model stay on track by providing it with a concise summary instead of a massive history.

You can see how much of your context window is currently in use by running the /status command. This provides a summary of the session, including the active model and the current token count. If the status shows that you are nearing the limit, use /compact before continuing. This proactive management ensures that your model choice is always supported by a healthy and focused context window.

Define behavior in project instructions

While you are the one who ultimately selects the model, you can use the CLAUDE.md file to help the agent understand when it might need more help. By adding specific instructions to CLAUDE.md in your root directory, you can guide the agent's behavior. For example, you can tell the agent to suggest that you switch to a more capable model if a task involves complex logic that it is struggling to solve.

The agent reads CLAUDE.md at the start of every session, so it is a perfect place to store project specific rules. You can define which parts of your codebase are the most sensitive and require the highest level of reasoning. This documentation acts as a reminder for both you and the agent. It ensures that you are consistent in your model selection across different parts of the development cycle.

You can also use subagents by creating markdown files in the .claude/agents directory. These subagents can be designed for specific tasks that might benefit from a particular model configuration. By combining these structured instructions with the /model command, you create a sophisticated development environment. This allows the agent to work more effectively within the constraints and requirements of your specific project.

Questions people ask

Can I switch models in the middle of a task?

Yes, you can use the Escape key to interrupt the agent while it is working. Once it stops, type the /model command to select a different model and then send your next prompt to continue. The agent will retain the context of what it was doing before the switch.

How do I set a different model for just one specific project?

Create a file named .claude/settings.json in the root directory of that project. Inside the JSON, specify your preferred model string. This will override your global settings whenever you run the claude command inside that specific folder.

Does changing the model affect the tools the agent can use?

The available tools like Bash, Edit, and Read remain the same regardless of which model you choose. However, a more powerful model may be better at using those tools correctly in complex scenarios. You can check the current status of your tools and permissions by typing the /status command.

Read next

More on claude code basics·All posts