Which Model for Claude Code? Opus 5.5 Tops the Coding Agent Leaderboard, Sonnet 5.5 Trails by 2.4 Points (October 2026 AA Index)

Which model should you use in Claude Code? On the October AA coding agent leaderboard, Opus 5.5 ranks first at 61.7 and Sonnet 5.5 scores 59.3. This article covers how to choose between Opus 5.5 and Sonnet 5.5, plus hands-on tests of switching with /model and --model and pairing subagents with Haiku.

8 分钟阅读
Which Model for Claude Code? Opus 5.5 Tops the Coding Agent Leaderboard, Sonnet 5.5 Trails by 2.4 Points (October 2026 AA Index)

Which model should you use in Claude Code? According to the October 2026 Artificial Analysis coding agent leaderboard, Claude Code + Opus 5.5 has the highest score (61.7), and Claude Code + Sonnet 5.5 trails by 2.4 points (59.3). Use Sonnet 5.5 as your daily main model, switch to Opus 5.5 for hard problems, and hand subagents to Haiku 5.5. Below we look at the leaderboard first, then cover how to switch and divide the work in Claude Code, with real output from every step.

October Leaderboard Takeaways

On October 23, 2026, Artificial Analysis published Coding Agent Index v2.0. The leaderboard scores the model and the client together, which means it measures a full setup such as Opus 5.5 running inside Claude Code.

ConfigurationCoding Agent Index v2.0
Claude Code + Claude Opus 5.5(max)61.7
Claude Code + Claude Sonnet 5.5(max)59.3
Muse Code + Muse Wonder Full(max)58.9
Claude Code + Claude Fable 5.1(max with fallback)57.6
Codex + GPT-6 Astra(max)54.7
Codex + GPT-6.1 Sol(max)54.1
Codex + DeepSeek V4.1 Flash(max)47.3
Original: “Claude Code with Claude Opus 5.5 (max) scores 61.7, followed by Claude Code with Claude Sonnet 5.5 (max) at 59.3, Muse Code with Muse Wonder Full (max) at 58.9 and Claude Code with Claude Fable 5.1 (max with fallback) at 57.6.” The three Codex scores, as originally worded: “Codex with DeepSeek V4.1 Flash (max) scores 47.3 … Codex with GPT-6.1 Sol (max) 54.1 … Codex with GPT-6 Astra (max) 54.7”. Source: Artificial Analysis announcement post, and the leaderboard page is at artificialanalysis.ai.

The gap comes mainly from the newly added FrontierCode v1.1:

Original: “Opus 5.5 scores 56.0% on FrontierCode, ahead of Codex with DeepSeek V4.1 Flash (max) at 52.6%, Codex with GPT-6.1 Sol (max) at 49.4% and Codex with GPT-6 Astra (max) at 49.3%.”

On the repo Q&A task (SWE-Atlas-QnA-AA), Claude Code + Opus 5.5 scores 65.9% and Sonnet 5.5 scores 64.2%. First place goes to Muse Code + Muse Wonder Full at 68.8% (original post).

For a closer look at the Codex configurations, see “How to Choose Between GPT-6.1 Sol and Claude Opus 5.5”; for connecting DeepSeek V4.1 Flash, see “DeepSeek V4.1 Flash API Configuration”.

v2.0 and v1.5 scores are not directly comparable

v2.0 replaced DeepSWE v1.1 with FrontierCode v1.1, and almost every configuration dropped in score. If you compare v2.0 scores against earlier v1.5 scores, you may wrongly conclude that the models “got worse.”

Original: “Across the 21 configurations evaluated on both Index versions, the mean Index score moves from 54.8 to 47.4, with 20 of 21 moving down.” “Scores on the two Index versions reflect different evaluation setups.” Source: Artificial Analysis.

How to Choose

Use caseRecommended modelWhy
The hardest tasks: hard-to-reproduce failures, cross-module refactors, complex designOpus 5.5Highest leaderboard score at 61.7
Daily main model: routine features, reproduced bugs, code reviews with a clear scopeSonnet 5.5Only 2.4 points below Opus 5.5, and a good fit as a long-running default model
Subagents: finding files, extracting log fields, categorizing failed testsHaiku 5.5Officially positioned for high-concurrency small tasks, making it a good subagent for Opus and Sonnet

