Claude Code におけるモデルと作業レベルの選択方法
Anthropic は、Claude Code ツール利用時にタスクの複雑さに応じて適切なモデルとリソース投入レベルを選択するガイダンスを公開し、開発効率とコスト最適化のバランスを提案した。
キーポイント
タスクに応じたモデル選択の推奨
単純なスクリプト作成には軽量モデルを、複雑なシステム設計やデバッグには高性能モデルを使用するよう、作業内容とモデル性能のマッチングを促している。
リソース投入レベル(Effort Level)の調整
タスクの難易度に応じて計算リソースや思考ステップ数を動的に調整する仕組みを提供し、過剰なコスト投入を防ぎつつ必要な品質を確保する方針を示している。
開発ワークフローの最適化
Claude Code を使用する場合、最初から最高性能モデルを使うのではなく、段階的にリソースを増やすことで、開発者の生産性とコスト効率を最大化するアプローチを提案している。
影響分析・編集コメントを表示
影響分析
この記事は、AI コーディングツールの実運用において、単に「高性能モデルを使えば良い」という誤解を正し、リソース管理の重要性を浮き彫りにした点で意義深い。開発者がコストとパフォーマンスのトレードオフを理解し、適切な設定を行うことで、Claude Code の導入障壁を下げ、より広範な活用を促す効果が期待される。
編集コメント
AI ツールの導入において、性能だけでなくコスト管理の視点が欠落しがちですが、今回のガイダンスはそのバランスを取るための実用的な指針となっています。
モデル選択の仕組み
Enter キーを押すと、Claude Code はあなたのメッセージをシステムプロンプト、ツール定義、CLAUDE.md ファイル、会話履歴、およびコンテキスト内のすべてのファイルと組み合わせて 1 つのリクエストとして API に送信します。

Claude Code が扱うすべての情報は 1 つの API リクエストにパックされます。サーバー上では、テキストはモデルに到達する前にトークン化(tokenization)されます。ただし、モデルがそれをプレーンテキストとして見ることはありません。サーバー上で最初に起こるのはトークン化です。テキストは細切れに分割され、各ピースはモデルが学習した固定された語彙から割り当てられた整数マッピングされます。例えば、"const" は 1978 に、「await」は 4293 にマッピングされる可能性があります。ここからは、あなたのプロンプトは整数の配列となります。

トークナイザーはテキストを細切れに分割し、各ピースを固定された語彙内の整数にマッピングします。上段の各チャンクがそのトークン ID(下段)になります;表示されている ID は例示です。モデルの役割は、この配列を受け取り、次にどのトークンが来るかを予測することです。これは、語彙内のすべてのトークンに対して確率を計算し、上位から選択することで実現されます。「const x = await」の後では、よく訓練されたモデルは「fetch」に高い確率(非常に可能性が高い)を与え、「banana」にはほぼゼロの確率(全く可能性がない)を与えます。

モデルの予測は、その語彙に含まれるすべてのトークンに対する確率です。最上位の推測と無関係な推測との間のギャップは膨大です。あなたの入力トークンをこれらの確率に変換するのは重み(*パラメータ*とも呼ばれます)です。これらは数十億もの数値からなり、大きな行列として構成されています。1 つのトークンを予測するために、モデルはその行列に対して入力を通し、長い行列乗算の連鎖を実行した上で、最終的に得られる確率を読み取ります。重みこそが、モデルが「知っている」すべてのことが存在する場所です。
各モデルの重みはトレーニング中に設定され、リクエストを送信する時点では読み取り専用となります。プロンプトや CLAUDE.md ファイル、あるいはコンテキストの内容でこれらを変更することはできません。(もし推論という用語に遭遇したことがあるなら、それはつまり、トレーニング完了後に固定された重みを用いてモデルを使用することを意味します。)

