Glean 拾遗
Daily /2026-07-15 / Model and effort in Claude Code: knowing more vs. trying harder

Model and effort in Claude Code: knowing more vs. trying harder

Source x.com Glean’d 2026-07-15 06:00 Read 14 min
AI summary

This article by a Claude Code team member explains the real mechanism behind model and effort settings. Model selection swaps frozen weights (knowledge), while effort controls how much work Claude does—how many files it reads, tests it runs, and how thoroughly it verifies. Using analogies (specialist vs expert vs generalist) and diagrams, it clarifies when to upgrade the model (not enough knowledge) vs increase effort (not enough trying). Practical advice: start with default effort, choose larger models for hard problems, smaller ones for routine tasks to save cost. Key insight: check context first, then decide if Claude didn't know or didn't try hard enough.

Original · 14 min
x.com ↗
§ 1

Model and effort in Claude Code: knowing more vs. trying harder

Claude Code中的模型与努力:知道更多 vs 更努力

§ 2

Claude Code gives you two settings that both seem to "make the answer better": the model, and the effort level. But what do these actually do to the output? And how do you know whether to reach for a different model or just change the effort level?

It's easy to assume that choosing a larger model like Fable gives you a smarter output than Sonnet, and that a higher effort level just means Claude thinks longer before it answers.

The first assumption is true. Our largest models are more capable, according to industry-standard benchmarks.

But effort means more than "thinking time." Effort controls how much work Claude does on your request overall. That includes how long it thinks, but also:

  • how many files it reads;
  • how much it verifies; and
  • how far it pushes through a multi-step task before checking in with you. At higher effort, Claude takes more of those actions (read files, run tests, double-check) before it comes back to you. At lower effort, it would rather ask you for more context than spend tokens figuring something out on its own.

Claude Code 提供了两种设置,它们看起来都能“让答案变得更好”:模型(Model)和努力程度(Effort Level)。但这些设置到底对输出做了什么?你又如何知道该换一个模型还是仅仅调整努力程度?

很容易认为,选择像 Fable 这样更大的模型会比 Sonnet 产出更智能的输出,而更高的努力程度只是意味着 Claude 在回答前思考更久。

第一个假设是对的。根据行业标准基准测试,我们最大的模型能力更强。

但努力程度不仅仅意味着“思考时间”。努力程度控制着 Claude 为你的请求所做的总工作量。这包括它思考的时间,还包括:

  • 读取多少文件;
  • 进行多少验证;
  • 在多步骤任务中推进到哪一步后才与你确认。 在更高努力程度下,Claude 会在返回给你之前执行更多这些动作(读文件、跑测试、反复检查)。在较低努力程度下,它更愿意向你询问更多上下文,而不是自己花费 token 来搞明白。
§ 3

To understand what the model setting actually controls, it helps to start at the very beginning, from the moment 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.

要理解模型设置实际控制什么,最好从最开始讲起,就在你按下回车的那一刻。

Claude Code 会将你的消息与系统提示、工具定义、你的 CLAUDE.md、对话历史以及上下文中的任何文件组装在一起。所有这些作为一次请求发送到 API。

§ 4

§ 5

The model never sees any of that as plain text, though. The first thing that happens on the server is tokenization: the text gets 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.

不过,模型永远不会将那些视为纯文本。服务器上发生的第一件事是 token 化:文本被分割成片段,每个片段被映射到模型训练时固定词汇表中的一个整数。const 可能映射到 1978,await 可能映射到 4293。从此刻起,你的提示词就是一个整数数组。

§ 6

§ 7

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).

模型的任务是获取该数组并预测下一个 token。它通过计算词汇表中每个 token 的概率并从顶部选择来实现。在 "const x = await" 之后,一个训练良好的模型会给 "fetch" 分配高概率(非常可能),而给 "banana" 分配接近零的概率(完全不可能)。

§ 8

§ 9

What turns your input tokens into those probabilities is the weights (also called parameters): 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.

将你的输入 token 转换为这些概率的是权重(也称为参数):数十亿的数字组织成大型矩阵。为了预测一个 token,模型将你的输入通过这些矩阵(一长串矩阵乘法)运行,并在最后读取概率。权重是模型“知道”的一切所在。

每个模型的权重在训练期间设置,当你发送请求时它们是只读的。你的提示词、CLAUDE.md 或上下文中的任何内容都不会改变它们。如果你遇到过“推理(inference)”这个词,它就是这样:在训练完成后使用模型,权重是固定的。