Anthropic's official positioning for the three models: Sonnet 5.5 is best at everyday tasks with a clear scope and at fixing bugs; Opus 5.5 is designed for long-running agentic coding and knowledge work; Haiku 5.5 targets high-concurrency tasks such as classification and extraction, and Anthropic says it works well as a subagent for Opus 5.5 and Sonnet 5.5 in coding work. For a side-by-side comparison, see “How to Choose Between Claude Sonnet 5.5 and Opus 5.5”.

Leaderboard scores are averages over a fixed task set. For the tasks in your own repo, run them with the same acceptance criteria before you settle on a default model.

Choose a Model Based on the Deliverable

Start by writing the task as a verifiable deliverable, such as “fix this pagination bug and keep the old API behavior.” That makes it easier to judge whether the model finished the job than something like “see what's wrong with the project.”

TaskStarting candidateWhat to check at acceptance
Finding function definitions, extracting log fields, grouping failing testsHaiku 5.5Whether paths, quoted text, and fields are accurate and complete
Routine feature work, reproduced bugs, code reviews with a clear scopeSonnet 5.5Tests, edge-case behavior, unrelated changes
Hard-to-reproduce failures, cross-module refactors, complex design decisionsOpus 5.5Root-cause evidence, design constraints, integration checks, and rework
Long tasks that involve continuous planning, investigation, and executionSonnet vs. Opus on the same taskCompletion rate, retries, manual takeovers, and total time

Assign the main model and subagents separately

Here is one example of a clearly bounded split: Haiku returns only the failing test names, files, and log evidence. Sonnet fixes the problem based on that evidence. If the error can't be reproduced or the change goes beyond the original scope, stop the automatic fix and hand it to Opus to investigate from scratch. When you bring in Opus, include the confirmed facts, the failed attempts, and the questions that are still open. Don't dump all the messy logs back into the prompt.

Set a stop condition for model upgrades

Define the number of allowed attempts and the failure types up front. For example, let Sonnet make one implementation pass and one fix for a test error. If it still fails, needs an architecture change, or can't explain the behavior, stop, summarize the facts, and switch to Opus. This attempt count is an example rule for a team, not a built-in Claude Code threshold.

Before you switch models, work out where the failure comes from. If the Key is invalid, the URL is wrong, a tool lacks permissions, or the test environment is broken, a different model won't fix it. Fix the execution environment first.

Tutorial: Switching between Opus 5.5 and Sonnet 5.5 in Claude Code

Step 1: Create an API Key

Create an API Key →

Step 2: Write the global settings.json

Open ~/.claude/settings.json and fill in the URL and Key under env (ANTHROPIC_BASE_URL has no /v1):

json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.aicodewith.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-你的Key"
  }
}

For what each field means, see "How to Connect Claude Code to a Third-Party API".

Step 3: Confirm the model IDs

We first called the API directly with the Key. The model field returned for all three model IDs matches the official one:

text
claude-opus-5-5 -> claude-opus-5-5
claude-sonnet-5-5 -> claude-sonnet-5-5
claude-haiku-5-5 -> claude-haiku-5-5

Step 4: Switch with /model or --model

In interactive mode, just type:

text
/model claude-opus-5-5
From the official docs: "use /model <alias|name> to switch immediately, or run /model with no argument to open the picker" and "At startup: launch with claude --model <alias|name>". The docs also say "/model saves your choice as the default for new sessions by writing the model field in your user settings", which means that after you switch with /model, new sessions will use that model too. Source: Claude Code Docs: Model configuration.

If you only want a particular model for this one run, pass --model at startup:

bash
claude --model claude-sonnet-5-5

To pin a default model, add a model field to settings.json:

json
{
  "model": "claude-sonnet-5-5",
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.aicodewith.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-你的Key"
  }
}

On Claude Code 2.1.308 in a clean, isolated HOME, we ran each of these switching methods in non-interactive mode with claude -p. Every run asked the same question: "Answer in one sentence: which model are you right now?" The model IDs actually used in the run logs are below:

Switching methodModel ID in the logModel's answerTime
--model claude-opus-5-5claude-opus-5-5I'm Claude Opus 5.5 from Anthropic (model ID: claude-opus-5-5), running through Claude Code.6.8 seconds
--model claude-sonnet-5-5claude-sonnet-5-5I'm Claude Code, powered by Anthropic's Claude Sonnet 5.5 model.6.9 seconds
settings.json with "model": "claude-sonnet-5-5"claude-sonnet-5-5I'm Claude Code, powered by Anthropic's Claude Sonnet 5.5 model.6.8 seconds
claude -p "/model claude-haiku-5-5"No model request was madeSet model to `Haiku 5.5` for this session only1.4 seconds
When you use /model in non-interactive -p mode, it only applies to that one run and isn't saved as the default. From the official docs: "If you set a model with /model in non-interactive mode, with the -p flag, your choice applies to the current session only and isn't saved as your default". In scripts, --model is more direct.

Step 5: Set subagents to Haiku 5.5

By default, subagents follow the main session's model. After you switch the main session to Opus 5.5, any subagent without its own model setting also runs on Opus 5.5.

From the official docs: "If you switch models with /model, the switch also reaches subagents that inherit the main conversation's model … To keep a custom subagent on a smaller model, set model in its definition."

To make all subagents use Haiku, add two entries under env in settings.json:

json
{
  "env": {
    "CLAUDE_CODE_SUBAGENT_MODEL": "haiku",
    "CLAUDE_CODE_SUBAGENT_MODEL_FORCE": "1"
  }
}
From the official docs: "CLAUDE_CODE_SUBAGENT_MODEL is a default, so a subagent's definition or a model Claude passes still takes precedence over it. To apply one model to every subagent … also set CLAUDE_CODE_SUBAGENT_MODEL_FORCE to 1. Requires Claude Code v2.1.257 or later." and "Setting CLAUDE_CODE_SUBAGENT_MODEL by itself doesn't change the model the built-in Explore and Plan subagents run on." Source: Claude Code Docs: Subagents.

To set a model for just one custom subagent, add a model field at the top of its definition file. You can use an alias like sonnet, opus, or haiku, a full ID like claude-haiku-5-5, or inherit to follow the main session.

We tested this setup: the main model in settings.json set to claude-opus-5-5, the two env entries above added, then we asked Claude Code to spawn a subagent to list the files in the current directory. Two models showed up in the run log:

text
claude-opus-5-5   主会话
claude-haiku-5-5  子 Agent

Final reply:

text
子 Agent 看过了,当前目录里只有一个文件:
- readme.txt(普通文件,6 字节)
没有子目录,也没有隐藏文件。

The whole run took 11.6 seconds. In interactive mode, type /tasks while the subagent is running, and that line shows which model it is using. For more on subagent configuration, see Configuring Haiku 5.5 for Claude Code Subagents.

Want Opus 5.5 to run faster?

Opus 5.5 has a fast mode. To turn it on, see Claude Opus 5.5 Fast Mode.

FAQ

What is the strongest model in Claude Code?

According to the October 2026 Artificial Analysis Coding Agent Index v2.0, Claude Code + Opus 5.5 (max) ranks first with a score of 61.7.

Opus 5.5 or Sonnet 5.5?

Use Sonnet 5.5 as your daily main model. It scores only 2.4 points lower than Opus 5.5 on the leaderboard. Switch to Opus 5.5 when Sonnet fails to fix something after two attempts, when you need an architecture change, or when you can't explain the behavior you're seeing.

If I switch with /model, do subagents switch too?

Subagents without their own model setting will follow the switch. To keep subagents pinned to Haiku, configure CLAUDE_CODE_SUBAGENT_MODEL and CLAUDE_CODE_SUBAGENT_MODEL_FORCE as described in step 5 above.

I saw higher leaderboard scores before. Did the model get worse?

No. v2.0 uses a new test set. 20 of the 21 combinations dropped in score, and the average fell from 54.8 to 47.4, so scores from the two versions can't be compared directly.

Related Reading

Sources