プロンプトが入力され、確率が出力されます。その中間にある重みは変化しません。
TypeScript や人気のあるフレームワーク、慣習的な Go 言語、あるいはその他の一般的なプログラミング知識について Claude が知っているすべてのことは、トレーニング時にこれらの重みにエンコードされています。
あなたのプロンプトやコンテキストは依然として予測を誘導することができます(実際のコードを Claude の前に置くことは*誘導*であり、非常に効果的です)が、それらが重みそのものに何かを追加するわけではありません。
もしモデルのトレーニング時にライブラリが存在していなければ、そのライブラリは重み(weights)に含まれていません。ドキュメントをコンテキストとして提供すれば Claude はそれを利用しますが、それは*指導*ではなく*誘導*に過ぎません。Claude の回答はそのリクエストに対してのみ影響を受け、根本的なモデルが情報を保持したわけではありません。
したがって、存在しない API を Claude が自信を持って呼び出す場合(これはハルシネーションです)、それは重みがトレーニングパターンから見て*妥当に見える*トークン系列を生成しているだけであり、検索に失敗したわけではありません。
では、モデルを変更すると実際に何が変わるのでしょうか?それは、リクエストを処理する固定された重みのセットが入れ替わるだけです。
モデルは一度に全体回答を生成するわけではありません。1 つのトークンを予測し、それを系列に追加して計算を再実行し、次のトークンを取得します。200 トークンの回答とは、重みを 200 回通した別々のパスです。このループが、待ち時間のほとんどと出力コストの大部分を生み出しています。

各ステップで系列は正確に 1 トークンずつ成長します。モデルは毎回、次に来るものを予測するために配列全体を再読み込みします。つまり、モデル設定はリクエストを処理する*重み*と、出力トークンごとのコストの両方を決定します。
しかし、生成されるトークンの数を決定するのはこの設定ではありません。その数はプロンプトが同じでも大きく変動し、Claude が各ターンでどの程度の作業を行うかによって異なります。
これがエフォートレベル(effort level)が制御するものです:*各ターンで Claude が行う作業の量*です。
エフォートレベルの仕組み
Claude Code がタスクに取り組んでいる際、生成されるトークンはいくつかのカテゴリーに分類されます:
- 思考(Thinking):アクションの前や間にストリーミング表示される推論プロセス。
- ツール呼び出し(Tool calls):Read や Edit といったツールの名前とその引数を記述した構造化ブロックで、Claude Code はこれを解析して実行します。
- あなたへのテキスト出力(Text to you):計画内容、進捗状況の更新、および最終的なサマリー。
これらはすべて同じループからの通常の出力トークンであり、同一レートで課金されます。例えば、思考用のトークンは他の出力トークンと同じように生成され、そのターン中はコンテキスト内に保持されます。
Claude がコードの記述に移行すると、それまでの推論プロセスは、読み込んだファイルと同様に入力の一部となります。**

Claude のすべての出力はトークンです。思考、ツール呼び出し、あなたへのテキスト出力はいずれも同じループから生成されます。では、エフォートレベルはこの仕組みをどのように変えるのでしょうか?エフォートレベルは、プロンプトと共にリクエストの一部としてモデルに送信されます。このモデルは、各エフォートレベルでどのように振る舞うべきかを理解するように訓練されており、その学習された行動様式は凍結された重み(frozen weights)に組み込まれています。
リクエストが到着すると、エフォートレベルはプロンプトテキストに対する反応と同様に、モデルが応答する入力の一つとなります。これにより、タスク完了とみなすまでに必要な徹底度や確実性が Claude の行動方針として設定されます。
これは各ターンにおいて考慮され、より高い信頼度の回答を得るために、より多くのトークンを生成する結果となります。

