usage

usage 0.31.4

工具與目錄
在這頁

新功能 3 項

01

接回舊對話與狀態列即時提醒,快取過期成本一目了然

當你暫停工作後想接續先前任務,常因快取(暫存計算結果的機制)過期而重送大量資料。開啟進度管家後,只要以 /resume、--resume 或 --continue 接回過期且脈絡達 5 萬 token(AI 計費的文字單位)的對話,Claude Code 會在輸入首句前顯示一行提示,列出閒置時間、預估重送的 token 數並建議先執行 /compact。此提示僅自己可見且不計入脈絡,需 2.1.251 以上版本且下次啟動 usage 自動套用。狀態列在倒數結束後也不再留白,到期當下會即時重畫,顯示如 cold·re-cache 180k 的提示,表示下一則訊息約有 18 萬 token 要重新快取。⟦如同退房時櫃檯即時試算加時費用,以前超時往往結帳才發現驚人帳單,現在一到超時點就主動亮出補收標準,讓你能提前評估是否精簡內容。⟧

官方原文

**Resuming a stale conversation now tells you what it will cost.** When Progress Concierge is on and you /resume (or --resume / --continue) a conversation whose prompt cache has expired and whose context is at least 50k tokens, Claude Code shows a one-line warning before your first message: how long it sat idle, roughly how many tokens the next message re-sends, and a suggestion to /compact first. Only you see it; it is never added to Claude's context. Needs Claude Code 2.1.251 or newer. Existing installs pick up the new trigger automatically the next time usage starts.

**The status line now says what a cold cache will cost.** Once the prompt cache countdown runs out, the segment switches to how many tokens the next message will re-cache (for example cold·re-cache 180k) instead of going blank. Claude Code redraws the status line the moment the cache expires, so no refresh interval is needed.

02

額度快用完改播專屬短音,告急提醒更具辨識度

埋頭趕工或專注思考時,如果沒有時常緊盯著用量面板,額度(特定週期內可使用的調用配額上限)見底的瞬間往往讓人猝不及防。現在系統調整了通知音效,當額度快用完或已經用完時,會改播 usage 自製的兩聲「uh-oh」簡短警示音,讓你光聽聲音就能分辨用量告急。至於額度恢復時的通知,則繼續維持播放系統預設的提示音,避免干擾既有的使用習慣。⟦洗衣機遇到排水故障時用短促警示,洗好衣服則播放一般完成音;現在額度告急有專屬短音,額度恢復仍是系統預設音,光聽就能分辨。⟧

官方原文

Quota warning and quota-depleted notifications now play a short two-note "uh-oh" alert sound made for usage. The quota-restored notification keeps the system default sound.

03

離線備用價目表補上 Sonnet 5.5,名稱顯示不再截斷

遇到網路斷線或離線環境工作時,最怕計費工具因連不上伺服器而無法正確計算新型號的花費。現在離線備援(主要機制失效時接手的後備清單)價目表正式補上了新模型資料,完整納入 claude-sonnet-5-5 的費率。以前當下載的線上價目表過期時,這款模型的用量會被誤算為 0 美元;現在即使離線也能依正確標準計價,終端機表格中也會顯示為清晰的「Sonnet 5.5」,不再出現被截斷的模型識別碼。⟦彷彿隨身攜帶的紙本價目表補齊了最新熱門品項,以前網路斷線時查不到新餐點價格會直接被當成免費招待,現在備援清單完整對齊,就算離線結算也不會漏算費用。⟧

官方原文

Add Sonnet 5.5 (claude-sonnet-5-5) to the offline fallback price table, so its usage is no longer priced at $0 when the downloaded price table is stale, and show it as "Sonnet 5.5" in tables instead of a truncated model ID.

修正 1 項

04

修正子代理輸出少算問題,歷史快取自動重新結算

習慣呼叫多個背景助手平行處理繁重任務的使用者,過去看到的用量統計可能嚴重失真。先前在串流(答案一邊生成一邊逐字傳輸的輸出方式)處理時,Claude Code 會把同一請求多次寫入日誌,導致解析器只抓到第一行,使子代理的輸出用量少算約 86%。例如在某台機器上的 17 個子代理日誌中,原本僅記錄到 23,327 個輸出 token(AI 處理與計費的文字單位),修正後改取每筆請求的最大值,實際數值應為 165,395。這項問題只影響子代理,主對話日誌完全不受影響;更新後歷史快取與年度快取會自動重算一次,但日誌已遭刪除的日期則維持封存數字無法補正。⟦好比收銀機結帳時印出整串明細,以前系統只抓取了剛開始印出的第一行小計,導致整筆交易總額嚴重短少;現在改以最終印出的加總金額為準,歷史紀錄重新結算後用量數字終於回歸真實。⟧

官方原文

**Claude subagent output was undercounted by about 86%.** Claude Code writes each subagent request to its transcript several times while it streams, and output_tokens only reaches its final value on the last line. Both Claude parsers kept the first line, so on one machine 17 subagent transcripts counted 23,327 output tokens instead of 165,395. They now keep the largest value for each request. Main-conversation transcripts were not affected. The history and yearly caches are rebuilt once; days whose transcripts were already deleted keep their archived totals and cannot be corrected.