§ 10

§ 11

Everything Claude knows about TypeScript, popular frameworks, 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. However, this doesn'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 is only influenced for that one request, but the underlying model hasn't retained anything.

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.

Claude 知道的关于 TypeScript、流行框架或任何其他通用编程知识的一切,都在训练时被编码到了这些权重中。

你的提示词和上下文仍然可以引导预测。把你的真实代码放在 Claude 面前就是引导,效果很好。但是,这不会给权重本身增加任何东西。

如果某个库在模型训练时不存在,它就不在权重中。你可以把文档放在上下文中,Claude 会使用它们,但那是引导,而不是学习。Claude 的响应只在那一次请求中受到影响,底层模型没有保留任何东西。

当 Claude 自信地调用一个不存在的 API(幻觉)时,那是权重在产生一个从训练模式看来合理的 token 序列,而不是失败的查找。

§ 12

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) comes from.

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.

Which is exactly what effort controls.

那么,改变模型实际上做了什么?它替换了处理你请求的那组冻结权重。

模型不会一次性生成整个答案。它预测一个 token,将其附加到序列中,然后再次运行整个计算来获取下一个 token。一个 200 token 的响应需要 200 次独立的权重传递。这个循环是你大部分等待时间(以及输出成本)的来源。

模型设置决定了哪组权重处理你的请求,也决定了每个输出 token 的成本。

它不决定生成多少个 token。对于相同的提示词,这个数字可能有很大差异,取决于 Claude 决定做多少工作。

而这正是努力程度所控制的。

§ 13

§ 14

While 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. Thinking tokens, for example, are generated exactly like the other output tokens and stay in context for the rest of that turn.

By the time Claude moves on to writing code, its earlier reasoning is part of the input, just like a file it read.

So 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 is just one more input the model responds to, the same way it responds to your prompt text. It sets how thorough, and how certain, Claude needs to be before it considers the task done. That gets weighed on every turn, and higher confidence takes more tokens to reach.

At higher effort levels, Claude often starts by creating a plan, and the effort level influences the depth and breadth of that plan. But the plan isn't frozen in place. As Claude gets results back from its actions, it updates its picture of how much progress it's made and how certain it is of the accumulated result.