同じプロンプトに対して、2 つの異なる努力レベル(effort levels)を適用した場合です。高努力レベルのパスでは、より高い信頼度の回答に到達するために、およそ 7 倍のトークンを生成します。努力レベルが高い場合、Claude は通常まず計画を作成し始め、その努力レベルがその計画の深さと範囲に影響を与えます。ただし、この計画は固定されたものではありません。Claude が自身の行動からの結果を受け取ると、達成された進捗と蓄積された結果に対する確信度を更新します。
したがって、3 つの仮説に基づくデバッグ計画のステップ 1 でバグが見つかった場合、「仮説 2 と 3 を調査する」というアクションは不要になる可能性があります。Claude は通常これを明確に述べ、「最初のチェックで見つかったので、残りのチェックは不要です」と言い、先へ進みます。タスクリストが実行中に修正される様子も、Claude Code でこのように確認できます。
高努力レベルでは、追加の仮説を再検証したり、正しさを確認したりする傾向が強まりますが、一般的に単純なタスクにおいて高努力レベルで artificially に使用量を膨らませることはありません。実際、私たちのチームはモデルトレーニング中に「過剰な思考(overthinking)」に注意深く目を配っており、これは効果性を低下させるためです。
エフォートレベルの選択
私たちのガイダンスは、ほとんどのタスクではモデルのエフォートレベルのデフォルト設定を使用すべきであるというものです。デフォルトとは、Claude がタスクに費やすべきと多くの人が考える量に応じてトークン使用量をスケーリングするレベルのことです。
エフォートは、Claude の作業強度と時間を手動で調整するためのオーバーライドとして考えてください。ドメインや行う仕事の種類に基づいて、徹底性または速度に対して強い希望がある場合にのみ、意図的に選択してください。これはタスクごとの判断というよりも、一般的な好みとして捉えるべきです。
Claude Opus 4.8 のリリース以降のガイドに役立ついくつかの実践的な知見があります:私たちのテストでは、Opus 4.8 でデフォルトのエフォート設定を使用すると、同じタスクに対して Opus 4.7 のデフォルトエフォート設定を使用した場合と比較して、ほぼ同数のトークンでより良い結果が得られることがわかりました。
Claude が間違えた場合の変更点
Claude が何かを誤った場合、最初に指針を調整しようとするのではなく、提供したコンテキストを検証すべきです。プロンプトは曖昧すぎませんか?Claude は適切なツールに接続されていますか?必要なスキルを備えていますか?
*本来必要ない*タスクに対してエフォートを増やしている場合、解決策は往々にして上流の、つまりコンテキスト、CLAUDE.md ファイル、またはタスクのスコープ設定にあります。
しかし、明確なコンテキストを提供したにもかかわらず Claude が依然として何かを誤った場合、自問すべき質問は「十分に*努力*しなかったのか」、それとも十分な*知識*がなかったのか、のどちらかです。

2 つの質問、そして 1 つの fallback(代替案)。ヒューリスティック(経験則)を使って出発点を選ぶものであり、絶対的なルールではありません。
モデル:問題が難しすぎた
問題が本質的に難しい場合は、より大きなモデルを選択してください。例えば、微妙なバグや、見知らぬドメイン、あるいはアーキテクチャに関する意思決定などが該当します。文脈をどれだけ与えても、小さなモデルが自信を持って間違ってしまうような状況では、より大きなモデルが役立ちます。
より大きなモデルは曖昧さへの対応にも優れていますが、実行を指示する具体的な指示は、小さなモデルにおいて成功するためのより良いレシピとなります。
作業が日常的なものである場合は、より小さなモデルを選択してください。例えば、正確に記述できる編集や、機械的な変更、あるいはすでに文脈に含まれているコードに関する質問などが該当します。タスクが必要としていない能力に対して費用を払う理由はありません。
Claude が関連するすべての文脈を持っており、明確に試みたにもかかわらず依然として間違っている場合は、より大きなモデルを選ぶべきというシグナルです。もしあなたがより大きなモデルを使用中で、作業がしばらく日常的なものであったなら、モデルを下げることで速度が向上し、通常は出力の品質に影響を与えることなくコストも削減されます。
エフォート:Claude が十分に努力していなかった
ファイルのスキップやテストの実行漏れ、あるいは自身の作業の確認不足によって Claude が間違えた場合は、より高いエフォートレベルを選択してください。これは、モデルのデフォルトよりも低いエフォートレベルを選択した場合に特に重要です。
Fable と Opus と Sonnet:専門家、エキスパート、そして一般職
この 2 つの設定の関係を考える一つの方法として、Fable はほとんど誰も見たことのない問題を見たことがある専門家で、Opus はエキスパートであり、Sonnet は非常に優れた一般職だと考えています。努力レベルは、これらそれぞれがあなたのタスクに費やす時間の量を決定します。
低努力の Opusは、あなたのような問題について深い経験を持つエキスパートと 5 分間だけ話をするようなものです。彼らはコードベースにはない知識を持ち込みます:以前に見たパターン、チェックすべき落とし穴、多くの類似した問題を解決することでしか得られないようなことです。しかし、彼らに 5 分しか与えないということは、あなたのコードを素早く読むだけで、注意深く読むわけではないことを意味します。
高努力の Sonnetは、非常に優れた一般職に午後の丸一日を与えるようなものです。彼らはすべてを読み、実行し、自分の作業を再確認し、最終的に*あなた固有のコード*を徹底的に理解します。彼らがあまり持ち込まないのは、「以前にまさにこれを見たことがある」という認識です。
低努力の Fable でさえも、他の誰もが立ち往生している問題に専門家が一瞥を与え、それでも誰もが見逃すものを見つけているようなものです。その認識こそが、あなたが最も支払っている部分なので、本当にそれを必要とするタスクのために取っておく価値があります。
これらどれが普遍的により優れているわけではありません。モデル設定はおよそ*能力の程度*を、努力設定はおよそ*徹底度の程度*を表します。実際の多くのタスクには、その両方が一部必要です。
エフォート、モデル、およびトークン消費量
では、モデルの選択、エフォートレベル、そしてトークン消費量はどのように相互作用するのでしょうか?それはタスク次第です。
同じエフォートレベルでの日常的な作業においては、両方のモデルが一般的に正しく処理します。より大きなモデルは、追加の確認ステップにより多くのトークンを消費し、1 トークンあたりの価格も高くなります。そのため、日常的な作業では小さなモデルに切り替えることで、品質を損なうことなく実際のコストを節約できるのです。

