---
title: 為 Claude Fable 5.1 撰寫提示
url: https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1
description: Claude Fable 5.1 與 Claude Mythos 5.1 的行為差異與提示模式，涵蓋 effort、進度更新、工具呼叫批次處理、對話歷史、寫作風格、格式、任務完成、壓縮摘要、範圍與測試涵蓋率、搜尋觸發、安全防護誤判、檔案編輯、長篇輸出、子代理與視覺。
---

關於模型的功能、API 變更、定價與可用性，請參閱 [Claude Fable 5.1 的新功能](https://platform.claude.com/docs/zh-TW/models/fable-5-1/whats-new-fable-5-1)。關於適用於各 Claude 模型的技巧，請參閱[提示最佳實踐](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/claude-prompting-best-practices)。

您現有的 Claude Fable 5 提示應該無需修改即可在 Claude Fable 5.1 上表現良好，但有幾項行為差異值得了解。請從符合您所觀察到情況的章節開始：

* 不確定要使用哪個「effort」（努力程度）等級，或延遲與成本高於任務所需：[考慮所有 effort 等級](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#consider-all-effort-levels)
* 「tool call」（工具呼叫）之間幾乎沒有或完全沒有文字：[要求面向使用者的進度更新](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#ask-for-user-facing-progress-updates)
* 在「agent loop」（代理迴圈）中每個回合只有一個工具呼叫：[在代理迴圈中批次處理獨立的工具呼叫](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#batch-independent-tool-calls-in-agent-loops)
* 請求因 `bound to a different conversation` 而失敗，或您的「harness」（執行框架）在請求之間編輯較早的回合：[保持對話歷史僅附加](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#keep-the-conversation-history-append-only)
* 文字冗長且密集：[寫作密度](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#writing-density)
* 聊天回覆的結構少於內容所需：[聊天中的格式](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#formatting-in-chat)
* 摘要重現來源措辭，卻未將其標示為引文：[引用檢索到的來源](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#quoting-retrieved-sources)
* 回合在工作完成前就結束，或模型針對您已要求的工作請求許可：[完成整個任務](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#finish-the-whole-task)
* 用戶端「compaction」（壓縮）摘要遺漏了限制條件、決策或確切細節：[告訴模型在壓縮摘要中要保留什麼](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#tell-the-model-what-to-preserve-in-compaction-summaries)
* 出現未經要求的修正或擴充，或提交的測試檔案多於任務所需：[將變更與測試限制在任務要求的範圍內](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#keep-changes-and-tests-to-what-the-task-asks-for)
* 在低 effort 下憑記憶回答而非進行搜尋：[低 effort 下的搜尋觸發](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#search-triggering-at-low-effort)
* 無害的程式設計請求傳回 `stop_reason: "refusal"`：[減少安全防護誤判](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#reduce-safeguard-false-positives)
* 為了小幅變更而改寫整個檔案：[優先使用針對性編輯，而非改寫整個檔案](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#prefer-targeted-edits-over-whole-file-rewrites)
* 在 `xhigh` 或 `max` effort 下，長篇交付成果耗時很久或達到 `max_tokens` 上限：[在 xhigh 和 max effort 下為長篇輸出預留空間](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#leave-room-for-long-outputs-at-xhigh-and-max-effort)
* 「lead agent」（主代理）在「subagent」（子代理）執行時閒置：[讓主代理在子代理執行時繼續工作](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#let-the-lead-agent-keep-working-while-subagents-run)
* 關於圖表和密集圖片的回答遺漏細節：[為視覺工作提供裁切與縮放工具](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#give-vision-work-tools-to-crop-and-zoom)

<Note>
  Claude Fable 5.1 會執行安全分類器，並可能回傳 `stop_reason: "refusal"`。請參閱[拒絕、備援與計費](https://platform.claude.com/docs/zh-TW/models/fable-5-1/whats-new-fable-5-1#refusals-fallback-and-billing)以及[減少安全防護誤判](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#reduce-safeguard-false-positives)。

  要求模型寫出其思考或推理過程的提示、技能與工具描述，可能會以 `reasoning_extraction` 類別被拒絕。請改為要求簡短說明或所採取動作的摘要，或從[摘要思考](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking#summarized-thinking)區塊（`display: "summarized"`）讀取推理內容。請參閱[將推理保留在思考區塊中](https://platform.claude.com/docs/zh-TW/build-with-claude/refusals-and-fallback#keep-reasoning-in-thinking-blocks)。
</Note>

## 考慮所有 effort 等級

從預設的 [effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort) 等級 `high` 開始，然後針對您自己的「evals」（評估）測試其他等級（`low`、`medium`、`xhigh` 和 `max`）。Effort 是在 Claude Fable 5.1 上權衡智慧、延遲與成本的主要控制項。即使您已在 Claude Fable 5 上執行過一輪測試，也請重新執行：effort 等級名稱在不同模型之間並不對應相同的思考量。

Claude Fable 5.1 相較於 Claude Fable 5 的能力提升在各 effort 等級都看得到，且在較高設定下最為明顯。在 `medium` 時，結果大致與 Claude Fable 5 相當，但成本更低，因此在您的評估顯示品質維持不變的情況下，可降至 `medium` 或 `low`。在 `low` 時，Claude Fable 5.1 的每項任務成本通常可與 Claude Opus 和 Claude Sonnet 模型相抗衡，且得分更高，因此在您原本會以較高 effort 等級執行較小模型的情況下，請將其納入比較。

有兩項與 effort 相關的特定行為各有專屬章節：在 `low` 時，Claude Fable 5.1 較少呼叫搜尋與檢索工具（請參閱[低 effort 下的搜尋觸發](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#search-triggering-at-low-effort)），而在 `xhigh` 和 `max` 時，它可能會在撰寫長篇交付成果前思考更久（請參閱[在 xhigh 和 max effort 下為長篇輸出預留空間](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#leave-room-for-long-outputs-at-xhigh-and-max-effort)）。

## 要求面向使用者的進度更新

在冗長的工具呼叫回合中，Claude Fable 5.1 的預設行為是撰寫比 Claude Fable 5 更少的面向使用者的「progress update」（進度更新）。在較高 effort 和較長的工具鏈中，這種情況會更加明顯。使用者會看到代理一次沉默好幾分鐘，或是最終訊息只涵蓋最後一個步驟，而非整個任務。

首先，確認您的用戶端是否有收到進度更新。模型在工具呼叫之間的簡短說明（它剛發現了什麼、接下來要做什麼）會以[進度更新 `thinking` 區塊](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking#progress-updates)的形式傳回，而在預設的 `thinking.display` 值 `"omitted"` 下，這些區塊是空的。請設定 `display: "updates"`（beta，需 `thinking-display-updates-2026-08-18` 標頭），並將每個非空的 `thinking` 區塊呈現為狀態列，或設定 `"summarized"` 以連同摘要推理一起接收。如果您沒有請求這些更新，模型的更新可能根本沒有傳達給您的使用者。

其次，檢查您的提示中是否有抑制敘述的指示。一些較早的模型在工作時熱衷於提供更新，因而催生了諸如「將所有發現保留到最終回應」之類的系統提示內容。在新增任何內容之前，請先移除這類內容。

如果您仍希望獲得更多更新，例如在結對程式設計或其他「human-in-the-loop」（人機協作）工作中，請新增一行簡短的系統提示，說明您希望模型何時提供面向使用者的文字，以及每則更新應包含哪些內容：

```text wrap
Before you start, say in a line what you're about to do; brief updates while you work help the user follow along. Close with a short recap that stands on its own — what you found, what you did, and what's next — so a reader who only sees the last message has the full picture.
```

如果您的產品會摺疊或隱藏工具輸出，請告知模型。否則，它可能會執行指令來向使用者「展示」您的 UI 從未顯示的輸出。請透過[回合範圍系統訊息](https://platform.claude.com/docs/zh-TW/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages)（`clear_at: "next_user_message"`，beta）傳遞此說明：

```text wrap
Only you see that command's output — the user's terminal shows at most a few lines of it. If the user needs to read any of it, put it in your reply.
```

## 在代理迴圈中批次處理獨立的工具呼叫

Claude Fable 5.1 通常會如預期發出平行工具呼叫：當請求指明要擷取多項內容時，它會平行發出這些呼叫。例外情況是程式設計與電腦使用迴圈，其中接下來的獨立呼叫是由任務隱含的，而非明確要求的（自訂程式設計代理、bash 與編輯器執行框架、電腦使用）：在這些情況下，它可能改為每個回合只發出一個呼叫。這不會影響回答品質，但每個額外回合都會耗費 token、一次往返以及實際經過的時間。在目前請求的結尾加上一句提示即可解決：

```text wrap
First privately list what you need next; then request every item that doesn't depend on another's result in this one response.
```

每次傳回工具結果時，請將其作為[回合範圍系統訊息](https://platform.claude.com/docs/zh-TW/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages)附加在該使用者訊息之後：即 `messages` 中一個帶有 `clear_at: "next_user_message"` 的 `role: "system"` 項目。一旦出現較新的使用者訊息，API 就會清除較早的副本，因此模型只會讀取最新的一份。回合範圍系統訊息目前為 beta 版，需要 [beta 標頭](https://platform.claude.com/docs/zh-TW/api/beta-headers) `mid-conversation-system-clear-at-2026-08-21`。若未使用 beta，請改將該句子放在同一則使用者訊息中 `tool_result` 區塊之後的文字區塊內。

每個回合附加一份新的副本，並將較早的副本逐位元組原封不動地保留在原處。它們會留在陣列中，但一旦被清除，模型就看不到它們，也不會耗費輸入 token。刪除或改寫它們等同於編輯較早的回合：這會使[提示快取](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-caching)從該處重新開始，並使其後的思考區塊失效（請參閱[保持對話歷史僅附加](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#keep-the-conversation-history-append-only)）。

以下迴圈展示了這種放置方式。每個助理回合都完全依照傳回的內容送回，每個使用者回合只攜帶工具結果，其後接著一份新的回合範圍提示副本。

<CodeGroup exclude="shell">
  ```python Python
  import anthropic
  from anthropic.types.beta import (
      BetaMessageParam,
      BetaToolParam,
      BetaToolResultBlockParam,
  )

  client = anthropic.Anthropic()

  BATCH_NUDGE = (
      "First privately list what you need next; then request every item "
      "that doesn't depend on another's result in this one response."
  )
  # 以記憶體內檔案代替工作目錄，讓範例可在任何地方執行。
  FILES = {
      "pyproject.toml": """\
  [project]
  name = "demo"
  version = "0.1.0"
  description = "Demo project for the batching example"
  """,
      "README.md": """\
  # demo

  A small demo project. Run `demo --help` for usage.
  """,
  }
  tools: list[BetaToolParam] = [
      {
          "name": "read_file",
          "description": "Read a UTF-8 text file from the working directory.",
          "input_schema": {
              "type": "object",
              "properties": {"path": {"type": "string"}},
              "required": ["path"],
          },
      }
  ]
  messages: list[BetaMessageParam] = [
      {"role": "user", "content": "Summarize pyproject.toml and README.md."}
  ]

  while True:
      response = client.beta.messages.create(
          model="claude-fable-5-1",
          max_tokens=16000,
          betas=["mid-conversation-system-clear-at-2026-08-21"],
          tools=tools,
          messages=messages,
      )
      # 將助理回合原封不動地附加，包含思考區塊。
      messages.append({"role": "assistant", "content": response.content})
      if response.stop_reason != "tool_use":
          break
      tool_results: list[BetaToolResultBlockParam] = []
      for block in response.content:
          if block.type == "tool_use":
              raw_path = block.input.get("path")
              path = raw_path if isinstance(raw_path, str) else ""
              if path in FILES:
                  tool_results.append(
                      {
                          "type": "tool_result",
                          "tool_use_id": block.id,
                          "content": FILES[path],
                      }
                  )
              else:
                  tool_results.append(
                      {
                          "type": "tool_result",
                          "tool_use_id": block.id,
                          "content": f"File not found: {path}",
                          "is_error": True,
                      }
                  )
      # 將工具結果作為使用者回合送出，接著附上一份新的提示副本，作為
      # 回合範圍系統訊息。保留先前的副本：API 會清除它們，
      # 因此模型只會看到最新的一份。
      messages.append({"role": "user", "content": tool_results})
      messages.append(
          {"role": "system", "content": BATCH_NUDGE, "clear_at": "next_user_message"}
      )

  print(next((block.text for block in response.content if block.type == "text"), ""))
  ```

  ```typescript TypeScript
  import Anthropic from "@anthropic-ai/sdk";

  const client = new Anthropic();

  const BATCH_NUDGE =
    "First privately list what you need next; then request every item " +
    "that doesn't depend on another's result in this one response.";
  // 以記憶體內檔案代替工作目錄，讓範例可在任何地方執行。
  const FILES = new Map<string, string>([
    [
      "pyproject.toml",
      `[project]
  name = "demo"
  version = "0.1.0"
  description = "Demo project for the batching example"
  `,
    ],
    [
      "README.md",
      `# demo

  A small demo project. Run \`demo --help\` for usage.
  `,
    ],
  ]);
  const tools: Anthropic.Beta.Messages.BetaTool[] = [
    {
      name: "read_file",
      description: "Read a UTF-8 text file from the working directory.",
      input_schema: {
        type: "object",
        properties: { path: { type: "string" } },
        required: ["path"],
      },
    },
  ];
  const messages: Anthropic.Beta.Messages.BetaMessageParam[] = [
    { role: "user", content: "Summarize pyproject.toml and README.md." },
  ];

  let response: Anthropic.Beta.Messages.BetaMessage;
  while (true) {
    response = await client.beta.messages.create({
      model: "claude-fable-5-1",
      max_tokens: 16000,
      betas: ["mid-conversation-system-clear-at-2026-08-21"],
      tools,
      messages,
    });
    // 將助理回合原封不動地附加，包含思考區塊。
    messages.push({ role: "assistant", content: response.content });
    if (response.stop_reason !== "tool_use") {
      break;
    }
    const toolResults: Anthropic.Beta.Messages.BetaToolResultBlockParam[] = [];
    for (const block of response.content) {
      if (block.type !== "tool_use") {
        continue;
      }
      const { input } = block;
      const path =
        typeof input === "object" &&
        input !== null &&
        "path" in input &&
        typeof input.path === "string"
          ? input.path
          : "";
      const text = FILES.get(path);
      if (text === undefined) {
        toolResults.push({
          type: "tool_result",
          tool_use_id: block.id,
          content: `File not found: ${path}`,
          is_error: true,
        });
        continue;
      }
      toolResults.push({
        type: "tool_result",
        tool_use_id: block.id,
        content: text,
      });
    }
    // 將工具結果作為使用者回合送出，接著附上一份新的提示副本，作為
    // 回合範圍系統訊息。保留先前的副本：API 會清除它們，
    // 因此模型只會看到最新的一份。
    messages.push({ role: "user", content: toolResults });
    messages.push({
      role: "system",
      content: BATCH_NUDGE,
      clear_at: "next_user_message",
    });
  }

  const finalText = response.content.find((block) => block.type === "text");
  console.log(finalText?.text ?? "");
  ```

  ```csharp C#
  using System.Text.Json;
  using Anthropic;
  using Anthropic.Models.Beta.Messages;
  using Model = Anthropic.Models.Messages.Model;

  AnthropicClient client = new();

  const string BatchNudge =
      "First privately list what you need next; then request every item "
      + "that doesn't depend on another's result in this one response.";

  // 以記憶體內檔案代替工作目錄，讓範例可在任何地方執行。
  Dictionary<string, string> files = new()
  {
      ["pyproject.toml"] = """
          [project]
          name = "demo"
          version = "0.1.0"
          description = "Demo project for the batching example"
          """,
      ["README.md"] = """
          # demo

          A small demo project. Run `demo --help` for usage.
          """,
  };

  List<BetaToolUnion> tools =
  [
      new BetaTool
      {
          Name = "read_file",
          Description = "Read a UTF-8 text file from the working directory.",
          InputSchema = new InputSchema
          {
              Properties = new Dictionary<string, JsonElement>
              {
                  ["path"] = JsonSerializer.SerializeToElement(new { type = "string" }),
              },
              Required = ["path"],
          },
      },
  ];

  List<BetaMessageParam> messages =
  [
      new() { Role = Role.User, Content = "Summarize pyproject.toml and README.md." },
  ];

  BetaMessage response;
  while (true)
  {
      response = await client.Beta.Messages.Create(new MessageCreateParams
      {
          Model = Model.ClaudeFable5_1,
          MaxTokens = 16000,
          Betas = ["mid-conversation-system-clear-at-2026-08-21"],
          Tools = tools,
          Messages = messages,
      });
      // 將助理回合原封不動地附加，包含思考區塊。
      messages.Add(new()
      {
          Role = Role.Assistant,
          Content = response.Content.Select(block => new BetaContentBlockParam(block.Json)).ToList(),
      });
      if (response.StopReason != BetaStopReason.ToolUse)
      {
          break;
      }
      List<BetaContentBlockParam> toolResults = [];
      foreach (var block in response.Content)
      {
          if (block.TryPickToolUse(out var toolUse))
          {
              var path = toolUse.Input.TryGetValue("path", out var pathValue)
                  && pathValue.ValueKind == JsonValueKind.String
                  ? pathValue.GetString()!
                  : "";
              if (files.TryGetValue(path, out var fileText))
              {
                  toolResults.Add(new BetaToolResultBlockParam { ToolUseID = toolUse.ID, Content = fileText });
              }
              else
              {
                  toolResults.Add(new BetaToolResultBlockParam
                  {
                      ToolUseID = toolUse.ID,
                      Content = $"File not found: {path}",
                      IsError = true,
                  });
              }
          }
      }
      // 將工具結果作為使用者回合送出，接著附上一份新的提示副本，作為
      // 回合範圍系統訊息。保留先前的副本：API 會清除它們，
      // 因此模型只會看到最新的一份。
      messages.Add(new() { Role = Role.User, Content = toolResults });
      messages.Add(new()
      {
          Role = Role.System,
          Content = BatchNudge,
          ClearAt = ClearAt.NextUserMessage,
      });
  }

  foreach (var block in response.Content)
  {
      if (block.TryPickText(out var text))
      {
          Console.WriteLine(text.Text);
          break;
      }
  }
  ```

  ```go Go
  package main

  import (
  	"context"
  	"encoding/json"
  	"fmt"
  	"log"

  	"github.com/anthropics/anthropic-sdk-go"
  )

  const batchNudge = "First privately list what you need next; then request every item " +
  	"that doesn't depend on another's result in this one response."

  // 以記憶體內檔案代替工作目錄，讓範例可在任何地方執行。
  var files = map[string]string{
  	"pyproject.toml": `[project]
  name = "demo"
  version = "0.1.0"
  description = "Demo project for the batching example"
  `,
  	"README.md": `# demo

  A small demo project. Run "demo --help" for usage.
  `,
  }

  func main() {
  	client := anthropic.NewClient()
  	ctx := context.Background()

  	tools := []anthropic.BetaToolUnionParam{
  		{OfTool: &anthropic.BetaToolParam{
  			Name:        "read_file",
  			Description: anthropic.String("Read a UTF-8 text file from the working directory."),
  			InputSchema: anthropic.BetaToolInputSchemaParam{
  				Properties: map[string]any{
  					"path": map[string]any{"type": "string"},
  				},
  				Required: []string{"path"},
  			},
  		}},
  	}
  	messages := []anthropic.BetaMessageParam{
  		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Summarize pyproject.toml and README.md.")),
  	}

  	var response *anthropic.BetaMessage
  	for {
  		var err error
  		response, err = client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{
  			Model:     anthropic.ModelClaudeFable5_1,
  			MaxTokens: 16000,
  			Betas:     []anthropic.AnthropicBeta{"mid-conversation-system-clear-at-2026-08-21"},
  			Tools:     tools,
  			Messages:  messages,
  		})
  		if err != nil {
  			log.Fatal(err)
  		}
  		// 將助理回合原封不動地附加，包含思考區塊。
  		messages = append(messages, response.ToParam())
  		if response.StopReason != anthropic.BetaStopReasonToolUse {
  			break
  		}
  		var toolResults []anthropic.BetaContentBlockParamUnion
  		for _, block := range response.Content {
  			toolUse, ok := block.AsAny().(anthropic.BetaToolUseBlock)
  			if !ok {
  				continue
  			}
  			var input struct {
  				Path string `json:"path"`
  			}
  			// 若 path 缺少或非字串，input.Path 會保持空白，進而走向錯誤結果分支。
  			if err := json.Unmarshal([]byte(toolUse.JSON.Input.Raw()), &input); err != nil {
  				input.Path = ""
  			}
  			text, found := files[input.Path]
  			if !found {
  				text = "File not found: " + input.Path
  			}
  			toolResults = append(toolResults, anthropic.NewBetaToolResultBlock(toolUse.ID, text, !found))
  		}
  		// 將工具結果作為使用者回合送出，接著附上一份新的提示副本，作為
  		// 回合範圍系統訊息。保留先前的副本：API 會清除它們，
  		// 因此模型只會看到最新的一份。
  		messages = append(messages, anthropic.NewBetaUserMessage(toolResults...))
  		messages = append(messages, anthropic.BetaMessageParam{
  			Role:    anthropic.BetaMessageParamRoleSystem,
  			Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock(batchNudge)},
  			ClearAt: anthropic.BetaMessageParamClearAtNextUserMessage,
  		})
  	}

  	for _, block := range response.Content {
  		if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {
  			fmt.Println(textBlock.Text)
  			break
  		}
  	}
  }
  ```

  ```java Java
  import com.anthropic.client.AnthropicClient;
  import com.anthropic.client.okhttp.AnthropicOkHttpClient;
  import com.anthropic.core.JsonValue;
  import com.anthropic.models.beta.messages.BetaContentBlockParam;
  import com.anthropic.models.beta.messages.BetaMessage;
  import com.anthropic.models.beta.messages.BetaMessageParam;
  import com.anthropic.models.beta.messages.BetaStopReason;
  import com.anthropic.models.beta.messages.BetaTool;
  import com.anthropic.models.beta.messages.BetaTool.InputSchema;
  import com.anthropic.models.beta.messages.BetaToolResultBlockParam;
  import com.anthropic.models.beta.messages.BetaToolUseBlock;
  import com.anthropic.models.beta.messages.MessageCreateParams;
  import com.anthropic.models.messages.Model;

  static final String BATCH_NUDGE =
      "First privately list what you need next; then request every item "
          + "that doesn't depend on another's result in this one response.";

  // 以記憶體內檔案代替工作目錄，讓範例可在任何地方執行。
  static final Map<String, String> FILES = Map.of(
      "pyproject.toml", """
          [project]
          name = "demo"
          version = "0.1.0"
          description = "Demo project for the batching example"
          """,
      "README.md", """
          # demo

          A small demo project. Run `demo --help` for usage.
          """);

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      BetaTool readFileTool = BetaTool.builder()
          .name("read_file")
          .description("Read a UTF-8 text file from the working directory.")
          .inputSchema(InputSchema.builder()
              .properties(JsonValue.from(Map.of("path", Map.of("type", "string"))))
              .required(List.of("path"))
              .build())
          .build();
      List<BetaMessageParam> messages = new ArrayList<>();
      messages.add(BetaMessageParam.builder()
          .role(BetaMessageParam.Role.USER)
          .content("Summarize pyproject.toml and README.md.")
          .build());

      BetaMessage response;
      while (true) {
          response = client.beta().messages().create(MessageCreateParams.builder()
              .model(Model.CLAUDE_FABLE_5_1)
              .maxTokens(16000)
              .addBeta("mid-conversation-system-clear-at-2026-08-21")
              .addTool(readFileTool)
              .messages(messages)
              .build());
          // 將助理回合原封不動地附加，包含思考區塊。
          messages.add(response.toParam());
          boolean requestedTools = response.stopReason()
              .map(BetaStopReason.TOOL_USE::equals)
              .orElse(false);
          if (!requestedTools) {
              break;
          }
          List<BetaToolUseBlock> toolUses = response.content().stream()
              .flatMap(block -> block.toolUse().stream())
              .toList();
          List<BetaContentBlockParam> toolResults = new ArrayList<>();
          for (BetaToolUseBlock toolUse : toolUses) {
              Map<String, JsonValue> input =
                  (Map<String, JsonValue>) toolUse._input().asObject().orElseThrow();
              JsonValue pathValue = input.get("path");
              String path = pathValue != null && pathValue.asString().isPresent()
                  ? pathValue.asStringOrThrow()
                  : "";
              String fileText = FILES.get(path);
              BetaToolResultBlockParam.Builder result = BetaToolResultBlockParam.builder()
                  .toolUseId(toolUse.id());
              if (fileText != null) {
                  result.content(fileText);
              } else {
                  result.content("File not found: " + path).isError(true);
              }
              toolResults.add(BetaContentBlockParam.ofToolResult(result.build()));
          }
          // 將工具結果作為使用者回合送出，接著附上一份新的提示副本，作為
          // 回合範圍系統訊息。保留先前的副本：API 會清除它們，
          // 因此模型只會看到最新的一份。
          messages.add(BetaMessageParam.builder()
              .role(BetaMessageParam.Role.USER)
              .contentOfBetaContentBlockParams(toolResults)
              .build());
          messages.add(BetaMessageParam.builder()
              .role(BetaMessageParam.Role.SYSTEM)
              .content(BATCH_NUDGE)
              .clearAt(BetaMessageParam.ClearAt.NEXT_USER_MESSAGE)
              .build());
      }

      String finalText = response.content().stream()
          .flatMap(block -> block.text().stream())
          .map(textBlock -> textBlock.text())
          .findFirst()
          .orElse("");
      IO.println(finalText);
  }
  ```

  ```php PHP
  <?php

  use Anthropic\Beta\Messages\BetaStopReason;
  use Anthropic\Client;

  $client = new Client();

  const BATCH_NUDGE = 'First privately list what you need next; then request every item '
      . "that doesn't depend on another's result in this one response.";
  // 以記憶體內檔案代替工作目錄，讓範例可在任何地方執行。
  const FILES = [
      'pyproject.toml' => <<<'TOML'
          [project]
          name = "demo"
          version = "0.1.0"
          description = "Demo project for the batching example"
          TOML,
      'README.md' => <<<'MD'
          # demo

          A small demo project. Run `demo --help` for usage.
          MD,
  ];
  $tools = [
      [
          'name' => 'read_file',
          'description' => 'Read a UTF-8 text file from the working directory.',
          'input_schema' => [
              'type' => 'object',
              'properties' => ['path' => ['type' => 'string']],
              'required' => ['path'],
          ],
      ],
  ];
  $messages = [
      ['role' => 'user', 'content' => 'Summarize pyproject.toml and README.md.'],
  ];

  while (true) {
      $response = $client->beta->messages->create(
          model: 'claude-fable-5-1',
          maxTokens: 16000,
          betas: ['mid-conversation-system-clear-at-2026-08-21'],
          tools: $tools,
          messages: $messages,
      );
      // 將助理回合原封不動地附加，包含思考區塊。
      $messages[] = ['role' => 'assistant', 'content' => $response->content];
      if ($response->stopReason !== BetaStopReason::TOOL_USE->value) {
          break;
      }
      $toolResults = [];
      foreach ($response->content as $block) {
          if ($block->type === 'tool_use') {
              $path = is_string($block->input['path'] ?? null) ? $block->input['path'] : '';
              if (array_key_exists($path, FILES)) {
                  $toolResults[] = [
                      'type' => 'tool_result',
                      'tool_use_id' => $block->id,
                      'content' => FILES[$path],
                  ];
              } else {
                  $toolResults[] = [
                      'type' => 'tool_result',
                      'tool_use_id' => $block->id,
                      'content' => "File not found: {$path}",
                      'is_error' => true,
                  ];
              }
          }
      }
      // 將工具結果作為使用者回合送出，接著附上一份新的提示副本，作為
      // 回合範圍系統訊息。保留先前的副本：API 會清除它們，
      // 因此模型只會看到最新的一份。
      $messages[] = ['role' => 'user', 'content' => $toolResults];
      $messages[] = [
          'role' => 'system',
          'content' => BATCH_NUDGE,
          'clear_at' => 'next_user_message',
      ];
  }

  $textBlock = array_find($response->content, fn ($block) => $block->type === 'text');
  echo $textBlock?->text ?? '', PHP_EOL;
  ```

  ```ruby Ruby
  require "anthropic"

  client = Anthropic::Client.new

  BATCH_NUDGE =
    "First privately list what you need next; then request every item " \
    "that doesn't depend on another's result in this one response."
  # 以記憶體內檔案代替工作目錄，讓範例可在任何地方執行。
  FILES = {
    "pyproject.toml" => <<~TOML,
      [project]
      name = "demo"
      version = "0.1.0"
      description = "Demo project for the batching example"
    TOML
    "README.md" => <<~MD
      # demo

      A small demo project. Run `demo --help` for usage.
    MD
  }
  tools = [
    {
      name: "read_file",
      description: "Read a UTF-8 text file from the working directory.",
      input_schema: {
        type: "object",
        properties: {path: {type: "string"}},
        required: ["path"]
      }
    }
  ]
  messages = [{role: "user", content: "Summarize pyproject.toml and README.md."}]

  response = nil
  loop do
    response = client.beta.messages.create(
      model: "claude-fable-5-1",
      max_tokens: 16000,
      betas: ["mid-conversation-system-clear-at-2026-08-21"],
      tools: tools,
      messages: messages
    )
    # 將助理回合原封不動地附加，包含思考區塊。
    messages << {role: "assistant", content: response.content}
    break unless response.stop_reason == :tool_use

    tool_results = response.content.filter_map do |block|
      next unless block.type == :tool_use

      path = block.input[:path]
      if FILES.key?(path)
        {type: "tool_result", tool_use_id: block.id, content: FILES[path]}
      else
        {
          type: "tool_result",
          tool_use_id: block.id,
          content: "File not found: #{path}",
          is_error: true
        }
      end
    end
    # 將工具結果作為使用者回合送出，接著附上一份新的提示副本，作為
    # 回合範圍系統訊息。保留先前的副本：API 會清除它們，
    # 因此模型只會看到最新的一份。
    messages << {role: "user", content: tool_results}
    messages << {role: "system", content: BATCH_NUDGE, clear_at: "next_user_message"}
  end

  puts response.content.find { it.type == :text }&.text
  ```
</CodeGroup>

## 保持對話歷史僅附加

請將每個助理回合完全按照 API 回傳的內容附加到歷史中，包括思考區塊，並且不要在請求之間編輯先前的回合。對於 2026 年 8 月 31 日當天或之後建立的新帳戶，Claude Fable 5.1 的思考區塊[僅在產生它們的那個確切對話中有效](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking#preserved-in-conversation)：如果請求在思考區塊的前綴（系統提示、工具清單或任何先前的訊息）已變更後重新傳送該思考區塊，將會回傳 400；若您設定了 `thinking.block_binding.prefix_mismatch_behavior: "drop_block"`（beta，`thinking-binding-controls-2026-08-01` 標頭），則會捨棄受影響的區塊。即使您的帳戶未強制執行此檢查，也請採用此模式，讓相同的程式碼能在每個帳戶上運作。

會觸發此檢查的歷史編輯，與會使[提示快取](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-caching)重新開始的編輯相同：注入和移除每回合提醒、就地摘要較早的回合，或在工作階段中途變更系統提示。請以[回合範圍系統訊息](https://platform.claude.com/docs/zh-TW/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages)傳送每回合提醒，使用[對話中系統訊息](https://platform.claude.com/docs/zh-TW/build-with-claude/mid-conversation-system-messages)變更指示或工具，而非改寫 `system` 或 `tools`，並讓伺服器端的[壓縮](https://platform.claude.com/docs/zh-TW/build-with-claude/compaction)或[上下文編輯](https://platform.claude.com/docs/zh-TW/build-with-claude/context-editing)負責任何修剪。如果您在用戶端進行壓縮，最簡單的做法是以一則摘要訊息加上新的使用者回合取代整個歷史，且不重播其他任何內容：沒有思考區塊會被沿用，因此不會有任何失敗，模型也會針對壓縮後的對話重新思考（請參閱[用戶端的自訂壓縮](https://platform.claude.com/docs/zh-TW/build-with-claude/preserved-thinking#custom-compaction-on-the-client)）。由於快取讀取現在更便宜（請參閱[定價](https://platform.claude.com/docs/zh-TW/models/fable-5-1/whats-new-fable-5-1#pricing)），在 Claude Fable 5.1 上為了節省成本而提早壓縮，可能不再是正確的成本與智慧權衡，因此請嘗試較晚的壓縮時間點。

若要找出您的執行框架已在進行的編輯，請依照[如何判斷您的整合是否受到影響](https://platform.claude.com/docs/zh-TW/build-with-claude/preserved-thinking#how-to-tell-whether-your-integration-is-impacted)中的說明，以 `prefix_mismatch_behavior: "drop_block"` 執行一個工作階段並記錄 `input_transformations`，或擷取它在幾個正常回合中傳送的確切請求，並確認連續的請求在附加的回合之前逐位元組完全相同。

## 寫作密度

Claude Fable 5.1 的寫作很少使用陳腔濫調，也很少出現未加解釋的術語。不過在某些情況下，它的文字比 Claude Fable 5 更密集：句子更長，段落分隔更少。定義此反模式（矯揉造作的文字）的指示會有所幫助。請將其加入使用者訊息（建議）或系統提示中：

```text wrap
Mannered prose substitutes metaphor and flourish for direct statement. Instead of "a parameter worth varying," the mannered writer produces "a dial worth turning." Instead of "this point still matters," they write "this point earns its keep." The phrases exist to display the writer, not to convey the idea, and readers can tell. That is why mannered prose irritates: it makes the reader work harder so the writer can perform. It is also imprecise. Metaphors drag in connotations the writer did not choose and cannot control. The fix is to say what you mean. When a literal phrase is available, use it.
```

簡短版本通常也有效：

```text wrap
Please remove all mannered prose.
```

## 聊天中的格式

較早的模型在聊天中過度使用項目符號和粗體，許多提示因此帶有為了抑制這種情況而撰寫的反格式規則。Claude Fable 5.1 則傾向另一個方向：它較少使用粗體，也較不會使用標題、清單或引號。如果您的提示包含反格式的措辭，請將其移除，或替換為說明何時適合使用特定格式的規則，例如以下內容：

```text wrap
Use lists and bullet points when asked to, or when the content is multifaceted enough that they help with clarity. If the person explicitly requests minimal formatting, always format your responses without bullet points, headers, lists, or bold emphasis, as requested. In conversational, personal, or emotional exchanges, keep to plain prose.
```

## 引用檢索到的來源

在摘要文件時，Claude Fable 5.1 比 Claude Fable 5 更可能重現來源文字的段落，卻未將其標示為引文。為了解決這個問題，請在系統提示中加入一個正確回應的完整範例：使用者的請求、回應，以及一句說明該回應為何正確的句子。

```text wrap
<example>
<user>look up how the Riverton Ledger and the Coast Dispatch each covered the Harbor Bridge closure and compare their reporting</user>
<response>
[web_search: Harbor Bridge closure Riverton Ledger]
[web_search: Harbor Bridge closure Coast Dispatch]
Both outlets agree on the basics: the bridge closed on March 3 after inspectors found cracked welds, and the state expects repairs to take about eight months. Where they differ is emphasis. The Ledger treats it as a local-economy story. The Dispatch frames it as a funding failure; its editorial calls the closure "entirely foreseeable." Read together, the Ledger explains who is affected now and the Dispatch explains how it came to this — neither account alone gives the whole picture.
</response>
<rationale>CORRECT: The response is organized around where the two outlets agree and differ, not as a walk through either article. Each outlet's reporting is conveyed in one or two sentences of the assistant's own indirect speech. One short marked phrase from one source; every other claim is reworded. The response is still specific and complete.</rationale>
</example>
```

請將兩行 `[web_search: ...]` 替換為您自己工具的名稱，讓模型將其解讀為範本化的工具輸出，而非要照字面輸出的文字。

## 完成整個任務

Claude Fable 5.1 無需太多方法論上的指引即可執行非常長的任務，尤其是在目標明確時。不過，在複雜的非同步工作負載中，請提示它不要在工作完成前結束回合。若沒有這項提示，模型有時會描述接下來要做什麼，而不是實際去做（「接下來，我會……」），或停下來請求許可執行原始請求已涵蓋的步驟（「要我套用這個嗎？」）。使用者必須回覆「繼續」或「請進行」，這適合結對程式設計和其他人機協作工作，但無法充分發揮模型的長時程能力。

兩項系統提示新增內容搭配使用可緩解此問題。請同時套用兩者。如果您需要限制提示長度，只使用第一項即可，它保留了大部分效果。第一項告訴模型不要詢問已被要求的工作，並執行它已陳述的後續步驟：

```text wrap
You are operating autonomously. The user is not watching in real time and cannot answer questions mid-task, so asking 'Want me to…?' or 'Shall I…?' will block the work. For reversible actions that follow from the original request, proceed without asking. Stop only for destructive actions or genuine scope changes the user must decide. Offering follow-ups after the task is done is fine; asking permission before doing the work is not.

Exception: when the user is describing a problem, asking a question, or thinking out loud rather than requesting a change, the deliverable is your assessment. Report your findings and stop. Don't apply a fix until they ask for one.

Before ending your turn, check your last paragraph. If it is a plan, an analysis, a question, a list of next steps, or a promise about work you have not done ('I'll…', 'let me know when…'), do that work now with tool calls. That includes retrying after errors and gathering missing information yourself. Do not stop because the context or session is long. End your turn only when the task is complete or you are blocked on input only the user can provide.

Before running a command that changes system state (such as restarts, deletes, or config edits), check that the evidence actually supports that specific action. A signal that pattern-matches to a known failure may have a different cause.
```

開頭那句告訴模型使用者並未在旁觀看的句子，承擔了大部分效果。請保持原樣。如果您的產品需要模型為特定確認事項停下來，請在其後加上一句列出這些事項。此區塊也可能使模型較不會針對模稜兩可的請求提出詢問，因此請在您自己的任務上檢查這項權衡。

第二項將使用者的請求定義為交付成果的範圍：

```text wrap
# Delivering work
The user's request — or the plan they approved — sets the scope, and the scope is the deliverable: don't quietly narrow, widen, or swap it. Read ambiguity the way a careful colleague would: make routine judgment calls yourself, and check in only when different readings would lead to materially different work. If you see a real problem with the task as specified, say so in a sentence or two and keep building under stated assumptions; if the user hears the concern and reaffirms, that is their decision, so deliver the full request.

If a question comes up partway, first do everything that doesn't depend on the answer; then state the assumption you made, or — when going ahead on a wrong guess would be unsafe or would make the work useless — put the question at the end of a turn that also delivers that progress. If one part turns out to be blocked, complete every other part in full and say exactly what you left out and why — the whole task is the deliverable, and scaling it down is the user's call, not yours. A step you have decided on is something to run, not to announce: describing the next step and ending the turn leaves it undone until the user replies.

Keep changes to what the request needs. Something else you notice worth doing — cleanup or documentation the task didn't call for, a change to a file the task didn't require — is a suggestion to make at the end, not a change to make; actions clearly beyond what the ask implies, and risky or destructive ones, still need the user's go-ahead.
```

## 告訴模型在壓縮摘要中要保留什麼

當長對話被壓縮時，明確告訴 Claude Fable 5.1 其摘要必須保留哪些內容，會有良好的效果。伺服器端的[壓縮](https://platform.claude.com/docs/zh-TW/build-with-claude/compaction)已經這麼做了。如果您在用戶端進行壓縮，請使用以下摘要指示：

```text wrap
Summarize the transcript inside <summary></summary> tags. Include relevant information in the summary such that this conversation will be continued by a new context window without needing to redo work or be reprovided with relevant constraints or context. Be sure to preserve: (1) any difficulties or problems that came up, and how they were handled or resolved; (2) any possibilities, options, or approaches that were raised, tried, or set aside, and why; (3) anything that was asked for, decided, agreed, ruled out, or established as a preference, constraint, or boundary — stated exactly; (4) exactly where things stand now — what has been covered, settled, or completed so far; (5) anything still open, unresolved, promised, or expected to happen next; (6) specific details that would be hard to reconstruct — names, numbers, dates, exact wording, links or references — kept exactly. Be complete on these even at the cost of length; keep everything else concise. Weight the two voices differently: keep what the user said, asked for, shared, or established carefully and close to their own words; your own explanations and reasoning can be condensed much further, to what they concluded or produced — as long as nothing in the six items above is dropped.
```

## 將變更與測試限制在任務要求的範圍內

當被要求實作開放式功能時，Claude Fable 5.1 會交付所要求的內容，有時還會更多：它可能會修正附近的程式碼、擴充任務未提及的行為，或提交超出變更所需的測試檔案。它對於明確說明哪些內容應排除的指示反應良好。使用以下指示後，未經要求的新增內容和提交的測試程式碼會大幅減少，而任務成功率沒有可測量的變化：

```text wrap
If, while working or testing, you find a pre-existing bug, a performance concern, or behavior the task doesn't mention, don't fix, optimize or extend it in this change unless the requested behavior cannot work without it; report it as a follow-up in your summary. Where the task is ambiguous, implement the reading its wording and the surrounding code most directly support, state that assumption in your summary, and don't build for the other readings as well. Verify your work however you like; scratch scripts and quick checks need not be kept. Commit tests only where the task asks for them or this repository already keeps tests for this kind of change, sized like the neighboring test files — roughly one focused test per stated behavior — and don't turn scratch checks into additional permanent test files. This is about extras only: implement every behavior the task asks for, completely.
```

## 低 effort 下的搜尋觸發

在 `low` effort 下，Claude Fable 5.1 比 Claude Fable 5 更不會呼叫搜尋或檢索工具，而更可能憑記憶回答。在某些情況下，最簡單的解決方法是針對受影響的回合提高 effort，而非整個對話。請參閱[在對話中途變更 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort#changing-effort-mid-conversation)。

在其他情況下，引導模型進行驗證的提示會有所幫助。請在系統提示中說明，認得某個名稱並不等於知道其目前狀態，且這類名稱應依照使用者所寫的方式進行搜尋：

```text wrap
When a query centers on a name you do not confidently recognize, or recognize from a fast-moving area like AI models and developer tools where the landscape shifts within months, the name itself is the thing to verify: search before answering, and include the name as the user wrote it in at least one query alongside any reformulations. This holds even when you have some background on it — partial background is exactly what makes an out-of-date answer sound authoritative, so familiarity is not a reason to skip the search.
```

## 減少安全防護誤判

Claude Fable 5.1 的安全分類器產生的「false positive」（誤判）比 Claude Fable 5 推出時更少，且允許在原始碼中尋找漏洞。誤判仍會發生，被封鎖的請求會傳回 `stop_reason: "refusal"`（請參閱[拒絕、備援與計費](https://platform.claude.com/docs/zh-TW/models/fable-5-1/whats-new-fable-5-1#refusals-fallback-and-billing)）。以下三種情況會使誤判更容易發生：

* **編譯檢查的措辭：** 不要問「這個程式能否無錯誤地編譯？」，而是問「這個程式中有任何錯誤嗎？」
* **較不知名的程式語言：** 向模型提供關於該語言是什麼及其運作方式的上下文，例如讓它存取該語言的文件。
* **工具輸出中的 Base64：** 將 base64 編碼資料傳回模型上下文的工具可能會觸發誤判，因此建議的解決方法是移除這些工具。

## 優先使用針對性編輯，而非改寫整個檔案

如果 Claude Fable 5.1 為了小幅變更而改寫整個檔案，請將以下指示附加到系統提示或第一則使用者訊息中。Claude Fable 5.1 比 Claude Fable 5 更可能改寫整個文字檔案，而非進行針對性編輯。產生的檔案通常相同，但除非檔案很短或大部分內容都要變更，否則改寫會耗費更多輸出 token 和時間。此指示可讓 Claude Fable 5.1 在小型和中型變更上回到與 Claude Fable 5 一致的表現。

```text wrap
The number of tokens used to edit files is best minimized, all else being equal. Therefore, when it will not affect the end result, try to surgically edit a file rather than rewrite the entire thing.
```

## 在 xhigh 和 max effort 下為長篇輸出預留空間

在 `xhigh`，尤其是 `max` effort 下，Claude Fable 5.1 可能會在開始撰寫回覆前思考更久。當單一請求要求長篇交付成果（例如完整改寫一份長文件）時，它可能會在思考中草擬大部分交付成果，然後再將其作為回覆重新寫出，這意味著更長的等待時間和更多輸出 token。最簡單的做法是以建議的起點 `high` 執行這類請求，並僅在您已測得品質提升的情況下才改用 `xhigh` 或 `max`（請參閱[考慮所有 effort 等級](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#consider-all-effort-levels)）。如果您確實以 `xhigh` 或 `max` 執行：

* 設定 `max_tokens` 時，請為思考和回覆都預留空間，而不只是您預期的回覆長度。
* 將以下說明附加到使用者訊息的結尾。它能讓模型在處理文字和程式碼請求時的思考大幅縮短。請將 `[max_tokens]` 替換為該請求實際的 `max_tokens` 值，例如 64,000。

```text wrap
Everything produced in one reply, including any reasoning or drafting done before the reply, counts toward a single limit of about [max_tokens] tokens. If that limit is reached before the reply is finished, the person receives a cut-off response and has to start over. Composing an entire output or deliverable in full as reasoning and then again as a reply would double the length of the turn without improving the result, so don't do that.

Instead, when the person has asked for a long or effort-intensive deliverable such as a multi-section document, a large table or dataset, or a complete code file, spend extra effort on understanding the request, checking the inputs the answer depends on, settling the structure and other difficult decisions, and otherwise using the reasoning space to reason and the output space to write an output. Usually it is not needed to draft an output multiple times.
```

## 讓主代理在子代理執行時繼續工作

如果您的程式設計代理允許 Claude Fable 5.1 將工作委派給子代理，請不要強制主代理停下來等待每一個子代理。在程式設計任務中，讓主代理在子代理執行時繼續工作，可在品質、token 用量和成本相近的情況下縮短平均完成時間。設定方式如下：

* 讓啟動子代理的工具立即返回。
* 在每個子代理的結果就緒後，於稍後的 `user` 訊息中將其傳回給主代理。
* 為主代理提供一個獨立的工具，讓它在想要等待結果時呼叫。

模型仍然經常選擇等待。節省的時間來自於它繼續進行其他工作的那些執行。

## 為視覺工作提供裁切與縮放工具

Claude Fable 5.1 開箱即具備更好的視覺能力，而在密集圖表等複雜視覺輸入上，當它能夠反覆分析、裁切並以視覺方式驗證所見內容時，表現最佳。若要充分發揮效益，請將模型作為代理執行，並讓它存取一個容器，該容器存放原始圖片或影片，且預先安裝了基本的影像處理函式庫（例如 PIL 和 OpenCV）。如果執行容器的負擔太大，單靠一個圖片裁切工具就能帶來大部分的提升：一個傳回圖片中所選區域（經裁切並放大）的工具，能讓模型更深入地檢視特定細節，並隨圖片 token 擴展「test-time compute」（測試時運算）。[裁切工具範例](https://platform.claude.com/cookbook/multimodal-crop-tool)提供了可運作的定義。