When step 1 of a three-hypothesis debugging plan finds the bug, "investigate hypotheses 2 and 3" may no longer be necessary. Claude will usually say this explicitly (e.g. "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.

Higher effort does make Claude more likely to double-check, like verifying the answer it found, or still look into the hypotheses it could have skipped. However, it generally won’t artificially inflate usage on a simple task just because the effort level is turned up. "Overthinking" is something our team specifically watches for during model training as it degrades effectiveness.

当 Claude Code 正在处理一个任务时,它生成的 token 分为几类:

  • 思考(Thinking):你在操作之前和之间看到的推理过程。
  • 工具调用(Tool calls):结构化块,命名诸如 Read 或 Edit 之类的工具及其参数,然后由 Claude Code 解析并执行。
  • 给你的文本(Text to you):计划、进度更新、最后的总结。 这些都是同一个循环中普通的输出 token,按相同的费率计费。例如,思考 token 的生成方式与其他输出 token 完全相同,并在该回合的剩余部分保持在上下文中。

当 Claude 继续写代码时,它之前的推理已成为输入的一部分,就像它读取的一个文件一样。

那么,努力程度如何改变这一切?努力程度作为请求的一部分发送给模型,就在你的提示词旁边。模型经过训练,知道在每个努力程度下如何表现,并且这种习得的行为被固化在冻结的权重中。

当你的请求到达时,努力程度只是模型响应的另一个输入,就像它响应提示词文本一样。它设定了 Claude 需要多彻底、多确定才认为任务完成。这在每一轮都会被权衡,更高的确定性需要更多的 token 才能达到。

在更高的努力程度下,Claude 通常从制定计划开始,努力程度影响该计划的深度和广度。但计划不是一成不变的。当 Claude 从它的行动中获得结果时,它会更新自己对已取得进展和累积结果确定性的认知。

当三个假设的调试计划的第一步就发现了 bug 时,“调查假设 2 和 3”可能就不再必要了。Claude 通常会明确说明这一点(例如“第一次检查找到了,所以不需要剩余检查”)并跳过。当任务列表在运行中被修改时,你可以在 Claude Code 中看到这种情况。

更高的努力程度确实让 Claude 更可能进行双重检查,比如验证它找到的答案,或者仍然查看它本可以跳过的假设。然而,它通常不会仅仅因为努力程度调高了,就在一个简单的任务上人为地增加用量。“过度思考”是我们在模型训练期间特别关注的事情,因为它会降低效果。

§ 15

§ 16

For most tasks, use the model's default effort level. The default is the level where Claude scales its token usage to what most people would want to spend on a task.

Think of effort as a manual override on how hard and how long Claude works. Reach for it deliberately when you have a strong preference for thoroughness or speed based on your domain or the type of work you do, and treat it as a general preference, not a task-by-task decision.

One practical note following the launch of Opus 4.8: in our testing, the default effort setting on Opus 4.8 produces better results for about the same amount of tokens as the default effort setting on Opus 4.7 on the same task.

对于大多数任务,使用模型的默认努力程度。默认级别是 Claude 将其 token 用量调整到大多数人在一个任务上愿意花费的水平。

将努力程度视为一个手动覆写,控制 Claude 工作的努力程度和时长。当你基于自己的领域或工作类型对彻底性或速度有强烈偏好时,有意识地使用它,并将其视为一个通用偏好,而不是逐任务决策。

在 Opus 4.8 发布后有一个实际说明:在我们的测试中,Opus 4.8 上的默认努力设置在相同任务上,以大约相同的 token 量产生了比 Opus 4.7 默认努力设置更好的结果。

§ 17

When Claude gets something wrong, your first instinct shouldn't be to change a setting. It should be to look at the context you gave it. Is your prompt too vague? Is Claude connected to the right tools? Does it have the right skills?

If you're increasing effort on a task that shouldn't need it, the fix is usually upstream: in your context, your CLAUDE.md, or how the task is scoped.

But say you've given clear context and Claude still gets it 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, like subtle bugs, unfamiliar domains, architecture decisions. A larger model is what you want when the smaller model is confidently wrong no matter how much context you give it.

Larger models are also better at handling ambiguity. On smaller models, specific instructions that direct the execution are a better recipe for success.

Pick a smaller model when the work is routine: edits you can describe precisely, mechanical changes, questions about code that's already in context. There's no reason to pay for capability the task doesn't need.

If Claude had all the pertinent context, clearly tried, and still got it wrong; that's a signal to pick a larger model. And 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 did it wrong by not trying hard enough: skipping a file, not running the tests, or not double-checking its work. This is most relevant if you'd selected an effort level below the model's default.

当 Claude 出错时,你的第一反应不应该是更改设置。而应该检查你给它的上下文。你的提示词是否太模糊?Claude 是否连接了正确的工具?它有没有合适的技能?

如果你在一个不需要这么高努力的任务上提高努力程度,修复通常在上游:你的上下文、你的 CLAUDE.md、或者任务的范围界定。

但是,如果你已经给出了清晰的上下文,Claude 仍然出错。要问自己的问题是:它是不够努力,还是知识不够?

模型:问题太难

当问题确实很难时,选择一个更大的模型,比如微妙的 bug、不熟悉的领域、架构决策。当较小的模型无论你给它多少上下文都自信地出错时,你需要的正是更大的模型。

更大的模型也更能处理模糊性。在较小的模型上,指导执行的具体指示是成功的更好方法。

当工作是常规性的时,选择较小的模型:你可以精确描述的编辑、机械性修改、关于已在上下文中的代码的问题。没有理由为任务不需要的能力付费。

如果 Claude 拥有所有相关上下文,明确尝试过,但仍然出错;那是选择更大模型的信号。如果你在使用更大的模型,而工作已经常规了一段时间,降级会提高速度并通常降低成本,同时不影响输出质量。

努力:Claude 不够努力

如果 Claude 因不够努力而出错——跳过文件、没有运行测试、或没有双重检查自己的工作——则选择更高的努力程度。如果你选择的努力程度低于模型默认值,这一点最为相关。

§ 18

§ 19

One way I like to think about the two settings is that Fable is a specialist who can handle 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 experience you only get from having solved a lot of similar problems. But five minutes means a quick read of your code, not a careful pass through every file.

Sonnet at high effort is the generalist with the whole afternoon. They're great at coding, and they'll read everything, run things, double-check their work, and end up understanding your specific code thoroughly.

Fable is the specialist you call when everyone else is stuck. Even at low effort, they'll spot the thing no one else would. That recognition is also what you're paying the most for, so it's worth saving it for the tasks that 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.

我喜欢这样来思考这两个设置:Fable 是一个能处理几乎没有人能解决的问题的专门家,Opus 是专家,而 Sonnet 是一个非常好的通才。努力程度决定了他们中任何一个在你的任务上花费多少时间。

低努力程度的 Opus 就像与一位对类似问题有深厚经验的专家相处五分钟。他们带有的知识不在你的代码库中任何地方:他们以前见过的模式、他们知道要检查的陷阱,只有解决过很多类似问题才能获得的经验。但五分钟意味着快速阅读你的代码,而不是仔细检查每个文件。

高努力程度的 Sonnet 是拥有整个下午时间的通才。他们擅长编码,会阅读所有内容,运行事务,双重检查他们的工作,最终彻底理解你的特定代码。

Fable 是当你其他人都卡住时请来的专门家。即使在低努力程度下,他们也能发现别人发现不了的东西。这种识别能力也是你付出最多代价的原因,所以值得把它留给需要它的任务。

这些都不是普遍“更好”的。模型设置大致是能力水平;努力设置大致是彻底程度。大多数实际任务需要两者兼备。

§ 20

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 the larger and smaller models generally 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 flips. 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. And more importantly: the larger model can finish tasks the smaller one can't, 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 really needs it.

The key point in the graphs above: effort picks how far Claude is willing to travel along the curve. That doesn't mean Claude will need to go that far to finish the task.

Lastly, effort shapes token consumption, but it doesn't limit it. The only hard cap in the system is max_tokens, which truncates a response mid-stream when hit, but it's a blunt instrument and mostly relevant to API developers. Softer controls like task budgets or asking Claude to keep it brief in your prompt are more helpful. They're guidance the model is trained to follow (it'll look to wrap up as it gets near the limit) rather than a wall it runs into.