曲線は単なる説明用であり、両方のモデルが短時間で完了できるほど単純な単一のタスクについて示したものです。これらは実際のベンチマークデータを表すものではありません。
より困難で多段階の作業においては、状況は異なります。小さなモデルは自身の能力の限界に向かって努力し、試行錯誤を繰り返してエネルギーを消耗する一方、大きなモデルは少ないステップで同じ品質基準に達します。
大きなモデルは 1 トークンあたりの価格が高くなりますが、小さなモデルにとって本当に負荷の高いタスクにおいては、タスクあたりの総コストの方が低くなる可能性があります。さらに重要なのは、大きなモデルであれば、エフォート設定を最大にしても小さなモデルでは達成できないタスクさえも実行できる点です。
これは特に Fable において顕著です。長い多段階の作業においては、他のモデルよりも大きく差を広げます。私たちのテストでは、Opus や Sonnet はどのエフォートレベルでも到達できない仕事を Fable が完了しました。また、Fable は 1 トークンあたりのコストも最も高いため、必要な場合にのみ使用する理由の一つとなっています。
曲線は説明目的のみのものであり、両方のモデルを限界まで引き伸ばす単一のタスクに対して示されたものです。これらは実際のベンチマークデータを表すものではありません。
上記のグラフにおける重要な点は、努力レベルが Claude がその曲線上でどこまで進むことを望むかを選択する点ですが、それでもまた、タスクを完了するために実際にそこまでの距離を進む必要があるという意味ではありません。
このことに関するもう一つの微妙な違いは、努力レベルがトークン消費量に影響を与えるものの、それを制限するものではないという点です。システム内の唯一の硬性上限は max_tokens であり、これに達すると応答が途中で打ち切られます。これは主に API 開発者に関連する単純な手段です。より柔軟な制御としては、タスク予算 やプロンプトで Claude に簡潔に保つよう求めることなどが挙げられます。これらはモデルが従うように訓練されたガイダンスであり、壁にぶつかるのではなく、限界に近い場合にタスクを完了しようとするためのより有用なツールです。
デフォルトから始め、必要に応じて調整する
ほとんどの場合、これらの設定について考える必要はありません。結果が期待外れだった場合は、「Claude が知識不足だったのか、それとも努力が足りなかったのか」と自問し、必要に応じて調整してください。
*This article was written by Lydia Hallie, member of technical staff on the Claude Code team.*
必ずJSON形式で返してください。translation フィールドのみ。他のフィールド(technical_terms 等)は一切追加しないこと — 余計なフィールドを書こうとして本文翻訳がトークン上限で打ち切られる事故を防ぐため:
{"translation": "翻訳全文"}
原文を表示
How model selection works
When you press enter, Claude Code assembles your message together with the system prompt, tool definitions, your CLAUDE.md, the conversation history, and any files in context. All of this is sent as one request to the API.

The model never sees that as plain text, though. The first thing that happens on the server is tokenization; the text is split into pieces, and each piece is mapped to an integer from a fixed vocabulary the model was trained with. const might map to 1978, await might map to 4293. From here on, your prompt is an array of integers.

