Claude Code: Plugin 系統
# Plugins 將 Claude Code 擴充功能封裝,以供散布。Plugin 可包含自訂 commands、subagents、skills、hooks 與 MCP 伺服器。Plugins 於2025年10月9日進入公開測試版。Anthropic…
Plugins 將 Claude Code 擴充功能封裝,以供散布。Plugin 可包含自訂 commands、subagents、skills、hooks 與 MCP 伺服器。Plugins 於2025年10月9日進入公開測試版。Anthropic…
Plugins 將 Claude Code 擴充功能封裝,以供散布。Plugin 可包含自訂 commands、subagents、skills、hooks 與 MCP 伺服器。Plugins 於2025年10月9日進入公開測試版。Anthropic 現在發布兩個通用市集:官方市集(claude-plugins-official),Claude Code 預設會自動為您加入;以及社群市集(claude-community,來自 anthropics/claude-plugins-community 儲存庫),需由您自行以 /plugin marketplace add anthropics/claude-plugins-community 加入。436
本節涵蓋:Plugin 結構與 Plugin Manifest、Plugin 管理與修剪、本機開發、Plugin 安裝、Plugin 設定安全性、Plugin 元件、透過 .claude/skills/ 使用本機 Plugins、Plugin CLI,以及 Mods。
Plugin 結構
my-plugin/
├── .claude-plugin/
│ └── plugin.json # Optional manifest; name is its only required key
├── bin/ # Executables invokable as bare commands (v2.1.91+)
├── commands/ # Slash commands
│ └── hello.md
├── agents/ # Subagents
│ └── helper.md
├── skills/ # Skills
│ └── my-skill/
│ └── SKILL.md
├── hooks/ # Event handlers
│ └── hooks.json
└── .mcp.json # MCP servers
bin/ 目錄存放 plugin 啟用期間 Claude 可直接以名稱呼叫的執行檔(v2.1.91+)。134
Plugin Manifest
Manifest 為選用:沒有 manifest 時,Claude Code 會載入它在標準配置中找到的元件。若要撰寫 manifest,name 是唯一的必要鍵。505
最小化的 plugin.json:
{
"name": "my-plugin",
"description": "What this plugin does",
"version": "1.0.0",
"author": {
"name": "Your Name"
}
}
v2.1.129 manifest 注意事項:themes 與 monitors 現在應宣告於 manifest 的 "experimental" 物件下。現有的頂層宣告仍可運作,但 claude plugin validate 會提出警告,讓 plugin 作者能在發布前完成遷移。153 截至 v2.1.259,claude plugin validate --json 會以 JSON 輸出驗證結果。208
v2.1.281 驗證:claude plugin validate 現在也會檢查 MCP 伺服器,回報載入時會遭到無聲捨棄的 .mcp.json 項目、未宣告的 ${user_config.*} 參照,以及不安全的 URL。若 shell 形式的 hook 未以引號括住 ${CLAUDE_PLUGIN_ROOT},也會發出警告,因為 plugin 路徑含有空格時便會失效;plugin hook 失敗錯誤現在也會指出有問題的 plugin。221
Manifest 鍵(v2.1.323 至 v2.1.331)。 engines 以 claude-code 鍵下的 semver 範圍,標明 plugin 可運作的 Claude Code 版本("engines": { "claude-code": ">=2.1.323" }):超出範圍的 plugin 不會被安裝、更新或載入,安裝與更新會選擇符合範圍的最新版本。v2.0.15 至 v2.1.75 版本會拒絕含有此欄位的 manifest,因此若 plugin 必須在這些版本上載入,請省略此欄位(v2.1.323)。optionalDependencies 列出會與您的 plugin 一同安裝、但可各自停用或解除安裝的 plugins(v2.1.331,僅見於版本說明)。Plugin 的 agent 設定已棄用:它仍會套用,且現在會在啟動時、claude plugin list 中以及 claude plugin validate 中發出警告(v2.1.323)。claude plugin validate 也會對 plugin 的 TypeScript hooks 模組進行型別檢查,每項發現都是警告,--strict 會將其轉為失敗(v2.1.323);claude plugin install --json 會回報 unsetOptionCount(v2.1.323)以及 commandPrinted 與 commandFailed(v2.1.330)。527538
市集(v2.1.323 至 v2.1.331)。 市集的 ref 接受某個分支或標籤上任一提交的完整 ID;v2.1.325 之前的用戶端無法 clone 以這種方式固定的市集,因此市集在這些用戶端上會停止載入。當 git submodule 不在其儲存庫所記錄的提交上時,市集與 plugin 的安裝會失敗(v2.1.323)。Plugin 的 MCP 套件(.mcpb、.dxt)會解壓縮到 plugins 目錄下,而不是 plugin 自己的資料夾,因此唯讀的 plugin 資料夾也能載入(v2.1.325);解除安裝 plugin 時會刪除這些解壓縮出的檔案,除非另一個 plugin 使用相同的套件(v2.1.326)。給管理員:pluginDigests 已棄用且會被忽略(v2.1.325),而 v2.1.331 的版本說明預定在2026年11月30日當天或之後的某個版本中,為受管 extraKnownMarketplaces 中的市集啟用自動更新,並以項目上的 "autoUpdate": false 作為退出方式。/status 新增「Marketplace auto-update」(市集自動更新)列,列出不會自動更新的受管市集及其原因(v2.1.329)。527
Plugin 管理
> /plugin # Interactive interface
> /plugin install name@marketplace # Open the plugin's details; choose a scope to install
> /plugin install name --marketplace <source> # Offer to add the marketplace, then open the plugin's details (v2.1.275+)
> /plugin enable name@marketplace # Enable
> /plugin disable name@marketplace # Disable
> /plugin uninstall name@marketplace # Remove
> /plugin marketplace add ./local # Add local marketplace
> /plugin marketplace list # View marketplaces
在工作階段中,/plugin install <plugin> 會開啟該 plugin 的詳細資訊,讓您選擇範圍並確認。從 shell 執行 claude plugin install <plugin> 則會直接安裝,不經過選單。337
若要進行一次性測試,v2.1.129 新增了一個工作階段旗標,可直接擷取 plugin zip,而不會將其安裝至您一般的市集狀態:
claude --plugin-url https://example.com/my-plugin.zip
截至 v2.1.128,--plugin-dir 也接受 .zip plugin 封存檔,因此本機冒煙測試可指向 plugin 資料夾或封存檔。153 截至 v2.1.265,它也接受包含多個 plugins 的資料夾:每個具有 manifest 的子資料夾都會載入為獨立 plugin,工作階段執行期間新增或移除的子資料夾也會被偵測並套用。212
若要在不使用 git 或 npm 的情況下進行永久安裝,v2.1.224 新增了 archive plugin 來源:將市集項目指向透過 HTTPS 提供的 zip,並可選擇鎖定 SHA-256,如此一來,若封存檔在您不知情時發生變更,安裝便會失敗。這3種散布途徑如今各司其職——--plugin-url 適合單一工作階段、archive 適合從 URL 進行鎖定版本的安裝,而市集則適用於具有更新生命週期的項目。對團隊而言,鎖定功能才是關鍵:鎖定雜湊值會將「信任此 URL 今天提供的任何內容」轉變為「信任我們審查過的確切位元組」。198
v2.1.221 帶來3項易用性改進:/plugin install 在回報找不到 plugin 前,會重新整理過期的市集目錄並重試(市集剛加入項目後出現的「找不到」問題已不復存在);透過 /plugin 安裝的 plugins 在安全的情況下會立即啟用,不再一律需要 /reload-plugins;此外,plugin manifest 可將 skills 指向 ".",直接從 plugin 根目錄提供 skills——根層級 SKILL.md 的驗證錯誤現在也會明確提出此建議。196 v2.1.268 進一步完善此流程:在 /plugin 中安裝、啟用或停用 plugin 後,關閉選單時即會生效,不再需要執行 /reload-plugins。213
v2.1.229 新增 command 市集來源——市集項目可指向本機命令(例如 IDE 或建置工具),該命令執行時會輸出 plugin 資料夾。每個工作階段都會重新解析路徑,且無須重新啟動即可套用;mode: "link" 則會就地使用該資料夾,而非複製內容。這是為開發迴圈而設計的來源:由編輯器管理 plugin 簽出,而 Claude Code 會跟隨其指向的位置。254
v2.1.275 新增2項帳號端便利功能:/plugin install <plugin> --marketplace <source> 可從尚未加入的市集安裝——Claude Code 會先詢問是否加入該市集——而您在 claude.ai 帳號上啟用的 plugins 也會同步至以該帳號登入的終端機工作階段(name@synced 管道,現在可透過 syncClaudeAiPlugins: false 明確停用;skills 則以相同方式透過 syncClaudeAiSkills 同步)。215
Plugin 修剪(v2.1.121+)
Plugins 可將其他 plugins 宣告為相依項目。安裝 plugin 時,其相依項目會自動安裝,並標記為「自動安裝」。以下2個新命令可清理由手動解除安裝或移除市集所遺留的項目:
| 命令 | 行為 |
|---|---|
claude plugin prune |
移除已無上層 plugin 的自動安裝 plugins |
claude plugin uninstall <name> --prune |
解除安裝,並連帶移除因此失去依附對象的自動安裝相依項目 |
手動解除安裝或移除市集後,請執行 prune,讓 ~/.claude/plugins/ 保持精簡。151
本機開發
建立本機市集以供測試:
mkdir -p dev-marketplace/.claude-plugin dev-marketplace/my-plugin
# Create the plugin structure in dev-marketplace/my-plugin
# Create dev-marketplace/.claude-plugin/marketplace.json (below)
claude
> /plugin marketplace add ./dev-marketplace
> /plugin install my-plugin@dev-marketplace
市集是存放 .claude-plugin/marketplace.json 清單檔的目錄。name、owner 與 plugins 為必要欄位,相對的 source 會從市集根目錄(即包含 .claude-plugin/ 的目錄)解析:337
{
"name": "dev-marketplace",
"owner": { "name": "Your Name" },
"description": "Plugins I am developing locally",
"plugins": [
{ "name": "my-plugin", "source": "./my-plugin" }
]
}
claude plugin validate ./dev-marketplace 會在您加入前檢查此清單檔。若要在不使用任何市集的情況下於單一工作階段中試用 plugin,請執行 claude --plugin-dir ./my-plugin。
Plugin 安裝改進(v2.1.51+)
從 npm 來源安裝時,Plugins 現在支援自訂 npm registry 與鎖定特定版本。市集操作的預設 git 逾時已從30秒提高至120秒,並可透過 CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS 設定。96 截至 v2.1.275,npm 來源的 plugins 會透過 npm pack --ignore-scripts 擷取並驗證完整性,因此套件的安裝指令碼不再於您的電腦上執行。215 v2.1.277 修正了重新安裝與執行中工作階段衝突的問題:重新安裝正由某個工作階段或其他程式使用的 plugin 版本時,claude plugin install 有時會失敗並破壞已安裝的副本;現在未變更的副本會原封不動地保留。同一版本也會在對已安裝的 plugin 執行 claude plugin install 時,提示市集是否有較新版本,並指出可使用 claude plugin update 命令。216 v2.1.286 會拒絕屬於 git repository 或資料夾的 npm plugin 來源,且只會從 registry 套件安裝 plugin 相依項目。228
Plugin 設定安全性(v2.1.207)
2 項強化措施處理 plugin 設定中的 shell 注入,以及由儲存庫提供之值的問題:182
- shell 形式的命令會拒絕
${user_config.*}。將使用者提供的設定值直接插入 shell 字串會帶來注入風險,因此,參照${user_config.*}的 shell 形式 plugin 命令現在會無法通過驗證。請改用 exec 形式(引數陣列,不經 shell 剖析),或從$CLAUDE_PLUGIN_OPTION_<KEY>環境變數讀取該值。 - 不再從專案層級的
.claude/settings.json讀取pluginConfigs。 Plugin 設定值現在僅取自使用者設定、--settings檔案與受管設定,因此複製下來的儲存庫無法提供這些值。
隔離防護持續加強:v2.1.265 修正了 macOS 與 Linux 上,plugin 路徑中的反斜線可繞過符號連結隔離檢查的問題;v2.1.267 則修正了已擷取市集中的同類情況:市集項目路徑若含有反斜線,原本可能繞過隔離檢查。212213
Plugin 元件
- Commands:可作為 slash commands 使用(
/plugin-command) - Agents:可作為 subagents 使用
- Skills:依 skill 設定自動載入
- Hooks:與使用者/專案 hooks 合併,並行執行
- MCP 伺服器:啟用 plugin 時自動啟動
透過 .claude/skills/ 使用本機 Plugins(v2.1.157+)
Skills 目錄中的 plugin 資料夾不需市集即可載入。claude plugin init <name> 會在您的個人 skills 目錄 ~/.claude/skills/<name>/ 建立新 plugin 的初始架構,該 plugin 會以 <name>@skills-dir 的名稱在每個專案中載入。此指令沒有可指定其他位置的旗標:若要將 plugin 保留在單一儲存庫中,請自行在 <project>/.claude/skills/<name>/ 建立相同的配置(包括其 .claude-plugin/plugin.json),它會在通過與專案允許規則相同的信任檢查後載入。無論哪種方式,都不需要註冊市集。/plugin 也新增了引數自動完成,與其餘指令介面保持一致。263337
Plugin CLI:JSON 輸出、鎖定安裝、Eval 套件(v2.1.268 至 v2.1.299)
以下六項新增功能讓 plugin CLI 更適合指令碼與 CI 用途:213
- 全面支援
--json(v2.1.268):claude plugin install、uninstall、update、enable與disable全都接受--json;claude plugin list --json的每一列也包含errorDetails與noteDetails,即供包裝指令碼使用的機器可讀狀態。 - 鎖定命令的接受機制(v2.1.271):
claude plugin install --accept-command <sha256>(claude plugin update亦同)只會接受先前--json執行時顯示的確切命令,而非一概透過-y核准——審查一次並核准那些位元組後,若安裝命令發生變更,就會失敗而不會執行。 claude plugin configure <plugin>(v2.1.285):顯示 plugin 的選項及尚未設定的項目,或搭配--values-stdin儲存從 stdin 讀取的新值。claude plugin install --config也接受<server>.<key>=<value>,因此可在安裝時設定隨附.mcpbMCP 伺服器本身的設定,無須前往/plugin→ Configure 即可啟動。226claude plugin eval(v2.1.269):針對 Claude Code 執行 plugin 的 eval 套件,並取得可評分、可重現的結果;結果會以 JSON 與 HTML 報告呈現——這是在測試 plugin 行為的迴歸,而不只是驗證 manifest。claude plugin eval --help說明了套件格式。截至 v2.1.299,--disallow-tools與disallowed_tools案例欄位可禁止執行時使用指定的內建工具,例如 Agent;若執行因 API 錯誤而結束,則不經評分程序直接計為0分,並讓套件以狀態1結束。268269claude plugin install --marketplace <source>(v2.1.292):shell 指令接受與/plugin install相同的旗標。必要時,它會依照與claude plugin marketplace add相同的政策檢查加入市集,再從中安裝 plugin。233234237claude plugin validate與claude plugin test(v2.1.289-292):validate會檢查資料夾中同時含有市集 manifest 的 plugin(v2.1.289),並會列出 mod 在管制點註冊的每個 hook,以及該 hook 是否具有.catch;使用--json時,這些資訊會顯示於gatingHooks下(v2.1.290)。截至 v2.1.292,若測試所註冊 hook 中的expect失敗,或引擎拒絕 stub 回答,claude plugin test會判定失敗,而非默默通過。232233234
Mods(v2.1.287)
Mod 是一種 plugin,其 JavaScript 或 TypeScript handlers 會在 Claude Code 內部執行,而非作為 shell 命令執行。當工具呼叫、提交提示詞或繪製部分介面等事件發生時,Claude Code 會呼叫 handler;handler 可監看、修改或接管該事件。如此一來,mod 便能在逐字稿旁繪製窗格、在提示詞上方加入橫幅、新增不需 Claude 回合即可執行的 /command,或暫停、回應、重新導向工具呼叫。229230
Mods 需要 v2.1.287,且預設為啟用。Mod 會以您的權限執行,且不受 sandbox 隔離,因此只能安裝來自您信任之作者與市集的 mods;安裝前執行 claude plugin validate ./some-mod,即可列出 mod 掛接的事件及其進行的呼叫。若要停止已安裝的 mods,可在 /plugin 中停用該 plugin、以 --safe-mode 啟動單一工作階段,或在 ~/.claude/settings.json 中設定 "disableAllHooks": true;最後一種方式也會停用您的設定 hooks 與狀態列。--safe-mode 與 disableAllHooks 不會停止內建 mods:可在 /plugin 中逐一停用,但 cc-plugin-sec-default 除外,它是保護組織所管理項目的防護機制,無法關閉。506自 v2.1.287 起,早期存取開關 CLAUDE_CODE_ENABLE_FUNCTION_HOOKS 會被忽略。230
部分內建功能本身就是 mods,會列在 /plugin Installed 分頁的 Built-in 下,例如 /diff 與 AGENTS.md 載入功能。其中一項預設關閉:You should know 會執行一個在旁監看的 agent,標記您或 Claude 可能遺漏的事項。可使用 /plugin enable cc-plugin-you-should-know@builtin 啟用;版本資訊指出,這項功能僅限已開啟遙測的第一方工作階段。229230
Mod API 新增功能(v2.1.288-292)。v2.1.288 新增 $.ui.selection(),會傳回您最近在全螢幕模式中選取的文字;若選取範圍位於單一逐字稿列內,也會傳回該列。v2.1.289 會為 agent 團隊的隊友觸發 agent.spawn(e.isTeammate 為 true),在 plugin hook 事件之間維持相同的 agent ID,並於 $.agent.list() 回報閒置與等待狀態。v2.1.290 在 turn.step 結果中新增 serverToolUses(即 API 自行進行的工具呼叫,例如 advisor),並在 tool.check 事件中新增 agentId,讓 hook 能區分 subagent 與主工作階段的權限檢查;同時也在 tool.check hook 讀取的內容中新增 ceiling,指出組織要求的核准層級。v2.1.292 新增 prompt.autocomplete 事件,用於將列加入提示詞的自動完成清單;也為 $.model.complete 加入提示詞快取功能(在區塊上設定 cache: true,即可快取截至該區塊的要求);此外,agent.spawn 中也會包含工作流程 agents 及其執行與索引資訊,讓 mod 能拒絕它們。serverToolUses、e.agentId 與 e.ceiling 皆需要 v2.1.290 或更新版本。231232233234338
Mod API 新增功能(v2.1.299)。$.prompt.media 可讓由受管理設定安裝之 mod 的 prompt.submit hook,讀取附加至提示詞的圖片或文件位元組;$.session.identity() 則會告知此類 mod 工作階段的登入方式,若受管理的 forceLoginOrgUUID 列出該組織,也會提供其組織與電子郵件。Text 接受 size、weight、mono 與 tabular;Box 接受具名間距級別(xs 至 xl);bold 已淘汰,請改用 weight。skill.prompt 會接收 skill 的 frontmatter、來源、plugin 名稱與檔案路徑;mods 參考資料將其列為需要 v2.1.299 的 e.frontmatter、e.source、e.pluginName 與 e.path。session.append 新增 queue 入口;恢復 subagent 或終止隊友時會觸發 agent.spawn,並設定 resume;turn.start 可接收 subagents 的回合(e.agentId);$.http.fetch 則接受 Content-Length 超過4 MiB 本文限制的 304、204 或 205。若提供的 $ 方法未在10秒內回應,claude plugin test 會判定失敗,並以 part: { plugin } 標記每個 mod 的 ui.render 根節點。Hook 傳回值若巢狀深度超過28,000層,將遭到拒絕。268269
Mod API 新增功能(v2.1.300)。virtualText 提示詞裝飾可在提示詞方塊中繪製文字,但該文字絕不會進入草稿或已提交的提示詞;$.ui.view({ agentId }) 會在主檢視中顯示 agent 的逐字稿,$.ui.view({}) 則會返回;Text 接受 dir,以支援由右至左排列的列(Windows 與 VS Code 終端機);當提示詞方塊內容並非因鍵入編輯而發生變更時,會觸發 prompt.change hook;agent.spawn 可改寫工作流程 agent 的 prompt 與 model。270271
Mod API 新增功能(v2.1.301)。Input 接受 rows,可在終端機中建立多行文字欄位;按 Enter 提交,按 Shift+Enter 或在 Enter 前輸入反斜線則會開始新的一行。Hook 的 .catch handler 僅會在 hook 擲回錯誤或逾時時執行;在 hook 自身呼叫下方引發的事件會略過該 hook,且不會詢問其 .catch。變數成功設定或取消設定後,$.env.set 會解析為 {};若未執行寫入,則解析為附帶原因的 { deny }。在新程序的第一次回應完成前呼叫 $.model.fork 時,已不會再傳回 nothing-to-fork,例如 claude -p 執行與雲端工作階段。在 VS Code、桌面版及行動版應用程式中,問題對話框上方繪製的樹狀結構可容納 Markdown 與最多48列(終端機仍維持12列純文字)。Mods 參考資料涵蓋截至 v2.1.290 的 CLI 與桌面應用程式,以及截至 v2.1.299 的 VS Code 擴充功能。Mods 文件記載了 Input 的 rows 與 $.env.set,而 virtualText、$.ui.view、prompt.change、$.prompt.media 與 $.session.identity 只出現在版本說明中。272273338
Mods 與權限(v2.1.318 至 v2.1.321)。 在 auto mode 與略過權限模式下,Claude 撰寫的 mods 會不經詢問直接開啟,即使在受管的 allowUnsandboxedCommands: false 或 allowManagedDomainsOnly 之下亦然,且在 dontAsk 模式下不會載入;mod 自身的工具呼叫($.tool.call、$.mcp.call)不會引發權限提示,即使在您自己的詢問規則之下,或在 dontAsk 與 -p 執行中亦然,但拒絕規則與組織政策仍然適用(v2.1.321)。Claude Code 詢問是否開啟它所撰寫的 mods 時,會記錄您的回答;$.model.fork 接受 effort 選項,讓旁支工作無論工作階段使用何種 effort,都能以 low 執行(v2.1.318)。Mod 在 prompt.submit 時附加的內容會保留在使用者的回合中,而不是以系統訊息送出(v2.1.318)。無頭工作階段會在 .claude/skills 中的 mod 檔案變更時重新載入 mods,CLAUDE_CODE_PLUGIN_DIR_WATCH=0 可關閉此行為;當 Claude 處理 ~/.claude/plugins 中的檔案時,該處內部的 .claude/skills 資料夾不再載入(v2.1.321)。283
Mods(v2.1.323 至 v2.1.332)。 easel 是內建 mod,會在您要求時以及 MCP 指標結果下方繪製圖表,適用於 Pro、Max,以及(在可用時)Team 與 Enterprise,限 macOS 與 Linux;可在 /config 中關閉自動圖表(v2.1.330)。給作者:engine.create 上的 *、命名空間或否定式 hook 現在只會觀察,因此若要新增或不提供某個 $ 名詞,請以名稱掛接 engine.create;若 mod 的 engine.create hook 不是以唯一接受的形式撰寫,claude plugin validate 會判定失敗(v2.1.323)。tool.list plugin hooks 新增或移除的工具,會套用到模型與每個 agent(v2.1.323)。當對話框或提示上方的欄位遮住提示時,窗格會收到 isPromptCovered(v2.1.323);Box 接受 overflowX="scroll",Text 接受 maxLines 與 wrap="clip"(v2.1.326)。/cost、$.session.usage()、--max-budget-usd 以及成本與 token 指標,都會計入 mod 的 $.model.complete 與 $.model.classify 呼叫(v2.1.325)。在工作階段的 mods 資料夾中進行編輯時,會更常詢問(v2.1.326);嵌入 Claude Code 的應用程式可以開啟政策 plugin 的 allowManagedModsOnly 選項,而管理員的受管設定仍優先(v2.1.328)。這些內容記載於版本說明中。527
參考資料
-
Claude Code v2.1.51 版本說明,GitHub,2026年2月24日,擷取於2026年11月11日:「Env var interpolation now requires an explicit
allowedEnvVarslist in the hook configuration.」;「HTTP hooks are now routed through the sandbox network proxy when sandboxing is enabled, enforcing the domain allowlist. HTTP hooks are not supported for SessionStart/Setup events.」Claude Code CHANGELOG,2.1.51 章節,同次擷取:「Addedclaude remote-controlsubcommand for external builds, enabling local environment serving for all users.」;「Added support for custom npm registries and specific version pinning when installing plugins from npm sources」;「Updated plugin marketplace default git timeout from 30s to 120s and addedCLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MSto configure.」;「Tool results larger than 50K characters are now persisted to disk (previously 100K).」;「BashTool now skips login shell (-lflag) by default when a shell snapshot is available, improving command execution performance.」;「Fixed a security issue wherestatusLineandfileSuggestionhook commands could execute without workspace trust acceptance in interactive mode.」;「The/modelpicker now shows human-readable labels」。協調多個 Claude Code 工作階段組成的團隊,Claude Code 文件,同次擷取,涵蓋隊友的計畫核准,以及「使用 hooks 強制執行品質關卡」一節中的TeammateIdle與TaskCompletedhooks。 ↩ -
GitHub Releases v2.1.91。v2.1.91:MCP
_meta["anthropic/maxResultSizeChars"]上限達 500K、disableSkillShellExecution設定、外掛bin/可執行檔、多行深層連結提示、Edit 工具更短的old_string錨點、改良的/claude-apiskill、逐字稿鏈中斷修正。2026年4月2日。 ↩ -
Claude Code版本說明,為v2.1.121(2026年4月28日,00:31 UTC)與v2.1.122(2026年4月28日,22:05 UTC)的綜合參考。v2.1.121:
alwaysLoadMCP伺服器設定選項(略過工具搜尋延遲載入);MCP啟動時自動重試3次;claude plugin prune與--prune連鎖清理;/skills支援輸入即篩選;PostToolUse的hookSpecificOutput.updatedToolOutput從僅限MCP擴展至所有工具;.claude/skills/、.claude/agents/、.claude/commands/不再觸發--dangerously-skip-permissions提示;Vertex AI以X.509憑證為基礎的Workload Identity Federation(mTLS ADC);SDKmcp_authenticateredirectUri;OTel在LLM請求span中新增stop_reason、gen_ai.response.finish_reasons與user_system_prompt(須透過OTEL_LOG_USER_PROMPTS啟用);/terminal-setup啟用iTerm2剪貼簿存取,讓/copy可在tmux中使用;分頁標題遵循language設定;CLAUDE_CODE_FORK_SUBAGENT=1擴展至非互動式的claude -p;升級後啟動更快(版本說明啟動畫面移除了Recent Activity面板);claude.ai連接器針對相同上游URL去除重複。v2.1.122:ANTHROPIC_BEDROCK_SERVICE_TIER環境變數(default/flex/priority)以X-Amzn-Bedrock-Service-Tier傳送;/resume可依PR URL搜尋,涵蓋GitHub、GHE、GitLab、Bitbucket;/mcp顯示隱藏的連接器並附上移除重複項的提示,同時釐清瀏覽器授權後的未授權訊息;OTel新增claude_code.at_mention記錄事件,用於@提及的解析;api_request/api_error的數值屬性以數字輸出(先前為字串)。兩個版本中的重要修正:/usage約2GB的記憶體洩漏、圖片密集工作階段的RSS成長達數GB、--resume略過損毀的逐字稿行並修正大型外部建置工作階段當機、CWD被刪除或移動時的Bash復原、Bedrock在application inference profile上的thinking修正、Vertex/Bedrock在結構化輸出時對output_config額外輸入的拒絕、ToolSearch遺漏工作階段開始後才連線的非阻塞MCP工具、較新模型的圖片縮放上限由2576改為2000 px、bash模式中的!exit/!quit不再終止CLI、tmux/GNOME/Windows Terminal/Konsole上的回捲重複,以及格式錯誤的hooks項目不再使整個settings.json失效。 ↩ -
2026年5月6日讀取的版本說明:Claude Code v2.1.126版本說明、Claude Code v2.1.128版本說明、Claude Code v2.1.129版本說明、Claude Code v2.1.131版本說明、Claude Code CHANGELOG,以及
@anthropic-ai/claude-code的 npm registry 紀錄,其time欄位將 2.1.131 的時間記為 2026-05-06T07:41:53Z。v2.1.126新增了/model的閘道模型探索、claude project purge、OAuth程式碼貼上的後備機制、skill啟用的OTel、Windows上PowerShell作為主要shell的行為,並變更了--dangerously-skip-permissions受保護路徑的提示方式。v2.1.128為--plugin-dir新增zip支援、MCP工具數量與零工具的可見性、主控台驗證的--channels,修正了EnterWorktree,並修復了plugin/快取/MCP/工作階段的問題。v2.1.129新增了--plugin-url、CLAUDE_CODE_FORCE_SYNC_OUTPUT、CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE、skillOverrides、透過CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1選擇啟用的閘道模型探索,以及plugin manifest的themes/monitors驗證警告。v2.1.131修正了Windows上VS Code擴充功能的啟用以及Mantle端點驗證;版本說明並未宣布其他命令或設定的新增項目。 ↩↩ -
Claude Code v2.1.207 版本說明。2026年7月。v2.1.207: Auto Mode 在 AWS Bedrock、Google Vertex AI 與 Microsoft Foundry 上不再需要
CLAUDE_CODE_ENABLE_AUTO_MODE選擇啟用,管理員可透過disableAutoMode受管設定將其停用;Bedrock、Vertex AI 與 Claude Platform on AWS 現在預設為 Claude Opus 4.8;autoMode設定不再從儲存庫的.claude/settings.local.json讀取(請改用~/.claude/settings.json);plugin 安全性:shell 形式的 plugin 命令會拒絕${user_config.*}插值(請改用 exec 形式或$CLAUDE_PLUGIN_OPTION_<KEY>環境變數),且pluginConfigs不再從專案層級的.claude/settings.json讀取。擷取於2026年7月17日。 ↩ -
Claude Code v2.1.221 版本說明 與 Claude Code v2.1.222 版本說明,2026年8月4日。v2.1.221:VSCode Focus 檢視(
Ctrl+Alt+F);Linux/WSL 上沙箱憑證檔案的mode: "mask",含哨兵副本與出站替換,macOS 則回退為deny;背景工作階段可 commit/push、僅在必要時建立草稿 PR、遵循 CLAUDE.md 的 git 指示,並在執行結束時回報位置;/fork工作階段擁有專屬 worktree;/plugin install可重新整理目錄並重試;安全時立即啟用 plugin;"."可作為 plugin 的skills路徑;修正 zsh[[ ]]正規表示式條件式的權限繞過;修正 PowerShell 引號路徑的權限問題;prompt-audit子命令;Stats 快取 token 細目;auto 模式提示快取重用。v2.1.222:Remote Control 自動啟動限制為使用者範圍;worktree 隔離的 git 修正延伸至所有工作階段類型的檔案編輯與 Bash;修正背景任務的 PreToolUse 自動允許繞過;SendMessage權限分類;移除 ultraplan。擷取於2026年8月5日。 ↩ -
Claude Code v2.1.224 版本說明,2026年8月7日。新增
claude self-hosted-runner(Team/Enterprise);macOS/Linux 上支援跨工作階段SendMessage,並可透過ListAgents探索,另有crossSessionInbound/dialogExpiry設定;archiveplugin 來源,可選擇以 SHA-256 鎖定;沙箱憑證遮罩選項extract/onExtractNoMatch、decode: "jwt"搭配maskClaims,以及awsPairs/sigv4(需要network.tlsTerminate;僅限 user/managed/--settings範圍);移除每個工作階段 200 個 subagent 的產生上限;修正長路徑的工作階段目錄跨越、結尾斜線的沙箱拒絕繞過,以及沙箱違規詳細資訊不可見的問題。擷取於2026年8月7日。 ↩ -
Claude Code 版本說明 v2.1.257 與 v2.1.258(皆為2026年9月1日)及 v2.1.259(2026年9月2日),以及2026年9月3日的正式 CHANGELOG。當日的 npm dist-tags:latest 與 next 皆為 2.1.259,stable 為 2.1.236;npm 已發佈的版本從 2.1.252 直接跳到 2.1.257——2.1.253 至 2.1.256 從未發佈,CHANGELOG 中也沒有對應章節(與 2.1.244/2.1.249 的模式相同)——因此 2.1.258 說明中的「2.1.255 引入的回歸」指的是未發佈的內部建置,而 v2.1.257 是第一個可安裝且支援 Fable 5.1 的版本。v2.1.257 各項目的來源:Fable 5.1 支援及閘道警語(在 Claude apps 閘道工作階段中,
fable與best別名目前仍解析為 Fable 5,因為尚未針對 Fable 5.1 設定的閘道會拒絕它——請改在/model中選取);timeFormat/timeZone;自動模式的「Containment Escape」規則(雲端中繼資料憑證擷取、出口規避與跨租戶存取不會自動核准,除非環境將其標記為預期行為);CLAUDE_CODE_SUBAGENT_MODEL_FORCE;第一次讀取工作目錄之外的檔案前的一次性提示,加上permissions.blockReadsOutsideWorkingDirectories;/effort s與以工作階段為範圍的--effort;專案/本機的defaultMode: "bypassPermissions"會被忽略;managedSourcesBehavior: "merge"的細部調整(sandbox.credentials.awsPairs與sandbox.ripgrep會整體從設定它們的最高層來源讀取);BashRead()/Edit()拒絕規則涵蓋< file輸入重新導向以及tac、egrep等讀取指令;以及--add-dir、/add-dir與additionalDirectories對網路路徑(UNC 共用、/net/<host>自動掛載)的拒絕。v2.1.258 修正的來源:未發佈的 2.1.255 所引入的 macOS 12 啟動回歸,以及遠端/排程工作階段在需要非空內容的請求上失敗。v2.1.259 各項目的來源:
managedMcpServers;allowedMcpServers的範圍改為僅限使用者新增的伺服器;--permission-prompts none(任何原本會提示的操作都會自動拒絕,而目前的權限模式仍持續做決定);無法解析的受管設定會拒絕啟動並指出來源;自訂指令與 skills 的 frontmattermodel:在互動式工作階段中會被採用,而自動模式會保留工作階段模型,不會在不支援的 frontmatter 模型上執行回合;claude plugin validate --json;以及 BashRead()拒絕涵蓋範圍延伸至選項值/運算元(--ignore-revs-file=.env、-f.env、@file引數、git diff/git grep運算元、cd DIR && cat FILE複合指令,以及對含有遭拒檔案的目錄執行grep -r/cp -r現在會詢問)。設定文件尚未記載timeFormat/timeZone或managedMcpServers,CLI 參考也尚未列出--permission-prompts;截至2026年9月3日,CHANGELOG 是這些項目的來源。 ↩ -
Claude Code v2.1.265 版本資訊,發布於2026年9月8日 20:37 UTC,以及同日的正式 CHANGELOG(發布內文與 CHANGELOG 章節完全相同)。當日的 npm dist-tags:latest 與 next 皆為 2.1.265,stable 為 2.1.236;npm 已發布版本從 2.1.261 跳至 2.1.263 再到 2.1.265 – 2.1.262 與 2.1.264 從未發布(與 2.1.244/2.1.249/2.1.253-256 相同的模式)– 而 2.1.263(9月6日發布)僅載明 “Bug fixes and reliability improvements”。本註為下列內容的來源:
--plugin-dir指向含多個 plugins 的資料夾(”each child folder with a manifest loads, and children added or removed while running are picked up”);兩項提示快取前綴修正,原文:”Fixed resuming a foreground-spawned subagent changing its tool list and system prompt prefix, which broke prompt-cache reuse for that agent” 以及 “Fixed agent teammates and resumed subagents moving SubagentStart hook context and preloaded skills out of the prompt prefix on later turns, which broke prompt-cache reuse”;非互動式工作階段(搭配 stream-json 輸入的-p、Agent SDK、雲端工作階段)不再於每則新使用者訊息時重設 shell 工作目錄,因此cd可跨回合保留;設定為
http但僅支援舊版 HTTP+SSE 傳輸的 MCP 伺服器,現在會依 MCP 規範所述回退至 SSE;儲存至磁碟的工具結果設有 1 GB 上限,且對話內預覽會註明已儲存的檔案是否遭截斷;受管理設定中含forceLoginGatewayUrl的機器自啟動起即為 Claude apps gateway 工作階段,如同forceLoginMethod: "gateway",殘留的 claude.ai 登入或 API 金鑰不會被使用;Claude apps gateway 工作階段會將 OpenTelemetry 直接匯出至 gateway 受管理設定在OTEL_EXPORTER_OTLP_ENDPOINT中指定的收集器,而非透過 gateway 的中繼(未指定收集器的工作階段仍使用中繼),且 Claude Desktop 與 Cowork 透過 Claude apps gateway 傳送的遙測資料新增了user.email與user.groups,與終端機工作階段一致;雙鍵鍵盤快捷鍵會等待第二個按鍵 3 秒,逾時則顯示通知,先前若第二個按鍵在超過一秒後才到達(如在 tmux 內的情況)會默默取消;以及在提示中途輸入的斜線命令會以清單顯示相符項目(非全螢幕時以 Tab 開啟),而非僅顯示單一建議,且 plugin skill 可用其簡短名稱找到。 ↩↩ -
Claude Code 版本說明 v2.1.266(2026年9月8日)、v2.1.267(9月9日)、v2.1.268(9月10日)、v2.1.269(9月11日)、v2.1.270(9月12日)、v2.1.271(9月14日)及 v2.1.272(npm 於9月14日發布,GitHub 版本於9月15日 00:42 UTC 發布),以及2026年9月15日的正式 CHANGELOG – 七個版本的說明內容與其 CHANGELOG 章節完全一致。9月15日(約 13:15 PT)的 npm dist-tags:latest 2.1.272、next 2.1.273、stable 2.1.236;2.1.273(9月15日 18:06 UTC 發布)沒有 GitHub 版本,也沒有 CHANGELOG 章節,因此其內容未收錄於此;2.1.263 仍只寫著「Bug fixes and reliability improvements」– 從未補上任何說明。以下內容的出處(引述處皆為原文):
/output-style的回歸(”Added/output-style [name]to list and switch output styles, including over Remote Control and in cloud and other headless sessions”,v2.1.269);claude plugin eval(”run a plugin’s eval suite against Claude Code and get scored, reproducible results (JSON + HTML report)”,v2.1.269);Claude Code Remote 工作階段中的 fast mode(”cloud and self-hosted runners: the host’s fast-mode setting or/fasttyped in the session applies where your organization allows it”,v2.1.271)以及/fast off的修正;maxEffortLevel設定(”top-level or per model undermodelSettings: caps the effort level on every provider, including Bedrock, Vertex and Foundry; users can still pick a lower level”,v2.1.267);--system-prompt-snapshot off(v2.1.267);v2.1.267 的 prompt-cache 穩定性修正批次(恢復工作階段時的工具清單、工具描述與 MCP 宣告文字的改寫;/model切換時重新傳送每一個工具定義,署名文字改為對話備註;--system-prompt/--append-system-prompt工作階段只記錄一次提示詞與工具定義;工作階段中途加入的 MCP 與 plugin 工具改為延遲載入的定義);固定預設 effort 模型(Opus 4.7、Opus 4.8、Fable 5;v2.1.267)上effort:frontmatter 的修正;marketplace 反斜線隔離修正(v2.1.267);任務追蹤工具的允許清單(「Changed the task-tracking tools (TaskCreate/Get/Update/List, TodoWrite) to be offered only on」Claude 3.x、Opus 4.0 至 4.7、Sonnet 4.0 至 4.6 與 Haiku 4.5,並附「setCLAUDE_CODE_ENABLE_TODO_TOOLS=1elsewhere」,v2.1.268);符號連結目錄與env -C/eval拒絕規則的修正(v2.1.268);WebFetch 與 Artifact 規則的拆分(”Changed plainWebFetchdeny and ask rules to no longer apply to Artifact tool reads and updates; use anArtifactrule (orWebFetch(domain:claude.ai)) to block or gate them”,v2.1.268);/plugin變更於選單關閉時生效(v2.1.268);WebFetch 的 300 秒期限與CLAUDE_CODE_WEBFETCH_DEADLINE_MS(v2.1.268);gatewayInternalNetworks、空白allow_cidrs的警告,以及 gatewaypricing:費率同步(v2.1.268),再加上multiplier可高於 1 並最高至 10(v2.1.271);${VAR}與 git URL 的機密防護修正(v2.1.268);claude auth status --json中的configDirectory(v2.1.268);第三方ANTHROPIC_BASE_URLHTTP 400 迴歸問題的修正(v2.1.268);bashEditDiffEnabled(v2.1.269);署名提醒的修正(”Fixed the attribution reminder overriding a CLAUDE.md or memory rule against commit and pull request attribution; lines set by managed settings still apply”,v2.1.269);環境變數OTEL_METRICS_INCLUDE_REPOSITORY、CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS(1-256)、CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS(預設 3 秒)及CLAUDE_CODE_BG_TASKS_REPORT_RUNNING(v2.1.269);v2.1.247 鍵盤迴歸問題的修正,以及透過 SSH 的 kitty 查詢鍵盤支援(v2.1.269);Edit()/tee、Bash(tee:*)與開頭!的範圍判定修正(v2.1.269);啟用沙箱的 auto mode 下,Bash、PowerShell 與 Monitor 的逐命令allowed_domains(v2.1.271);omitClaudeMdagent frontmatter 與--agentsJSON(v2.1.271);auto mode 的行內!與 subagent 交還機制的變更(v2.1.271);claude plugin install/update的--accept-command <sha256>(v2.1.271);--resume在不同模型系列間保留[1m](v2.1.271);無法讀取的managed-mcp.json改為預設拒絕(v2.1.271);fmt/column、萬用字元展開、變數宣告旗標與blockReadsOutsideWorkingDirectories檢查器的修正(v2.1.271);以及 Markdown artifacts 改以具樣式的文件頁面呈現,artifact 監看數提高至 10(v2.1.271)。v2.1.266 只有一行(CLAUDE_CODE_USE_GATEWAY迴歸問題的修正),v2.1.270 只有一行(v2.1.269 git 提示迴歸問題的修正),而 v2.1.272 僅寫著「Bug fixes and reliability improvements」。 ↩↩↩ -
Claude Code 版本說明 v2.1.274(發布於 2026年9月17日 00:12 UTC,108 個項目)、v2.1.275(9月17日 22:33 UTC,96 個項目)與 v2.1.276(9月18日 02:12 UTC,一行),以及2026年9月17日的正式 CHANGELOG:三份版本說明內文與其 CHANGELOG 章節逐位元組相同。9月17日(約太平洋時間 22:08)的 npm dist-tags:latest 與 next 皆為 2.1.276,stable 為 2.1.267。以下項目的來源,引用處皆為原文:claude.ai 同步(”新增將您 claude.ai 帳號上啟用的 skills 與 plugins 同步至以該帳號登入的終端機工作階段;以
syncClaudeAiSkills: false或syncClaudeAiPlugins: false選擇停用”,v2.1.275);立即送出鍵(”新增立即送出鍵(ctrl+enter,或 ctrl+x ctrl+s),可中斷目前回合並一次送出所有排隊中的訊息;已送出與排隊中的訊息會以灰色顯示,直到模型接收為止”,v2.1.275);/plugin install <plugin> --marketplace <source>(”會在安裝 plugin 前主動提議加入該 marketplace”,v2.1.275);npm plugin 來源強化(”變更從 npm 來源安裝的 plugins,改以npm pack --ignore-scripts取得並驗證完整性,因此套件的安裝指令碼不再執行”,v2.1.275);同步帳號 skills 的 Write/Edit 結果(”現在會說明變更未儲存至您的帳號,以及如何儲存”,v2.1.275);分頁圖示變更(”變更 Artifact 工具,首次發布時改為要求一個單字的分頁圖示,而非 emoji favicon”,v2.1.275);CLAUDE_CODE_MCP_STARTUP_WAIT_MS(”用於限制第一個非互動式回合等待 MCP 伺服器連線的時間(0= 不等待)”,v2.1.274);MCP 用戶端預設值(”變更 Bedrock、Vertex、Foundry 與停用遙測的安裝,預設改用 v2 MCP 用戶端,並與直接 HTTP 伺服器採用 MCP 2026-07-28 協商,與其他安裝一致(選擇停用:MCP_SDK_GENERATION=v1或MCP_PROTOCOL_NEGOTIATION=legacy)”,v2.1.274);舊版 HTTP+SSE 4xx 修正(”修正了設定為http且僅支援舊版 HTTP+SSE 的 MCP 伺服器,在以 422 或其他 4xx 錯誤回應第一個請求時無法連線的問題”,v2.1.274);"type": "sdk"略過(”變更.mcp.json、設定、plugins 與 agent 檔案中的"type": "sdk"MCP 項目,改為略過並顯示警告:只有 SDK 宿主應用程式才能註冊行程內伺服器”,v2.1.274);命名變更(”變更/status的 GitHub 行文字為 "Cloud sessions",並將/web-setup、/ultrareview與 teleport 訊息改為顯示 "cloud session" 而非 "Claude Code on the web"“,v2.1.274);artifact 監看(”變更本機工作階段中的 artifact 監看:在其他地方發布的新版本不再啟動回合;Claude 會從之後的 Artifact 工具結果得知”,v2.1.274);以及 v2.1.276 的回歸修正(”修正了當ANTHROPIC_BASE_URL指向 proxy 或閘道時,每個請求都以400 … Input tag 'advisor_20260301'失敗的問題(2.1.275 回歸)”)。 ↩↩ -
Claude Code 版本說明 v2.1.277(npm 發布於 2026年9月18日 16:22 UTC;GitHub release 為 18:06 UTC)與 v2.1.278(npm 為 9月19日 01:48 UTC;GitHub release 為 03:10 UTC),以及2026年9月21日的正式 CHANGELOG。本指南中所有 v2.1.277 與 v2.1.278 項目的來源。關鍵引文:”新增 AGENTS.md 支援:在沒有 CLAUDE.md 的專案中,Claude Code 會改為讀取 AGENTS.md;可在
/config的 "Project instructions" 下變更(Bedrock、Vertex 或 Foundry 尚未支援)”;”變更 Claude API 與 Enterprise 使用者,以及 Bedrock、Vertex、Foundry 與閘道上的 auto 模式,預設改用伺服器端分類器,該分類器不收取分類器額外費用”;”在/status新增Auto mode server列,顯示此工作階段的 auto 模式分類器是否在伺服器上執行”。於 2026年9月21日取得的佐證文件:Memory,AGENTS.md 章節(載入矩陣、Project instructions 的值、agents-md@builtin的pluginConfigs位置、不會讀取的檔案)與 Auto 模式分類器請求費用(備援通知文字與送達方式、/status列的值、閘道直通,以及該變數的暫時性狀態)。 ↩ -
Claude Code v2.1.281 版本說明(npm 於2026年9月23日 17:01 UTC 發布;GitHub 發布版本為 19:19 UTC;176 個條目,與正式 CHANGELOG 的 2.1.281 章節完全一致,擷取於2026年9月24日,該檔案從 2.1.280 連續涵蓋至 2.1.281,沒有缺漏)。本指南中每一項 v2.1.281 內容的資料來源。9月24日的 npm dist-tags:latest 與 next 為 2.1.281,stable 為 2.1.273。關鍵引文:「Changed send now (ctrl+enter or ctrl+x ctrl+s) to move running tools to the background instead of cancelling the turn」;「Changed
CLAUDE_CODE_AUTO_MODE_SERVERto also apply on a direct Anthropic API connection:0opts out of the server-side auto mode classifier (the local classifier then counts toward usage),1opts in」;「Changed the dangerousrmprompt in--dangerously-skip-permissionsand auto mode to wait 2 minutes for an answer, then deny the command with a rewrite hint」;「Added"attribution": falseinsettings.jsonto hide all commit and PR attribution」。移除/agents精靈一事出自同一份 CHANGELOG 的 2.1.198 章節:「Removed the/agentswizard; ask Claude to create or manage subagents, or edit.claude/agents/directly.」auto mode 分類器計費文件,擷取於2026年9月24日,當時仍寫著「The variable isn’t read on a direct connection to the Anthropic API」;到了9月26日,該頁面已改為「On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later.」同日的設定參考記載了attribution物件,並將includeCoAuthoredBy標示為已棄用;到了9月26日也一併記載了false這個值。 ↩ -
Claude Code v2.1.285 版本說明(npm 於 2026年9月29日 17:32 UTC 發布;GitHub 發行於 19:27 UTC;共 136 條項目,與正式 CHANGELOG 的 2.1.285 章節完全一致,2026年9月29日擷取)。本指南中所有 v2.1.285 項目的來源。9月29日的 npm dist-tags:latest 與 next 為 2.1.285,stable 為 2.1.280。重點引文:”Changed
claude -pand Python Agent SDK sessions on third-party providers or with telemetry off to start in auto mode when no permission mode is configured, like interactive sessions;--permission-modestill overrides it”;”AddedallowedProvidersmanaged setting to limit which API providers a machine may use”;”Addedclaude --desktopto open the Claude desktop app on the current directory, or on a session with--continue/--resume <id>“;”AddedCLAUDE_CODE_DISABLE_WEB_FETCHenvironment variable to turn off the WebFetch tool”;”Changed background Bash and PowerShell commands to stop after a time limit (theirtimeoutwithrun_in_background, default 30 min, max 2 h)”;”Changed sessions behind a customANTHROPIC_BASE_URLto use the 1M context window of models that have one (Opus 4.7+, Sonnet 5+, Fable); run/autocompact 200kif your gateway stops at 200K”;”Changed sandbox settings so project settings cannot widen or turn off an admin-required sandbox”;”Changed/config chrome=trueto direct you to the /config panel instead of enabling Claude in Chrome by default”。 ↩ -
Claude Code v2.1.286 版本說明(npm 於 2026年9月30日 17:14 UTC 發布;GitHub 發行於 19:10 UTC;共 88 條項目,與正式 CHANGELOG 的 2.1.286 章節完全一致,2026年10月1日擷取,該紀錄從 2.1.285 到 2.1.287 連續無缺漏)。本指南中所有 v2.1.286 項目的來源。重點引文:”Changed
--bareto connect only the MCP servers named on the command line, send the model no system reminders, and start no background tasks”;”Fixed every turn failing when the Anthropic API refuses the model your default or a model alias resolves to: Claude Code now retries once on the previous model of the same tier”;”Changed/hooksto open on one list of your configured hooks grouped by event”;”Fixedclaude auth statusreporting a Console sign-in’s stored API key asclaude.ai; it now reportsapi_key“;”Changed plugin installs to refuse npm sources that are git repositories or folders, and to install plugin dependencies only from registry packages”;”Changed how failed API requests are retried: one limit now covers a whole model call, so with the default retry settings a failing call sends at most 14 requests”。 ↩ -
Claude Code v2.1.287 版本說明(npm 於 2026年10月1日 16:59 UTC 發布;GitHub 版本 18:00 UTC;共 106 個項目,與正式 CHANGELOG 的 2.1.287 章節完全一致,於 2026年10月1日擷取)。本指南中所有 v2.1.287 項目的來源。10月1日的 npm dist-tags:latest 與 next 為 2.1.287,stable 為 2.1.285。重點引述:「Changed Opus 4.7+ and Fable to use a 1M context window by default on Bedrock, Vertex, Foundry and the Claude apps gateway, with no
[1m]suffix (CLAUDE_CODE_DISABLE_1M_CONTEXT=1keeps 200K)」;「Added Claude Mods: plugins may now modify deeper behavior」;「Added You should know, a built-in mod where a side agent watches your back and flags things you or Claude might miss」;「Added URL prompts from MCP servers on the 2025-11-25 protocol」;「Changed MCP serveralwaysLoad: falseto defer all of that server’s tools behind tool search」;「setCLAUDE_AX_PREPARK_MS=50to restore the pause」;「Changed automatic model switches after a flagged message to keep your current effort level instead of the new model’s default」;「Changed whole-toolBashallow rules and allowing hooks to prompt for, not run, shell writes to files Claude Code’s file tools refuse outright」;「Addedprompt_textto the OpenTelemetryuser_promptevent」。 ↩↩ -
Claude Code 文件,於 2026年10月1日擷取。權限模式:對於
claude -p或 Agent SDK,「defaultin sessions that fetch feature flags. In sessions that don’t, such as on a third-party provider or with telemetry off,autowith Claude Code v2.1.285 or later」。Mods 概覽:「Mods 預設為開啟。在終端機中,請使用 Claude Code v2.1.287 或更新版本」;「Mods aren’t sandboxed」;自 v2.1.287 起CLAUDE_CODE_ENABLE_FUNCTION_HOOKS會被忽略;cc-plugin-you-should-know為「Disabled by default」。模型設定:發生回退後,Claude Code「會保留被標記的請求執行時所用的 effort 等級」;「Opus 4.6 and Sonnet 4.6 reach 1M only through their[1m]variant」;閘道 1M 段落與/autocompact 200k。Amazon Bedrock 與 Agent Platform:「To enable it for a manually pinned model instead, append[1m]to the model ID.」環境變數:CLAUDE_AX_PREPARK_MS「Default0… Before v2.1.287, the default was50」;CLAUDE_CODE_DISABLE_WEB_FETCH「The WebSearch tool stays available. Requires Claude Code v2.1.285 or later」。Headless:「Before v2.1.286, these limits held only partly」。Agent 檢視:n:<text>篩選器與「A reply that is exactly/stopstops the session at once.」設定參考:allowClaudeInChromeWithManagedMcp(「Requires Claude Code v2.1.282 or later」)與allowedProviders項目。MCP 頁面並未列出bareElicitationCapability。2026年11月25日重新讀取;措辭已有變動的引文,改以當日的措辭呈現。 ↩↩↩ -
Claude Code 正式 CHANGELOG 的 2.1.288 章節,於 2026年10月6日擷取,以及同日讀取的
@anthropic-ai/claude-codenpm 登錄檔中繼資料:2.1.288 於 2026年10月2日 18:30 UTC 發布,2.1.289 於 10月3日 20:12 UTC,2.1.290 於 10月5日 18:12 UTC,2.1.291 於 10月6日 03:32 UTC,2.1.292 於 10月6日 17:10 UTC;dist-tags 的 latest 與 next 為 2.1.292,stable 為 2.1.285。CHANGELOG 從 2.1.287 到 2.1.292 連續無缺漏。本指南中所有 v2.1.288 項目的來源。重點引述:「Changedclaude project purgetoclaude purge; the old name still works and prints a notice」;「Changed the background command time limit to apply only in unattended sessions (-p, Agent SDK, CI, cloud); terminal, desktop app and VS Code sessions have no limit」;「Added--max-findings <n>|allto /code-review」;「addedCLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTSto turn structured outputs off」;「Changed the client-side auto mode classifier to ignore anANTHROPIC_DEFAULT_SONNET_MODELpin that names Claude Sonnet 5.5 or Opus 5.5 and use Claude Sonnet 5 instead」;「requests now time out after 60s (per-serverrequestTimeout)」。 ↩ -
Claude Code 正式 CHANGELOG 的 2.1.289、2.1.290 與 2.1.291 章節,於 2026年10月6日擷取。本指南中所有 v2.1.289、v2.1.290 與 v2.1.291 項目的來源。重點引述:「Fixed a regression in 2.1.290 where cloud sessions could drop answers to permission prompts」;「Fixed a regression in 2.1.288 where the last messages of a session could be lost when quitting」;「Changed the interactive session’s WebSearch budget to refill over time (100 calls/hour;
CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOURsets the rate, 0 turns it off) instead of ending after 200 calls」;「Changed Claude in Chrome so that a project’s settings files can no longer turn it on; use--chrome,/chromeor your user settings」;「Changed the Bash tool to ask for permission before runningpyright, which is no longer treated as a read-only command」;「ChangedCLAUDE_CODE_DISABLE_ATTACHMENTSso a repository’s.claude/settings.jsonor.claude/settings.local.jsoncan no longer set it」;「Addedagent.spawnfor teammates, one agent id across plugin hook events, and idle and waiting states in$.agent.list()」。 ↩↩ -
Claude Code 正式 CHANGELOG 的 2.1.292 章節,於 2026年10月6日擷取。本指南中所有 v2.1.292 項目的來源。重點引述:「Added
CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MSenvironment variable to set a longer base delay for the backoff when retrying an overloaded (529) request」;「Added aneffortparameter to the Agent tool」;「Added--marketplace <source>toclaude plugin install」;「Changed local (stdio) MCP server connections to negotiate protocol version 2026-07-28 by default on every install, including Bedrock, Vertex and Foundry;MCP_PROTOCOL_NEGOTIATION=legacyopts out」;「Security: Fixed PreToolUse hook approvals and auto mode bypassing the permission prompt for file reads from network (UNC) paths」;「Changed agent names to allow at most 256 characters」。 ↩↩↩ -
Claude Code 文件,擷取於2026年10月6日。環境變數:
CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS「需要 Claude Code v2.1.288 或更新版本」;CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION仍為「(預設:200)」;沒有CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS或CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR的條目。CLI 參考與 Agent 檢視:claude attach和claude logs的部分工作階段名稱需要 v2.1.290;列出了claude purge。Claude 目錄:「在 v2.1.288 之前,此命令為claude project purge。」工具參考:「在 v2.1.288 之前,它適用於每個工作階段」(背景命令的時間限制)。程式碼審查:--max-findings「需要 Claude Code v2.1.288 或更新版本」。快捷鍵:agents:find、agents:rename、agents:previousGroup、agents:nextGroup,v2.1.288。記憶:「當 Claude 對相符的檔案使用 Read、Write 或 Edit 工具時,就會載入以路徑限定範圍的規則」。MCP:stdio 協商仍描述為「對 Claude Code v2.1.285 或更新版本,在 Claude Code 擷取功能旗標的工作階段中」啟用。Plugin CLI 參考:--marketplace僅列於/plugin install;marketplace 資訊清單的驗證行為「需要 Claude Code v2.1.289 或更新版本」。Mods 參考:寫明「截至 v2.1.289」;列出了帶有e.isTeammate的agent.spawn以及$.ui的selection。Sub-agents:effort僅記載為 frontmatter 欄位;name是「最多 256 個字元的唯一識別碼」,名稱「超過 256 個字元」的檔案會被略過,並在除錯記錄中寫入錯誤(10月6日稍後再次擷取)。設定參考:claudeInChromeDefaultEnabled的範圍為「全域設定」。命令:/claude-api列出managed-agents-onboard。搭配 Chrome 使用 Claude Code:「在 CLI 工作階段中執行/chrome,並選擇預設開啟 Chrome 的選項」;該頁面未提及 v2.1.290 的專案設定變更。2026年11月25日重新讀取;措辭已有變動的引文,改以當日的措辭呈現。 ↩↩↩ -
Claude Code 文件,擷取於2026年10月11日。Hooks:
onFailure是「hook 失敗時,觸發該 hook 的動作是否繼續進行:"continue"或"block"……需要 Claude Code v2.1.295 或更新版本」;它所計入的失敗包括「無法啟動」、「結束代碼不是 0 或 2」、「HTTP 錯誤」、「逾時」與「無效輸出」;「設為"block"時,失敗的效果等同於該事件上的結束代碼 2,但在PermissionRequest上則會拒絕該請求」;「此欄位對」Stop、SubagentStop、TaskCompleted、TeammateIdle以及背景(async、asyncRewake)命令 hooks「沒有作用」。環境變數:CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS「當 API 以529過載錯誤拒絕請求時,重試之間退避的起始延遲毫秒數(預設:500)……請以純數字提供 500 至 32000 之間的整數毫秒……需要 Claude Code v2.1.292 或更新版本」;CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS「未設定時,等待沒有上限。需要 Claude Code v2.1.295 或更新版本」;CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR「在互動式終端機工作階段中預設為100。在非互動式工作階段中預設為0,即關閉補充」;CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS「Claude 使用allow_large參數進行的讀取,在上下文視窗仍有空間時可以超過此上限」;VERTEX_REGION_CLAUDE_HAIKU_5_5「於 v2.1.293 新增」;沒有CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS或CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL的條目。2026年11月25日重新讀取;措辭已有變動的引文,改以當日的措辭呈現。Sub-agents:
skills欄位預載「清單中最前面的 32 個不同名稱」;每次呼叫的effort參數「會覆寫effort欄位,並在 subagent 恢復時持續生效……需要 Claude Code v2.1.292 或更新版本」;autoCompactWindow不在所列的 frontmatter 欄位之中。狀態列:agentType「需要 Claude Code v2.1.293 或更新版本」。MCP:「Claude Code 預設會向 stdio 伺服器要求該修訂版。若要讓 stdio 通道伺服器維持在較早的交握方式,請將MCP_PROTOCOL_NEGOTIATION設為legacy,這會讓每個伺服器都維持在該方式。」Plugin CLI 參考:claude plugin install接受--marketplace <source>,「需要 Claude Code v2.1.292 或更新版本」。Mods 參考:仍寫明「截至 v2.1.290」;沒有$.ui.notify或prompt.autocomplete的條目。 ↩ -
Claude Code v2.1.229 版本說明,2026年8月12日。新增
claude remote-control --continue、供自架執行器使用的伺服器端提供 hooks、閘道串流的 SSE keepalive ping、具mode: "link"的 plugin 市集command來源、ListAgents的offline/cloud標籤、工作流程扇出前綴錯開(CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS=0可停用)、加括號 IPv6 位址的沙箱網域清單改為失敗即封閉、/commit-push-pr對危險旗標的提示、Windows 上的--base-dir必填要求、VSCode 工作階段群組,以及可調整大小的/btw。修正項目包括串流重複、窄終端機的 RangeError 當機、\\?\/UNC 路徑當機、自動模式歸屬標頭失效、閘道拒絕 1M/model、MCP OAuth 的127.0.0.1重新導向、GitHub Action 審查發布,以及 IDE 診斷停滯。擷取於2026年8月12日。 ↩ -
Claude Code v2.1.156 版本說明、Claude Code v2.1.157 版本說明、Claude Code v2.1.158 版本說明、Claude Code v2.1.159 版本說明,以及 Claude Code Changelog(正式版)。v2.1.156(2026年5月29日)修正了一項 Opus 4.8 思考區塊變動的問題,該問題先前以 API 錯誤的形式浮現;2.1.155 從未發布。v2.1.157(2026年5月29日)讓
.claude/skills/外掛無需在 marketplace 註冊即可自動載入、新增claude plugin init <name>鷹架、為/plugin提供引數自動完成、讓EnterWorktree可在工作階段中切換由 Claude 管理的 worktree、在 agent 完成後保持背景 worktree 處於未鎖定狀態(使git worktree remove/prune無需手動解鎖即可運作)、在OTEL_LOG_TOOL_DETAILS=1時於tool_decision遙測事件中納入tool_parameters,並修正下列問題:無法處理的圖片導致當機(現改為文字占位符)、桌面 / IDE / SDK 介面在 auto/bypass 模式下的沙箱網路權限提示、背景工作階段的 retire-on-park、agents 清單中以 Esc 取消「opening…」、背景 worktree 被30天保留清理機制孤立、--resume的背景 subagent 回報、tmux + VS Code + Cursor + Windsurf 的終端機渲染 / 剪貼簿、WSL 的圖片 / 螢幕截圖 / 拖曳路徑、長時間恢復對話的效能,以及/terminal-setup停用整合式終端機中的 GPU 加速。v2.1.158(2026年5月30日)透過CLAUDE_CODE_ENABLE_AUTO_MODE=1讓 Bedrock、Vertex 與 Foundry 上的 Opus 4.7 與 Opus 4.8 可使用 Auto Mode。v2.1.159(2026年5月31日)僅為內部基礎建設更新,未宣布任何使用者可見的變更。擷取於2026年5月31日。 ↩ -
Claude Code的正式CHANGELOG,2.1.299章節,擷取於2026年10月14日,以及同日讀取的
@anthropic-ai/claude-code之npm registry中繼資料:2.1.299於2026年10月14日00:23 UTC發布,2.1.300於14:27 UTC發布;dist-tags為latest 2.1.299、next 2.1.300、stable 2.1.287;npm上沒有2.1.297或2.1.298,CHANGELOG也沒有這兩版或2.1.300的章節。GitHub發行版(02:49 UTC)包含190條項目,與CHANGELOG完全相同。本指南中所有v2.1.299項目的來源。重點引述:「終端機新增閒置壓縮:超過200K token的對話若閒置約54分鐘,會在其一小時提示快取過期前先行壓縮,讓您的下一則訊息不必重新處理全部內容」;「新增CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS以變更閒置壓縮的200K token下限;在settings.json中設定"idleCompaction": false可將其關閉。兩者皆需v2.1.290或更新版本」;「新增CLAUDE_CODE_DISABLE_FILE_MENTIONS環境變數:Claude只會取得@檔案提及的路徑,再以其檔案工具讀取,而非直接取得檔案內容」;「MCP允許規則現在只涵蓋其指名的伺服器:mcp__a不再允許名為a__b或a_的伺服器;請以伺服器完整的正規化名稱寫成mcp__<server>__*」;「agent的
tools:清單現在只納入指名MCP伺服器的工具;名稱含有__的伺服器請寫成mcp__<whole name>__*」;「來自Anthropic位於api.anthropic.com的第一方MCP伺服器之MCP工具描述與伺服器指示,現在會完整送達Claude,而不再於4,096個字元處截斷」;「雲端工作階段與Remote Control的MCP連接器,在未擷取任何旗標的安裝上,現在預設協商MCP協定版本2026-07-28;可透過MCP_PROTOCOL_NEGOTIATION=legacy選擇退出」;「UserPromptSubmithooks現在會在skill或自訂斜線命令展開之前執行,因此封鎖提示的hook現在也會一併阻止其內嵌的shell命令」;「turn.startmod hook現在也會收到subagents與隊友的回合,而不只是主迴圈的回合;可透過e.agentId區分(主迴圈上不存在此欄位)」;「修正了對不執行rm的shell-c指令碼仍跳出rm提示的問題。在Claude Code無法讀取的指令碼中於執行期組成的rm,不再觸發提示,除非設定CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT=1」;「為
claude self-hosted-runner orchestrator新增--shutdown-drain-sec:收到SIGTERM時停止輪詢,並給予進行中的輪詢與執行中的spawn hooks至多該秒數的時間完成」;「為claude plugin eval新增--disallow-tools與disallowed_tools案例欄位,可將Agent等特定內建工具排除在eval執行之外」;「新增關閉Claude Desktop的Code分頁中署名區塊的支援:在Claude apps gateway的code政策之env中設定CLAUDE_CODE_ATTRIBUTION_HEADER=0」;「在agent檢視中新增/effort與/fast,用於設定新工作階段的起始值;在該處單獨輸入/model、/effort或/fast現在會開啟選擇器」;「當plugin hook無法接收動作或無法回傳其判定時,該hook可封鎖的動作現在會被拒絕而非放行;已執行的工具,其結果會被扣留」;「修正2.1.296的回歸問題:雲端與無頭工作階段在重新啟動後恢復時,若恰好有新訊息抵達,可能會將已核准的工具呼叫執行兩次」;「網路安全防護通知不再要求使用者申請Cyber Verification Program」。 ↩↩ -
Claude Code 文件,擷取於2026年10月14日。設定參考:
idleCompaction,「阻止 Claude Code 壓縮您已離開的冗長對話」;「符合條件的對話預設會啟用閒置壓縮。若要關閉,請將idleCompaction設為false。需要 Claude Code v2.1.290 或更新版本」。環境變數:CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS「對話套用閒置壓縮的脈絡大小,以 token 計(預設值:200000)」,低於100000的值會被提高至100000;CLAUDE_CODE_DISABLE_FILE_MENTIONS「需要 Claude Code v2.1.299 或更新版本」,在專案與本機設定中會被忽略;CLAUDE_CODE_ATTRIBUTION_HEADER「設為0可省略署名區塊」;CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS「當 API 以529過載錯誤拒絕請求時,該請求各次重試之間退避時間的上限,以毫秒計(預設值:32000)」;仍然沒有CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL或CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT的條目。子代理:autoCompactWindow現已列為 frontmatter 欄位,「100000以上的 token 數」;tools與disallowedTools「也接受整個 MCP 伺服器的項目」。2026年11月25日重新讀取;措辭已有變動的引文,改以當日的措辭呈現。Mods 參考:仍然標示「截至 v2.1.290」;「在
skill.prompt上,e.source、e.pluginName、e.path、e.frontmatter與e.frontmatterProblem需要 Claude Code v2.1.299 或更新版本」;turn.start列於事件清單中;沒有$.prompt.media、$.session.identity、tabular或serverToolUses。Plugin evals:「在 v2.1.299 之前,這類執行是依其已產出的內容評分」;沒有--disallow-tools。MCP:限制清單仍寫著「伺服器指示,以及預先載入之工具的描述:4,096 個字元」,沒有第一方例外;在 v2 執行階段上,Claude Code「會詢問 HTTP、stdio 與 claude.ai 連接器伺服器是否支援較新的修訂版,並對支援的伺服器使用該版本」。權限:「允許規則只在字面的mcp__<server>__前綴之後才接受工具名稱 glob。伺服器區段不得含有 glob,如此規則才會指向您所設定的特定伺服器。」Hooks:有描述CLAUDE_CODE_DISABLE_FILE_MENTIONS(「您相符的 PreToolUse hooks 會執行」);沒有說明UserPromptSubmit會在 skill 或命令展開之前執行。 ↩↩ -
Claude Code 正式 CHANGELOG,2.1.300 章節,擷取於2026年10月14日(21:40 PT),以及同時讀取的
@anthropic-ai/claude-codenpm 註冊表中繼資料:2.1.300 於10月14日 14:27 UTC 發布;dist-tags 為 latest 2.1.300、next 2.1.300、stable 2.1.292(當天早上還是 2.1.287)。GitHub 發行版(18:24 UTC)包含 88 個條目,與 CHANGELOG 完全相同。本指南中每一項 v2.1.300 項目的來源。關鍵引述:「在 AWS 上的 Claude Platform 新增/advisor;在您透過/advisor、advisorModel或--advisor選定之前不會有任何 advisor 執行,而CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1會將其關閉」;「為 mod 的提示裝飾新增virtualText:繪製在提示框中的文字,永遠不會進入草稿或送出的提示」;「為 mods 新增$.ui.view({ agentId }):在您要求時於主檢視中顯示某個代理的逐字稿,而$.ui.view({})會返回」;「新增prompt.changemod hook,在提示框文字未經鍵入編輯而變更時觸發:召回的歷史條目、清除、復原,或是 plugin 的填入」;「在 OpenTelemetryapi_request事件中新增cache_creation_5m_tokens與cache_creation_1h_tokens,依存留期區分快取寫入」;「在追蹤 span 中新增 OpenTelemetry GenAI 語意慣例屬性,例如
gen_ai.provider.name、gen_ai.conversation.id、gen_ai.tool.name與error.type」;「將傳送至 api.anthropic.com 的大型請求改為即使停用遙測也使用 gzip 壓縮;設定CLAUDE_CODE_GZIP_REQUEST_BODIES=0可將其關閉」;「變更 hooks:來自 PreToolUse 與 PermissionRequest hooks 的updatedInput現在會像 Claude 自身的輸入一樣進行驗證:未知的鍵會被捨棄,而被工具拒絕的輸入會使呼叫遭到拒絕」;「從claude remote-control移除原本沒有作用的--sandbox與--no-sandbox旗標;現在傳入任一旗標都會以錯誤結束。請在設定中設置sandbox.enabled以沙箱化工作階段」;「變更本機工作階段逐字稿,使其也記錄每個 API 請求的系統提示、工具與參數,讓您選擇分享的逐字稿能精確重現請求」;「變更結束行為:背景命令在被要求停止 1.5 秒後仍在執行時將被強制終止」;「修正在背景命令仍在執行時結束,SessionEnd hooks 有時不會執行的問題」;「修正claude daemon stop --any在卡住的背景服務仍在執行時仍印出「stopped」的問題:現在會等待、強制終止該服務,若服務仍在則以結束代碼 1 回報」。 ↩ -
Claude Code 文件,擷取於2026年10月14日。使用 advisor 工具升級困難決策:「advisor 工具屬於實驗性功能,需要 Anthropic API、AWS 上的 Claude Platform,或 Claude Models on Google Cloud (Anthropic managed)。在 AWS 上的 Claude Platform 或 Claude Models on Google Cloud (Anthropic managed) 上,需要 Claude Code v2.1.300 或更新版本。在 Amazon Bedrock、Google Cloud 的 Agent Platform 或 Microsoft Foundry 上無法使用」;「advisor 會收到完整的對話,包括每一次工具呼叫與結果,並回傳指引,由 Claude 在繼續之前套用」;「以伺服器工具的形式在 Anthropic 的基礎設施上於伺服器端執行,訂閱帳戶與以 API 計費的帳戶皆可使用」;「沒有任何設定可以限制或強制 advisor 呼叫」;三種啟用方式:「
/advisor命令」、「advisorModel設定」、「--advisor旗標」;/advisor的文字形式「需要 Claude Code v2.1.260 或更新版本」;「claude --help中並未列出--advisor」;配對列「Opus 4.7 或 Opus 4.8 | Fable、Opus 4.7 或更新版本、Sonnet 5.5」、「Sonnet 5.5 | Fable、Opus 5 或更新版本、Sonnet 5.5」、「Opus 5 或 Opus 5.5 | Fable、Opus 5 或更新版本」、「Fable 5.1 | Fable 5.2 或 Fable 5.1」;「Haiku 4.5 可以呼叫 advisor,但無法擔任 advisor」;「子代理會繼承設定好的 advisor,並依其自身的模型套用相同的配對檢查」;「若 API 拒絕 Claude Code 所附加之 advisor 的配對,Claude Code 會在不附加 advisor 的情況下重新傳送該請求。對話會在沒有 advisor 的狀態下繼續,因此您不會看到錯誤,也不會有任何 advisor 呼叫」;2026年11月25日重新讀取;措辭已有變動的引文,改以當日的措辭呈現。費用:「advisor token 依 advisor 模型的輸入與輸出費率計費」、「advisor 用量會計入您方案的用量上限,但 Fable advisor 會以用量點數計費」;「切換
/advisor會保留快取的前綴」;「advisor 模型自身讀取對話的部分不會被快取」;需求包括「功能旗標擷取」,因此若設定DISABLE_TELEMETRY,「advisor 會保持關閉」;CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1:「/advisor命令將無法使用,任何已設定的advisorModel都會被忽略。--advisor旗標會被接受但沒有作用」;逐字稿狀態「Reviewed」、「Declined」、「Unavailable」。CLI 參考:--advisor <model>「為此工作階段啟用伺服器端 advisor 工具,可使用模型別名fable、opus或sonnet,或完整的模型 ID。在此工作階段中優先於advisorModel設定」。設定參考:advisorModel「選擇 Claude 詢問 advisor 工具時由哪個模型回答」。環境變數:CLAUDE_CODE_DISABLE_ADVISOR_TOOL,以及CLAUDE_CODE_GZIP_REQUEST_BODIES「設為0可關閉傳送至api.anthropic.com的 Claude API、遙測與成品發布請求本文的 gzip 壓縮」。Mods 參考:仍然標示「截至 v2.1.290」;沒有virtualText、$.ui.view或prompt.change的條目。2026年11月10日重新讀取:該頁面現在寫著「advisor 工具屬於實驗性功能,需要 Anthropic API 或 AWS 上的 Claude Platform。在 AWS 上的 Claude Platform 上,需要 Claude Code v2.1.300 或更新版本。在 Amazon Bedrock、Google Cloud 的 Agent Platform 或 Microsoft Foundry 上無法使用」,且配對表格新增了幾列(請參閱 284)。 ↩ -
Claude Code 正式 CHANGELOG,2.1.301 與 2.1.302 兩節,擷取於2026年10月17日(太平洋時間 15:40),以及同時讀取的
@anthropic-ai/claude-codenpm registry 中繼資料:2.1.301 於10月15日 14:34 UTC 發布,2.1.302 於10月16日 16:48 UTC 發布;dist-tags latest 為 2.1.302、next 為 2.1.302、stable 為 2.1.292。GitHub 發行版 v2.1.301(19:22 UTC,51 項)與 v2.1.302(20:53 UTC,63 項)與 CHANGELOG 完全一致。本指南中所有 v2.1.301 與 v2.1.302 項目的來源。重點引文,2.1.302:”Changedclaude -pand Agent SDK sessions with no permission mode to start indefaultmode on third-party providers, with telemetry off or on a fresh install;--permission-mode autokeeps auto”;”Changed fork subagents (subagent_type: "fork") to be on by default inclaude -p, the Agent SDK, the desktop app and VS Code, as they already are in the terminal;CLAUDE_CODE_FORK_SUBAGENT=0turns them off, andclaude mcp servenever offers them”;”Changed the desktop app and VS Code to always run the main conversation’s subagents in the background, as the terminal does, rather than let Claude choose; a subagent’s own Agent calls inclaude -p, the Agent SDK, the desktop app and VS Code now run in the foreground by default”;“Changed prompt and agent hooks so that at most 12 of one event run at a time; the rest wait their turn”;”Added
CLAUDE_CODE_AUTO_MODE_MODELto choose the model the client-side auto mode classifier uses; it does not change the model for server-side auto mode”;”Added anIdle compactionrow to/configfor turning idle compaction off or back on; the notices shown after an idle compaction now say how to turn it off”;”Added a notice to/design-syncand/design-loginthat standalone Claude Design (claude.ai/design) closes by December 14, 2026”;”Fixed the Read tool loading an image file of any size, or a pipe or device named like an image, entirely into memory; image sources over 128 MB are now refused”;”Improved auto mode with the server-side classifier: a conversation too long for the safety check is now compacted, instead of every checked tool call being denied”。2.1.301:”Added
CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MSso unattended retry mode (CLAUDE_CODE_RETRY_WATCHDOG) ends a request at a usage limit that resets too far away instead of waiting”;”Added the%motion to vim mode: jump to the matching bracket, alone or with d/c/y”;”Addedrowsto a mod’sInput: a text field of several lines in the terminal, where Enter submits and Shift+Enter or a backslash before Enter starts a new line”;”Addedclassifier_verdictandpermission_modeto OpenTelemetrytool_decisionevents, so auto mode classifier decisions can be told apart from permission rules”;”Addedclassifier_categoryto OpenTelemetrytool_decisionevents, naming the built-in rule a classifier block matched, whenOTEL_LOG_TOOL_DETAILS=1“;”Fixed thefable(andbest) model alias erroring on the Anthropic API when the newest Fable model is not available to your organization: Claude Code now retries once on the previous Fable model”;”Improved switching to a model with a smaller context window: a conversation too long for the new model is now summarized by the previous model first”;”Changed a mod hook’s.catchhandler to run only when the hook throws or times out; events raised beneath the hook’s own calls now skip that hook without asking its.catch“;”Changed a mod’s$.env.setto resolve with{}once the variable is set or unset, or with{ deny }saying why when the write is not made”。 ↩ -
Claude Code 文件,擷取於2026年10月17日。互動模式:”
%| Jump to the matching(),[], or{}bracket, starting from the next bracket on the current line when the cursor isn’t on a bracket. Requires Claude Code v2.1.301 or later” 以及 “d%/c%/y%| Delete, change, or yank from the cursor through the bracket that%jumps to”。VS Code 頁面列出了 LaTeX 數學式渲染。仍停留在 2.1.302 之前規則的頁面:權限模式表格(”claude -por the Agent SDK |defaultin sessions that fetch feature flags. In sessions that don’t, such as on a third-party provider or with telemetry off,autowith Claude Code v2.1.285 or later”);環境變數頁面(CLAUDE_CODE_FORK_SUBAGENT“is on by default in interactive sessions only. Set to1to turn it on inclaude -pand the Agent SDK as well, or0to turn it off in every kind of session”);以及 subagents 頁面(”Fork mode is off in non-interactive mode with-pand in the Agent SDK unless you turn it on”)。文件中完全未提及的項目:
CLAUDE_CODE_AUTO_MODE_MODEL、CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS、tool_decision的classifier_verdict、permission_mode與classifier_category屬性(監控頁面一項都未列出)、/config的 Idle compaction 列、Claude Design 的關閉日期,以及 12 個 hooks 的上限(hooks:”All matching hooks run in parallel”)。mods 文件現已自成一節:概覽、參考(”Entries cover the Claude Code CLI and the Desktop app as of v2.1.290, and the VS Code extension as of v2.1.299”)、事件(.catch:”Whenguardthrows or times out on a Bash call, Claude Code calls the handler with the same event”,未納入 v2.1.301 的重入規則)、API,以及介面;這些新頁面皆未提及Input的rows、$.env.set、nothing-to-fork、virtualText、$.ui.view、prompt.change、$.prompt.media或$.session.identity。advisor 頁面仍寫著該工具 “is not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry”。 ↩ -
Claude Code CHANGELOG,v2.1.318 至 v2.1.322(提交時間為 2026-11-04T00:00Z、11-06T17:03Z、11-09T19:22Z 與 11-10T02:29Z),以及對應的 GitHub 發行版本 v2.1.318(2026-11-04T00:01:03Z)、v2.1.319(11-06T17:04:01Z)、v2.1.321(11-09T19:22:30Z)與 v2.1.322(11-10T02:29:43Z),各版內容均與其 CHANGELOG 章節完全一致(分別為 84、146、118 與 1 條項目);v2.1.320 沒有任何標籤、發行版本或 CHANGELOG 章節。npm 發布時間取自
npm view @anthropic-ai/claude-code time:2.1.318 為 2026-11-03T21:55:17Z、2.1.319 為 2026-11-06T00:58:56Z、2.1.321 為 2026-11-09T19:02:47Z、2.1.322 為 2026-11-10T01:58:41Z;2026-11-10 時的dist-tags:latest為 2.1.322、next為 2.1.322、stable為 2.1.311。2.1.321 原文:「Added Claude Fable 5.2 (claude-fable-5-2), now the default Fable model」,並附「1M context, $8/$40 per Mtok with $0.20/Mtok cache reads」;「Changed saved Fable 5.1 model picks to move tofable: on Pro and Max plans at once, on Team and Enterprise plans once your organization allows it; use/model claude-fable-5-1to switch back」;「Added--settings <file>toclaude remote-control, which applies a settings file to every session it starts」;「Changed mods Claude writes to turn on without asking in auto and bypass modes … and not to load indontAskmode」;「Changed mods’ own tool calls ($.tool.call,$.mcp.call) to raise no permission prompt」。2.1.322:「Added fast mode on Vertex in the global, us and eu regions, falling back to standard speed if Vertex refuses it」。2.1.319:「Changed auto mode with telemetry or feature flags off, including behind LLM gateways: calls the server can’t check are asked about or denied, with no fallback to the built-in classifier; set
CLAUDE_CODE_AUTO_MODE_SERVER=0to keep using it (Bedrock, Vertex and Foundry are unchanged)」;「Added support for MCP tasks in the terminal」;「Addedpermissions.denyInsteadOfPromptingsetting: a tool call that would wait on a permission prompt is denied and the turn continues, in terminal sessions, subagents and teammates」;「Added theCLAUDE_CODE_DISABLE_FEATURE_FLAGSenvironment variable, which stops feature-flag fetching without turning off telemetry」;「Changed MCP tasks to work in the terminal without feature-flag fetching (Bedrock, Vertex, Foundry, LLM gateways,DISABLE_TELEMETRY); setCLAUDE_CODE_DISABLE_MCP_TASKS=1to turn them off」;「Changed self-paced/loopto end when a turn finishes without rescheduling … setCLAUDE_CODE_LOOP_KEEPALIVE=1to keep the old behavior」;「Removedshortcuts_listandshortcuts_execute… from Claude Code’s built-in Claude in Chrome tools」。2.1.318:「Added the date a stored claude.ai sign-in ends toclaude auth status(loginExpiresAt) and toclaude -pJSON results (credential_expires_at)」;「Changed Claude Code to no longer install or update the IDE extension when started in an IDE terminal」;「Changed background subagents to move a shell command to the background after 3 minutes on all providers」。 ↩ -
Anthropic 文件,擷取於2026年11月10日。Claude Fable 5.2 模型總覽:「2026年11月9日發布」;「上下文視窗:1M token · 最大輸出:128K token · 輸入定價:$8 / MTok · 輸出定價:$40 / MTok」;定價表格(5 分鐘快取寫入 $10、1 小時快取寫入 $16、快取讀取 $0.20);「預設 effort |
high」;「可靠知識截止日期 | 2026年6月」;「需要 30 天的資料保留,除非經 Anthropic 明確授權,否則無法在 Zero Data Retention 下使用」;Mythos 5.2「與 Claude Fable 5.2 共用相同的規格與定價」。定價:Fable 5.2 這一列($8 / $10 / $16 / $0.20 / $40)、Fable 5.1 這一列($10 / $12.50 / $20 / $0.25 / $50)、「Claude Fable 5.2、Claude Mythos 5.2、Claude Fable 5.1 與 Claude Mythos 5.1 的快取命中與重新整理按基礎輸入價格的 0.025 倍計價」、快速模式表格(「Claude Fable 5.2 | $16 USD / MTok | $80 USD / MTok」),以及「Claude Fable 5.2 的快速模式也可在 Claude Models on Google Cloud 上使用」。推出 Claude Fable 5.2 與 Claude Mythos 5.2。模型設定:「
best| 使用與opus相同的模型」(Wayback Machine 於11月2日、6日與9日對同一頁面的存檔寫的是「在可使用 Fable 的環境中,使用fable別名所解析的模型」);「fable別名在 Claude apps gateway 工作階段中解析為 Fable 5,在其他所有環境中解析為 Fable 5.2」;「在任何方案或供應商上,都沒有任何 Fable 模型是帳號類型的預設模型」;「在 Pro、Max、Ultra、Team 與 Enterprise 方案上,儲存在使用者設定中的claude-fable-5-1模型會改為fable別名」;「Fable 5.2 需要 Claude Code v2.1.321 或更新版本」;「Fable 5.2、Opus 5.5、Sonnet 5.5 與 Haiku 5.5 預設為medium,Opus 4.7 則預設為xhigh」。快速模式:「Claude Fable 5.2 與 Claude Opus 5.5 的快速模式已可使用。Claude Opus 5 與 Claude Opus 4.8 的快速模式處於研究預覽階段」;「Fable 5.2 為 $16/$80,Opus 5.5 為 $8/$40,Opus 5 與 Opus 4.8 為 $10/$50」;「Fable 5.2 上的快速模式需要 Claude Code v2.1.321 或更新版本」;「在 Fable 5.2 上,只有在您使用 Fable 5.2 時開啟的快速模式才會保留」;Agent Platform 章節(「需要 Claude Code v2.1.322 或更新版本」、「export VERTEX_REGION_CLAUDE_FABLE_5_2=global」、「Fast mode needs Vertex region global, us or eu」(快速模式需要 Vertex 區域為 global、us 或 eu)、「Using standard speed on Fable 5.2 · fast mode wasn’t available」(以標準速度使用 Fable 5.2 · 無法使用快速模式))。所有設定:「permissions.denyInsteadOfPrompting… 需要 Claude Code v2.1.319 或更新版本」;「範圍:使用者或受管,以及--settings。儲存庫無法替您設定此項」;「denyInsteadOfPrompting還會阻止哪些操作」清單。環境變數:
CLAUDE_CODE_DISABLE_FEATURE_FLAGS(「需要 Claude Code v2.1.319 或更新版本 … 舊名稱DISABLE_GROWTHBOOK仍可使用,而且 v2.1.124 至 v2.1.318 只會讀取這個名稱」)、CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND(「需要 Claude Code v2.1.304 或更新版本」)。MCP:「MCP 任務在 Claude Code CLI 中處於公開測試階段,需要 Claude Code v2.1.304 或更新版本」;「呼叫要成為 MCP 任務需要什麼」清單;「單次的claude -p "<prompt>"執行不會取得 MCP 任務」。費用:「訂閱方案定價(Pro、Max、Ultra、Team、Enterprise)」;claude.com/pricing:「Free、Pro、Max、Ultra、Team 與 Enterprise 等方案層級」。使用 advisor 工具升級困難決策,依主模型列出可接受的 advisor:「Haiku 4.5 | Fable、Opus、Sonnet、Haiku 5.5」、「Sonnet 4.6 | Fable、Opus、Sonnet、Haiku 5.5」、「Opus 4.6 | Fable、Opus、Sonnet 5 或更新版本、Haiku 5.5」、「Sonnet 5 或 Haiku 5.5 | Fable、Opus 4.7 或更新版本、Sonnet 5 或更新版本、Haiku 5.5」、「Opus 4.7 或 Opus 4.8 | Fable、Opus 4.7 或更新版本、Sonnet 5.5」、「Sonnet 5.5 | Fable、Opus 5 或更新版本、Sonnet 5.5」、「Opus 5 或 Opus 5.5 | Fable、Opus 5 或更新版本」、「Fable 5 | Fable 5.2、Fable 5.1 或 Fable 5」、「Fable 5.1 | Fable 5.2 或 Fable 5.1」、「Fable 5.2 | Fable 5.2」;「Fable 5.2 需要 Claude Code v2.1.321 或更新版本,Fable 5.1 則需要 v2.1.257 或更新版本」。 -
Claude Code 文件,擷取於2026年11月10日。Plugin 指令參考:「在
~/.claude/skills/<name>/建立新 plugin 的骨架」;/plugin install <plugin>:「在 Discover 分頁中開啟該 plugin 的詳細資料。若使用name@marketplace,則會在該市集的清單中開啟」。建立 Claude Code plugin:「若要讓某個 plugin 為同一儲存庫中的每個人載入,請自行在<project>/.claude/skills/<name>/建立相同的結構,包括其.claude-plugin/plugin.json」。Plugin 載入參考:「它只會在通過與.claude/settings.json中專案允許規則相同的信任檢查後才載入」。市集參考:「name、owner與plugins為必填」;「包含.claude-plugin/的目錄稱為市集根目錄,每個相對的 plugin 來源都會從該目錄解析,而不是從.claude-plugin/解析」。掃描程式碼庫中的漏洞,關於/plugin install:「此指令會開啟該 plugin 的詳細資料,您可以在其中選擇安裝範圍以開始安裝」。2.1.322 上的claude plugin init --help寫的是「Scaffold a new plugin at ~/.claude/skills// (auto-loads next session as @skills-dir)」(在 ~/.claude/skills// 建立新 plugin 的骨架;下一個工作階段會自動以 @skills-dir 載入),而範例目錄在 2.1.322 上通過了claude plugin validate。2026年11月25日重新讀取,措辭已變動之處:plugins/cli-reference,「在~/.claude/skills/<name>/建立新 plugin 的骨架。除非您的管理員已封鎖 skills 目錄 plugins,否則它會在您的下一個工作階段中以<name>@skills-dir載入,無需安裝步驟。」。Claude Code 2.1.332 印出相同的--help文字(2026年11月25日執行)。 ↩↩↩ -
Claude Code mods 文件,擷取於2026年11月10日。Mods 參考:「條目涵蓋截至 v2.1.290 的 Claude Code CLI 與桌面應用程式,以及截至 v2.1.299 的 VS Code 擴充功能」;「在
tool.check上,e.agentId與e.ceiling需要 Claude Code v2.1.290 或更新版本」;事件表格列出prompt.autocomplete,元件表格則列出Input上的rows。使用 mod 回應事件,關於result.serverToolUses:「回應中沒有此類呼叫時,此欄位不會出現,且需要 Claude Code v2.1.290 或更新版本」。為您的組織管理 mods 列出了$.env.set。這十個 mods 頁面都沒有提到virtualText、$.ui.view、prompt.change、$.prompt.media或$.session.identity。 ↩↩ -
使用 plugins 自訂 Claude Code,Claude,2025年10月9日,擷取於2026年11月11日(
anthropic.com/news/claude-code-plugins這個網址會重新導向至此):「Plugins 現已以公開測試版形式提供給所有 Claude Code 使用者。」Anthropic 的市集,Claude Code 文件,擷取於2026年11月11日:「Anthropic 為 Claude Code 發布了兩個通用的 plugin 市集」;「社群市集的名稱是claude-community,而不是其儲存庫名稱」;「Claude Code 預設會為您新增官方市集claude-plugins-official」;「您可以在 Claude Code 工作階段中使用/plugin marketplace add anthropics/claude-plugins-community新增它」。 ↩ -
Plugin 資訊清單參考,Claude Code 文件,擷取於2026年11月11日:「資訊清單是選用的。沒有它時,Claude Code 會載入它在標準結構中找到的元件。」;「
name是唯一必要的鍵。」 ↩ -
Mods 概覽,Claude Code 文件,擷取於2026年11月11日:「您無法更新或解除安裝內建的 mod。」該頁面的表格有「如何關閉」一欄。對於
cc-plugin-agents-md、cc-plugin-diff、cc-plugin-plugin-authoring、cc-plugin-telemetry與cc-plugin-you-should-know,該欄寫著「在/plugin中停用」;對於cc-plugin-sec-default則寫著「無法」,該 mod「保護您組織所管理的項目,不受使用者安裝的 mods 影響」。「停止已安裝 mods 的設定與旗標,例如disableAllHooks、--bare與--safe-mode,並不會停止內建的 mods。」2026年11月25日重新讀取;措辭已有變動的引文,改以當日的措辭呈現。 ↩ -
Claude Code CHANGELOG,v2.1.323 至 v2.1.332,擷取於2026年11月25日(2.1.323、2.1.325、2.1.326、2.1.327、2.1.328、2.1.329、2.1.330、2.1.331 與 2.1.332 分別有 294、139、367、173、144、130、142、135 與 150 條最上層項目;沒有 2.1.324 章節),以及 GitHub 發行版本 v2.1.323(2026-11-12T22:12:13Z)、v2.1.325(11-13T20:40:01Z)、v2.1.326(11-16T22:11:05Z)、v2.1.327(11-17T23:17:45Z)、v2.1.328(11-19T01:14:04Z)、v2.1.329(11-19T22:14:41Z)、v2.1.330(11-20T22:32:56Z)、v2.1.331(11-23T21:34:41Z)與 v2.1.332(11-25T01:32:14Z);不存在 v2.1.324 發行版本。npm 發布時間取自
npm view @anthropic-ai/claude-code time:2.1.323 為 2026-11-12T20:29:28Z、2.1.324 為 11-13T18:42:36Z、2.1.325 為 11-13T20:07:25Z、2.1.326 為 11-16T18:43:39Z、2.1.327 為 11-17T20:33:19Z、2.1.328 為 11-18T23:09:39Z、2.1.329 為 11-19T18:40:25Z、2.1.330 為 11-20T19:16:01Z、2.1.331 為 11-23T18:36:26Z、2.1.332 為 11-24T22:06:38Z;2026-11-25 當日的dist-tags:latest2.1.332、next2.1.332、stable2.1.326。2.1.332 原文:「Changed the default model on Microsoft Foundry to Sonnet 5.5: deployclaude-sonnet-5-5, or setANTHROPIC_DEFAULT_SONNET_MODELto a model you have deployed」;「Changed thesonnetmodel alias on Google Cloud’s Agent Platform and Microsoft Foundry to Sonnet 5.5, and Foundry’sopusalias to Opus 5.5;sonneton Amazon Bedrock stays at Sonnet 4.5」;「Added aPreSkillShellCommandhook event that can refuse a skill or command’s inline shell commands as it loads; on 2.1.331 and older, a settings file naming it opens a dialog at start」;「Added skills from MCP servers (beta). They show asserver:skillin the/menu; other skills keep their names」;「Changed/schedule, permission prompts and/loop’s cloud offer to say “cloud scheduled task” instead of “routine” or “cloud schedule”;/routinesstill works」。2.1.330:「Changed recurring scheduled tasks and/loopto run up to 30 days instead of 7 while their session keeps running, and say when they end; tasks made before this release still end at 7 days」。2.1.328:「Added auto mode for Claude Opus 4.6 and Sonnet 4.6 on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry and Claude apps gateway; interactive sessions with no permission mode start in it」。2.1.325:「Changed sandboxed Bash commands to follow the normal permission flow by default; setsandbox.autoAllowBashIfSandboxed: trueto keep running them without prompts」。2.1.323:「Added Code Mode, an experimental opt-in in which Claude writes JavaScript to call its tools」;「Removed thesubagentStatusLinesetting: subagent rows always use the default look, and settings files that still hold the key load as before」;「Changed the context window assumed for a model ID that Claude Code doesn’t recognize from 200K to 1M; use/autocompactto compact earlier, orCLAUDE_CODE_DISABLE_1M_CONTEXT=1to keep 200K」;「ChangedMCP_SDK_GENERATION=v1to run the v2 MCP client in a compatibility mode (earlier handshake, relaxed OAuth sign-in checks), because the v1 MCP client is removed」。 ↩↩↩ -
Claude Code 文件,擷取於2026年11月25日。環境變數:
CLAUDE_CODE_RESUME_HINT_COMMAND(「需要 Claude Code v2.1.323 或更新版本」)、CLAUDE_CODE_FULL_SIGN_IN_LINK(v2.1.330)、CLAUDE_CODE_DISABLE_RESPONSE_COMPRESSION(v2.1.331;「在專案與本機設定中會被忽略」)、CLAUDE_CODE_DISABLE_DEFERRED_TOOL_RESUME(v2.1.328)、OTEL_RESOURCE_INCLUDE_HOST(v2.1.326)、CLAUDE_CODE_DISABLE_SHIP(v2.1.331)、VERTEX_REGION_CLAUDE_5_5_SONNET(「於 v2.1.284 新增」),以及CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS(「從 32000 到 300000 的整數毫秒」;「高於 64000 的值需要 v2.1.323 或更新版本」)。Plugin 資訊清單參考,engines:「plugin 可運作的 Claude Code 版本,以claude-code鍵下的 semver 範圍表示」;「需要 Claude Code v2.1.323 或更新版本。若要讓 plugin 在 v2.0.15 至 v2.1.75 上繼續運作,請省略engines。」選擇權限模式:「若您的組織已套用 HIPAA 設定,Claude Code v2.1.326 或更新版本上的終端機與 VS Code 工作階段預設以 auto mode 啟動。在 v2.1.285 至 v2.1.325 上,符合條件的工作階段預設以 Manual 模式啟動。」指令,/tui:「default,或在 v2.1.327 或更新版本上的classic,會選取經典渲染器」。Plugin 資訊清單參考未列出optionalDependencies,環境變數頁面也未列出CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES;兩者都僅見於版本說明。 ↩