那么,模型选择、努力程度和 token 消耗之间如何相互作用?这取决于任务。

在相同努力程度的常规工作中,较大的模型和较小的模型通常都能正确完成。较大的模型会因额外的验证步骤消耗更多 token,且每个 token 价格更高。这就是为什么在常规任务中降级到较小的模型可以在不牺牲质量的情况下节省真金白银。

在更困难的多步骤工作中,情况反过来。较小的模型必须费力地接近其能力极限,消耗大量迭代,而较大的模型可以用更少的步骤达到相同的质量水平。

你为较大的模型每个 token 支付更多,但在真正让较小模型吃力的任务上,每个任务的总成本可能反而更低。更重要的是:较大的模型可以完成较小的模型即使以最高努力设置也无法完成的任务。

这在 Fable 上最为明显。在长而多步骤的工作中,它遥遥领先。在我们的测试中,它完成了 Opus 和 Sonnet 在任何努力程度下都无法达到的工作。它每个 token 的成本也最高,这是另一个原因把它留给真正需要它的工作。

上面图表的关键点:努力程度选择了 Claude 愿意沿着曲线走多远。但这并不意味着 Claude 需要走那么远才能完成任务。

最后,努力程度影响 token 消耗,但并不限制它。系统中唯一的硬上限是 max_tokens,当达到时会截断响应,但它是一个粗糙的工具,主要与 API 开发者相关。更柔和的控指如任务预算或在提示词中要求 Claude 保持简洁更有帮助。它们是模型训练后遵循的指导(当接近限制时它会尝试收尾),而不是它碰上的墙。

§ 21

§ 22

§ 23

Effort changes how much work Claude does. The model changes what Claude knows.

When you're unhappy with a result, check the context before you touch either setting: give Claude a clear prompt, the right tools and skills, and a way to verify its own work.

If Claude still gets it wrong, ask yourself: did it not know enough, or did it not try hard enough? Not knowing enough is a model problem, not trying hard enough is an effort problem.

努力程度改变 Claude 做多少工作。模型改变 Claude 知道什么。

当对结果不满意时,在调整任一设置之前检查上下文:给 Claude 清晰的提示词、正确的工具和技能,以及验证自身工作的方法。

如果 Claude 仍然出错,问自己:它是知识不够,还是不够努力?知识不够是模型问题,不够努力是努力问题。

Open source ↗