The model's job is to take that array and predict which token comes next. It does this by computing a *probability* for every token in its vocabulary and picking from the top. After const x = await, a well-trained model puts high probability on fetch (very likely) and near-zero on banana (not likely at all).

What turns your input tokens into those probabilities is the weights (also called *parameters*). These are billions of numbers organized into large matrices. To predict one token, the model runs your input through those matrices, a long chain of matrix multiplications, and reads the probabilities at the end. The weights are where everything the model "knows" lives.
The weights of each model are set during training, and by the time you're sending requests they're read-only. Nothing in your prompt, your CLAUDE.md, or your context changes them. (If you've run into the word inference, that's all it means: using the model after training is done, with the weights fixed.)

Everything Claude knows about TypeScript, popular frameworks, idiomatic Go, or any other general programming knowledge, was encoded into those weights at training time.
Your prompt and context can still *steer* the prediction (putting your real code in front of Claude is *steering*, and it works really well), but they don't add anything to the weights themselves.
If a library didn't exist when the model was trained, it isn't in the weights. You can put the docs in context and Claude will use them, but that's *steering*, not *teaching*. Claude’s response will only be influenced for that request; the underlying model hasn’t retained the information.
So when Claude confidently calls an API that doesn't exist (a hallucination), that's the weights producing a token sequence that *looks* plausible from training patterns, not a failed lookup.
So what does changing the model actually do? It swaps which set of frozen weights handles your request.
The model doesn't generate a whole answer at once. It predicts one token, appends it to the sequence, and runs the whole computation again to get the next one. A 200-token response is 200 separate passes through the weights. This loop is where most of your wait time and your output cost come from.

So the model setting decides *which weights* handle your request, and it also decides what each output token costs.
What it doesn't decide is how many tokens get generated. That number can vary a lot for the same prompt, depending on how much work Claude decides to do.
This is what effort level controls: *how much work* Claude decides to do for each turn.
How effort works
When Claude Code is working on a task, the tokens it generates fall into a few categories:
- Thinking: the reasoning you see streaming before and between actions.
- Tool calls: structured blocks naming a tool like Read or Edit and its arguments, which Claude Code then parses and executes.
- Text to you: the plan, progress updates, the summary at the end.
These are all ordinary output tokens from the same loop, billed at the same rate. For example, thinking tokens are generated exactly like the other output tokens and stay in context for the rest of that turn.
When Claude moves on to writing code, its earlier reasoning is part of the input just like a file it’s read. **

How does effort change any of this? The effort level is sent to the model as part of the request, right alongside your prompt. The model was trained to understand how to behave at each effort level and that learned behavior is baked into the frozen weights.
When your request arrives, effort level is one more input the model responds to, the same way it responds to your prompt text. This sets Claude’s behavior for how thorough and certain it needs to be before it considers the task done.
This is considered on every turn and **results in more tokens to produce higher confidence answers.

At higher effort levels, Claude often starts with creating a plan and the level of effort influences the depth and breadth of that plan. However, the plan is not frozen in place. As Claude receives results from its actions, it updates the progress that has been made and how certain it is of the accumulated result.
So when step 1 of a three-hypothesis debugging plan finds the bug, "investigate hypotheses 2 and 3" may no longer be necessary actions. Claude will typically say this explicitly, "the first check found it, so the remaining checks aren't needed" and skip ahead. You see this happen in Claude Code when task lists get revised mid-run.
Claude will be more predisposed to double-checking additional hypotheses or verifying correctness at higher effort levels, but it generally won’t artificially inflate usage for simple tasks at higher effort levels. In fact, our team pays close attention to “overthinking” during model training as it degrades effectiveness.
Picking an effort level
Our guidance is that for most tasks you should use the model’s default effort level. The default is the level where Claude will scale its token usage according to what most people would want to spend on a task.
Think of effort as a manual override to scale how hard and long Claude works. Choose it deliberately when you have a strong preference for thoroughness or speed based on your domain or the type of work you do. Consider this more as a general preference than a task-by-task decision.
Some practical insight that may help guide you following the launch of Claude Opus 4.8: in our testing we found when you use the default effort setting for Opus 4.8, it will produce better results for about the same number of tokens when compared to using the default effort setting of Opus 4.7 for the same task.
What to change when Claude gets it wrong
When Claude gets something wrong, your first instinct shouldn’t be to adjust a knob, but to examine the context you have provided. Is your prompt too vague? Is Claude connected to the right tools? Equipped with the right skills?
If you're increasing effort on a task that *shouldn't* need it, the fix is often upstream, in your context, your CLAUDE.md, or how the task is scoped.
But assuming you have provided clear context and Claude still gets something wrong, the question to ask yourself is: did it not *try* hard enough, or did it not *know* enough?

Model: The problem was too hard
Pick a larger model when the problem is genuinely hard. For example, problems like subtle bugs, unfamiliar domains, or architecture decisions. A larger model is helpful for situations where the smaller model is confidently wrong no matter how much context you give it.
Larger models are also better at handling ambiguity, whereas specific instructions directing execution are a better recipe for success on the smaller models.
Pick a smaller model when the work is routine. For example, edits you can describe precisely, mechanical changes, or questions about code that's already in context. There's no reason to pay for capability the task doesn't need.
If Claude has all the pertinent context and clearly tried and still got it wrong, that's a signal to pick a larger model. If you're on the larger model and the work has been routine for a while, dropping down will increase speed and typically reduce cost without impacting the quality of the output.
Effort: Claude didn’t try hard enough
Pick a higher effort level if Claude got it wrong by skipping a file, not running the tests, or not double-checking its work. This is most relevant if you selected an effort level below the model’s default.
Fable vs. Opus vs. Sonnet: The specialist, the expert, and the generalist
One way I like to think about how the two settings relate: Fable is a specialist who's seen problems almost no one else has, Opus is the expert, and Sonnet is a really good generalist. The effort level decides how much time any of them spends on your task.
Opus at low effort is like getting five minutes with an expert who has deep experience with problems like yours. They bring knowledge that isn't anywhere in your codebase: patterns they've seen before, gotchas they know to check for, the kind of thing you only get from having solved a lot of similar problems. But just giving them five minutes means a quick read of your code, not a careful one.
Sonnet at high effort is like giving a really good generalist the whole afternoon. They'll read everything, run things, double-check their work, and end up understanding *your specific code* thoroughly. What they bring less of is that "I've seen exactly this before" recognition.
Fable, even at low effort, is that specialist glancing at the problem everyone else is stuck on and still spotting the thing no one else would. That recognition is what you're paying the most for, so it's worth saving for the tasks that genuinely need it.
None of these is universally better. The model setting is roughly *how capable*; the effort setting is roughly *how thorough*. Most real tasks need some of both.
Effort, model, and token consumption
So how do model selection, effort, and token consumption all interact? It depends on the task.
On routine work at the same effort level, both models generally will get it right. The larger model consumes more tokens with extra verification steps at a higher per-token price. That's why dropping to the smaller model for routine stretches saves real money at no quality cost.

On harder, multi-step work, the equation is different. The smaller model has to grind toward the limit of its ability, burning iterations, while the larger model reaches the same quality bar in fewer steps.
You're paying more per token for the larger model, but on tasks that genuinely stretch the smaller one, the total cost per task can come out lower. Also, more importantly, the larger model can accomplish tasks the smaller one cannot even at the highest effort settings.
This is most pronounced with Fable. On long, multi-step work it pulls furthest ahead. In our testing, it finished jobs Opus and Sonnet can't reach at any effort level. It also costs the most per token, which is the other reason to save it for the work that needs it.

The key point in the graphs above is that effort level picks how far Claude is willing to travel along the curve, but again, that doesn’t mean Claude will need to travel that far to complete the task.
Another nuance to this: effort shapes token consumption but doesn't limit it. The only hard cap in the system is max_tokens, which truncates a response mid-stream when hit. It’s a blunt instrument, mostly relevant to API developers. Softer controls, like task budgets or asking Claude to keep it brief in your prompt, are more helpful tools. They serve as guidance the model is trained to follow-it will look to conclude its tasks if it gets near the limit–rather than a wall it runs into.
Start with the defaults, then reach for the dials
Most of the time, you shouldn't be thinking about either setting. When a result misses the mark, ask, “did Claude not know enough or did it not try hard enough?” and adjust as needed.
*This article was written by Lydia Hallie, member of technical staff on the Claude Code team. *
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み