usage

Muse Code 1.4.17

工具與目錄
在這頁

新功能 12 項

01

Agent 改動環境設定與常駐服務前會先詢問

你請 Muse 寫完一個小工具,它卻沒打招呼就把指令裝進電腦路徑裡,這最讓人頭痛。現在只要你沒主動要求,它在執行這幾件事前都會先停下來問你。

這包括把剛建置好的程式放進 PATH 環境路徑、取代或蓋過既有的同名指令、編輯終端機殼層啟動檔,以及安裝背景服務。⟦好比去剪頭髮時,設計師如果想幫你換洗髮精或加做護髮,一定先問過你點頭,不會沒交代就自己動手。⟧

官方原文

The agent asks before changes you did not request: putting what it built on your PATH, replacing or shadowing a command already there, editing shell start-up files, or installing a background service

02

長對話防塞爆模型容量並提示開新工作階段

跟 AI 聊得太長、累積了滿滿的歷史訊息,最怕一按送出就跳出請求過大的錯誤。

只要模型的上下文視窗(單次對話能容納的總量上限)大小已知,Muse 送出提問時會先把要求回覆的字數縮到剩餘空間裝得下的範圍,擋掉長對話常見的請求過大錯誤。

萬一那一輪的內容依然超過模型的容量上限,錯誤提示現在也會直接告訴你可以改開一個新的工作階段。⟦如同往快裝滿的後車廂塞東西,先縮減待會要放進去的紙箱大小;真的完全塞不下了,就直接換一輛空車來載。⟧

官方原文

When a turn does not fit the model's context window, the message now says you can start a new session

A turn on a model with a known context window now trims the output it asks for to the room the window has left, which prevents most request-too-large errors in long conversations

03

跨機對話與失敗工作流程需先更新再接續

在不同裝置上混用新舊版本的 Muse,接續紀錄時要特別留意相容性。

只要新版曾經連線或嘗試連線到別台機器執行指令,舊版就開不了這筆對話。若在舊版用編號或工作階段挑選器開啟它,舊版可能會自己另開本機對話,讀舊紀錄後直接在這台電腦接手。因為任務內容原本可能是給別台機器跑的,重開前請先更新程式,其餘對話不受影響。

舊版也無法接續曾留下狀態檢查失敗紀錄的工作流程,一樣要先更新應用程式才能恢復。⟦跟用舊導航機讀新路線一樣,讀不懂跨區標記時它可能會擅自就近重排一趟行程,想避免跑錯環境就得先升級程式。⟧

官方原文

A Muse build older than this release cannot open a chat that a newer build connected, or tried to connect, to another machine to run commands there. When such a chat is resumed by id or chosen in the session picker, that build may instead start a new local chat on its own that reads the old chat's log and continues the work on this machine; update the app before reopening the chat, because that work may have been written for the other machine. Other chats are unaffected

Older app versions can't resume a workflow that recorded a failed status check; update the app to resume it

04

閒置工作階段更快歸還對話壓縮釋出的記憶體

開著好幾個對話視窗、剛做完紀錄壓縮又暫時沒繼續聊,電腦記憶體卻還是降不下來。過去工作階段常會把壓縮清出的記憶體扣留好幾分鐘,現在閒置約半分鐘就會把這塊記憶體歸還給系統。

官方原文

An idle session now returns the memory a compaction freed to the system about half a minute later, instead of often holding it for minutes

05

工作流程的 token 預算會完整計入子任務用量

執行多步驟的工作流程若分派子任務跑了好幾輪,以前計算出來的用量總是偏少。工作流程的 token(AI 處理與計費的文字單位)預算與子任務消耗,現在會完整計入子任務所有階段的工作,不再只算它的第一輪。

官方原文

Workflow token budgets and child usage now count all of a child's work, not only its first turn

06

更新外掛後已停用的技能不再意外重新開啟

自己手動關掉某個外掛裡用不到的技能,最怕更新外掛後它又自己跑出來。就算外掛作者改了那個技能的資料夾位置,你更新外掛後,原本停用的技能現在依然會維持關閉狀態。

官方原文

A plugin skill you turned off stays off after the plugin's author moves its folder and you update the plugin

07

Mac 沙盒內執行殼層指令也能正常使用 ssh

在 macOS 開啟隔離環境跑終端命令時,過去只要用到遠端連線工具 ssh,往往會卡在查不到目前使用者名稱。這個問題已經修好,現在沙盒(隔離執行環境的安全空間)內的殼層指令能正常查詢使用者名稱,讓 ssh 就像在沙盒外一樣運作。

官方原文

Shell commands sandboxed on macOS can look up the current user name, so ssh works as it does outside the sandbox

08

Mac 無法存取鑰匙圈時登入畫面會給解法

從別台電腦透過 SSH 遠端連進蘋果電腦啟動 Muse Code 時,過去常會莫名跳出未登入狀態,畫面上卻完全沒寫到底哪裡出錯。

這通常是因為啟動時無法使用鑰匙圈。現在碰到這種情況,登入畫面會直接說明原因並附上解法,提醒你先執行 security unlock-keychain,再重新啟動 Muse Code。⟦像刷門禁卡進不了辦公室,以前只會亮紅燈把你當成沒報到,現在螢幕會直接告訴你卡片消磁了,並教你在哪台機器重新過卡。⟧

官方原文

On a Mac where Muse Code cannot use the Keychain at startup, such as over SSH, the login screen now says why and how to fix it (run security unlock-keychain and restart Muse Code) instead of looking logged out with no explanation

09

工作階段協定新增子代理停止與結果狀態通知

給開發自家前端介面的串接團隊:過去在外部畫面不容易看清背景任務是被使用者叫停、還是已經把產出交回主線,這版把這類即時同步補齊了。

工作階段協定新增一項實驗性請求,能像終端機介面按下停止一樣中止工作階段內的子代理,並讓主代理得知是使用者停止的。

每當工作階段讀取子代理結果時,用戶端會在該位置收到結果項目與當下狀態,包含已完成、失敗或已取消,好把結束的子代理標在父層讀取結果處。

當子代理在舊結果之後又展開新的嘗試,該筆舊結果會被標成已被新嘗試取代,用戶端就能直接從控制狀態判別子代理目前狀況。

官方原文

The session protocol gains an experimental subagent/workStop request that stops a session's subagents the way the terminal UI's own stop does, so the agent is told the user stopped them

Session-protocol clients get a subagentResult item each time a session consumes a subagent's result, at that point in the session, with the result's status (completed, failed or cancelled) when the view saw it, so a client can show each finished subagent where its parent read the result

A subagent item's result in the session protocol now carries superseded: true once the subagent started a newer attempt after that result, so a client can take the subagent's status from its control state

10

工作階段協定改用新版檢視游標並重建舊快取

給串接遠端用戶端的開發者:升級後如果繼續沿用舊版留下的閱讀進度或暫存紀錄,畫面可能會默默漏接或讀錯事件,這版會主動攔下並刷新。

工作階段協定的檢視游標現在改以新版格式核發,遇到舊格式游標會被拒絕一次,並附上標準的 reopen without a cursor 指引要求不帶游標重新開啟。至於舊版存下來的檢視快取(把查過的資料暫存起來直接用的空間),則會在首次使用時自動重建。⟦像進新版閱讀室時舊書籤不再通用,服務員會先請你把書重頭翻開一次,並把夾在裡頭的舊索引頁當場重印,免得你漏看章節。⟧

官方原文

Session-protocol clients: view cursors are now minted in the v10: spelling; a cursor in an older spelling is refused once with the standard "reopen without a cursor" guidance, and a view cache saved by an older build is rebuilt on first use, so no client silently skips or misreads events

11

muse serve 支援在單一回合混搭技能與影片

如果你的專案有串接 muse serve 用戶端,以前想把技能跟多段影片放進同一回合分析,還得拆開處理。

現在發起單一回合時,用戶端可以直接把技能片段連同影片片段一起送出。每段影片對應的 [Video #N] 標籤會依照順序接進技能的參數裡,作法跟既有的圖片標籤完全相同。

官方原文

muse serve clients can send a skill part together with video parts in one turn/start; each video's [Video #N] label joins the skill's arguments in order, as image labels already do

12

SDK 新增工作階段事件串流與實驗請求

使用 TypeScript 與 Python SDK 的開發者,想更細緻追蹤狀態或呼叫尚未封裝的介面,這版補齊了幾項關鍵能力。

在 TypeScript SDK 中,擴充掛鉤現在能觀察工作階段摺疊過程裡的自訂通知,以及整個主機範圍的事件。

在 TypeScript 與 Python SDK 裡,新的事件串流介面會即時送出每個傳入事件對工作階段帶來的變更,讓用戶端可以逐步局部更新畫面。

兩個 SDK 也新增了通用查詢請求方法,專門處理用戶端尚未封裝的查詢;而且只要在啟動用戶端時開啟實驗性 API 選項,一般指令與通用請求都能呼叫實驗性方法。

官方原文

TypeScript SDK: FoldExtension hooks observe custom notifications in the session fold and host-wide events

In the TypeScript and Python SDKs, session.events() streams what each incoming event changed in a session, so a client can update its view incrementally

The TypeScript and Python SDKs add MuseClient.request for queries the client does not wrap, and command and request send experimental methods when the client is spawned with experimentalApi: true

修正 18 項

13

Agent 遇阻回報與建置除錯流程改進

跑開發任務遇到網路被擋、分支落後或要填表單,Muse 的應對順序都改了。

只要網路政策擋下某步驟需要的下載,它會在執行其他步驟前立刻問你,不再改試其他來源或拖到最後報告才寫。

若你手上的分支進度落後且建置失敗,它會改在最新分支上建置與測試。失敗輸出裡若有提到修法,它也會持續處理,直到套用或提供修法給你。

操作瀏覽器應用程式的表單時,現在會直接依你的點擊回傳結果,不再等背景步驟跑完。⟦就像拿文件去影印店卻遇上紙張規格被限制,店員不再自己換別種紙試印或最後才講,而是立刻停下來問你。⟧

官方原文

Muse asks you right away, before the other steps, when a network policy refuses a download a step needs, instead of probing other sources or naming the block only in its final report, builds and tests on the up-to-date branch when your checkout is behind and its build fails, keeps working until a fix the failure output names is applied or offered, and makes browser app forms return their result from your own click instead of waiting on a background step

14

開發瀏覽器遊戲會依你指定的技術堆疊製作

想在瀏覽器裡做小遊戲並指定特定技術框架,以前不管你怎麼要求,Muse 總是一律做成純 HTML 檔案。現在只要在要求裡寫明想用的技術堆疊,它就會照你的指定去實作。

官方原文

Browser games follow the stack the request names instead of always using plain HTML files

15

檢查內容報告會將草稿專用項目獨立列出

請 Agent 做一份區分已發布與未發布內容的檢查報告,過去那些只出現在草稿裡的素材很容易被誤標成沒人用,甚至整筆漏寫。

現在 Agent 在回報完成前會被要求重跑這份檢查,並把只給未發布內容使用的項目獨立列在草稿專屬標題下,不再說成未使用或漏掉。

官方原文

When you ask for a checker or report that separates published from unpublished content, the agent is now prompted to rerun it and list items used only by unpublished content under their own draft-only heading, instead of calling them unused or leaving them out, before saying it is done

16

阻擋 /goal 摘要夾帶隱藏終端機控制碼

用 /goal 追蹤任務時,過去模型產生的文字可能會把視窗標題改掉、清空螢幕或亂移游標。

這項安全問題已經修好,現在 /goal 摘要印出前會先濾掉看不見的終端機控制字元,摘要中的模型文字不再能改變終端機標題、清空畫面或移動游標。⟦拿佈告欄上的便條紙來說,以前上頭藏的隱形記號會讓人誤改看板標題,現在先抹掉記號後它就只是純文字告示。⟧

官方原文

Security: The /goal summary no longer lets goal text written by the model change the terminal title, clear the screen, or move the cursor; invisible terminal control characters are removed before the summary prints

17

修正接續舊工作階段失敗與選單錯位問題

把做到一半的工作階段重新叫出來接續,以前從挑選清單到載入狀態常出狀況,現在這些斷點都修好了。

接續失敗重回挑選器時,清單列出剛才那筆後會直接選中它,按 Enter 不會再誤開別筆。

需轉進新工作階段接續時,就算最新檢查點寫在回合之間也不會失敗,對話內容都會留著。

壓縮並重開工作階段後,存好的工作流程仍可繼續接續。

用 --resume、--continue 或 /resume 重開時,若子代理(分擔子任務的獨立代理)狀態讀不到,展開紀錄不再重複顯示它。

前輪存設定失敗、下輪沿用相同規則或指示時,重開工作階段不再失敗。

分岔工作階段若在記下工作區前就先執行,下次接續會補認該工作區,挑選器也會把它列在目前工作區下而不再隱藏。

官方原文

After a resume that fails and reopens the session picker, the session you tried is selected as soon as the picker lists it, so pressing Enter right away no longer opens a different session

Resuming a session that has to continue in a new session no longer fails when its newest checkpoint was written between turns; the conversation is kept

Keep saved workflows available to resume after compacting and reopening a session

Reopening a session with --resume, --continue or /resume no longer repeats an earlier subagent in expanded history when its saved subagent state could not be read

Reopening a session no longer fails when saving a turn's setup failed and the next turn reused the same rules or instructions

A forked session that ran before recording its workspace now takes the workspace on its next resume, so the resume picker lists it under the current workspace instead of hiding it as missing metadata

18

列出工作階段不再佔用紀錄並標出分支對話

查看手邊留下的工作階段清單,現在跑起來不再卡住檔案,對話的上下歸屬也一眼就分得出。

列出工作階段清單預設改用兩階段執行,名單很長時不會在過程中一直開著紀錄檔;顯示出來的清單內容維持不變,但已經變得很龐大的舊紀錄檔目前還不會縮小。

執行 muse sessions 查看時,擱置在一旁的分支對話現在會標成隸屬原對話的分支,不再被當成旁邊一筆無主的工作階段。⟦像圖書館盤點書目時改分兩步抄錄,不再像以前那樣一路敞開書庫大門佔著通道,也會把擱在旁邊的副冊標明屬於哪套主書。⟧

官方原文

Session listings now run in two phases by default, so a long listing no longer holds the session log open while it runs; listings are unchanged, and logs that are already very large do not shrink yet

muse sessions shows a parked side chat as a side chat of its conversation (sideOf) instead of an anonymous session beside it

19

修正背景任務觸發的審核與停止任務後排版異常

把事情丟給背景任務去跑,等它結束或手動喊停後,畫面上的操作現在正常多了。

背景任務結束後送出的工作階段訊息,現在都能正常按核准。待審核的卡片上,也會把觸發訊息的背景任務與發送者分開顯示。

從 Tasks 抽屜或輸入 /stop all 停止任務後,下一則訊息底下不再多長出第二列輸入提示框。

官方原文

Session messages sent after a background task finishes can be approved normally. Pending approval cards show the background task trigger separately from the sender

Stopping a task from the Tasks drawer or with /stop all no longer adds a second prompt row under your next message

20

修正排隊中的提問觸發掛鉤時變成空白的問題

上一輪還沒跑完時,你可以先送出下一句提問讓它排隊。以前 UserPromptSubmit 掛鉤(特定事件發生時被觸發的小程式),這時收到的卻是一段空白。這個問題已經修好,現在排隊中的提問會帶著原本的文字內容正常傳進掛鉤。

官方原文

A prompt queued behind a running turn now reaches its UserPromptSubmit hooks with its text instead of an empty prompt

21

讀取未寫完的 JPEG 圖檔會直接提示檔案損毀

不小心把存到一半、結尾被截斷的 JPEG 圖片放進對話,過去程式會直接把這張壞圖送給模型,結果整個請求被拒收。現在讀到沒寫完整的 JPEG 時,會直接失敗並顯示 "the file may be damaged or invalid" 提示,不會再把損毀的圖片送給模型。

官方原文

Reading a JPEG that is cut off before its end now fails with "the file may be damaged or invalid" instead of sending the broken image to the model, which rejected the request

22

settings.json 缺版本號時改為明確提示補法

如果電腦裡的 settings.json 是別的工具幫你建的,裡面常常少了格式版本編號,以前開啟 Muse 只會冷冰冰報出一條看不懂的解析錯誤。

現在遇到少了 schema_version 的情況,它會明確提示你在設定檔裡補上這行:

```json { "schema_version": 1 } ```

官方原文

When settings.json has no schema_version (for example, another tool created it), Muse now says to add "schema_version": 1 instead of reporting a bare parse error

23

settings.json 無法讀取時各啟動指令的阻擋規則

如果不小心把 settings.json 的權限鎖死、誰都打不開,接下來不同情境的啟動行為會怎麼處理,這版劃分得更清楚。

用 muse serve 讀取掛鉤清單遇到這種情況,不再回報成沒有掛鉤,改為直接拒絕並附上讀取錯誤與修正建議。改用 muse resume <id> 或 muse exec --session-id <id> 接續工作階段,啟動時也會以相同原因停止。

若是全新執行 muse 或 muse exec,仍維持原本的權限設定檔拒絕行為。至於不會執行任何掛鉤的指令,則會在跳出一次警告後繼續用預設設定跑下去。⟦彷彿工地的安全手冊泡水糊掉看不清,需要照手冊施工的班組不再假裝沒限制就開工,會先停工並附上排除步驟;不牽涉手冊的作業則記一筆提醒後照常完成。⟧

官方原文

muse serve's hooks catalog read (hook/list) on a settings.json nobody could read now refuses with the read error and a recovery line instead of reporting zero hooks, and a resumed start (muse resume <id>, muse exec --session-id <id>) stops with the same refusal; a fresh muse or muse exec start keeps its permission-profile refusal, and commands that run no hooks keep continuing on defaults with the one warning

24

讀不到 trust.json 時工作階段仍可開啟

透過 muse serve 確認工作區信任狀態時,萬一記錄信任清單的檔案損壞或權限卡住,過去會直接失敗進不去。這個問題已經修好,現在讀不到 trust.json 時工作階段依然能正常打開,只是額外加入的工作區資料夾會先留在未信任狀態。

官方原文

A session that asks muse serve for workspace trust now opens with its extra workspace folders untrusted when trust.json cannot be read, instead of failing to open

25

Windows 沙盒設定失敗時會指出卡關步驟

在 Windows 上執行 muse sandbox windows setup 或首次啟動自動建立沙盒時,設定有時會在中途失敗。以前這時畫面上只會報說找不到設定標記,讓人完全摸不著頭緒到底錯在哪裡。

現在失敗訊息會直接點出卡關的具體步驟,例如公司電腦或本機原則拒絕沙盒帳號登入這類狀況,不必再盲猜原因。

官方原文

On Windows, a failed muse sandbox windows setup, or the setup a first start runs, now names the step that failed, such as a sign-in the machine's policy refuses for the sandbox account, instead of only reporting that its setup marker is missing

26

修正 Windows 沙盒內附加圖片跳出存取遭拒

在 Windows 電腦的沙盒環境這類不允許建立硬連結的工作階段資料夾裡操作時,想在對話附上圖片會直接失敗並跳出「Access is denied」錯誤。這個問題已經修好,現在就算資料夾不支援硬連結,圖片也能正常附加進去。

官方原文

Attaching an image no longer fails with "Access is denied" on Windows when the session folder does not allow hard links, for example inside a sandbox

27

修正 Linux 沙盒同時執行指令時的保護與啟動錯誤

在 Linux 上同時跑多個受沙盒保護的殼層指令,或遇到系統定時清掉暫存檔,以前常出現啟動失敗或防護失效的狀況。

當 ~/.config 目錄還沒建立時,若同時啟動兩個沙盒殼層指令,第二個不會再以 exit 125 失敗。

用來防止沙盒指令互相拆掉保護的共用鎖,不再放在暫存清理程式會在執行中途刪掉的檔案裡。

若沙盒的佔位紀錄被 /tmp 清理程式等工具刪掉,就算另一個共用的指令先跑完,對 ~/.config 這類未建路徑的保護也不會消失。

當同一工作區有另一個沙盒指令啟動時,未建立的受保護資料夾(例如 .git)內部的拒絕規則不會再丟失。

官方原文

On Linux, when two sandboxed shell commands start at the same time while ~/.config does not exist yet, the second no longer fails with exit 125

On Linux, the shared lock that keeps sandboxed commands from removing each other's protection of a missing denied path no longer lives in a file a temp cleaner can delete out from under a running command

On Linux, a sandboxed shell command no longer loses the protection of a missing path such as ~/.config when another command sharing it finishes first after the sandbox's placeholder records were deleted, for example by a /tmp cleaner

On Linux, a sandboxed shell command no longer loses a deny inside a missing protected folder such as .git when another sandboxed command starts in the same workspace

28

修正 Linux worktree 子目錄指令失敗

在 Linux 上,很多人會用 git worktree add 開出 worktree(工作樹,Git 讓同一專案平行開多份副本的功能)。過去只要從這種目錄底下的子資料夾啟動 Muse,每條殼層指令都會跳出 "Not a directory" 錯誤。現在這個問題已經修好,從子目錄啟動也能正常執行殼層指令。

官方原文

On Linux, shell commands now run when Muse starts in a subdirectory of a Git worktree created with git worktree add, instead of every command failing with a "Not a directory" error

29

修正子代理指令在無法存檔時回報錯誤不準的問題

對串接工作階段協定或 muse serve 的開發團隊來說,過去子代理無法處理指令時,畫面或回應常把原因一律寫成無法儲存,讓人誤判問題。

當工作階段紀錄檔在 Muse 外部被刪除或替換後,協定若拒絕中斷、停止、關閉子代理或讀取結果的請求,現在會明確回報拒絕原因,不再只說變更無法儲存。

在 muse serve 工作階段接續後、歷史紀錄還在重建期間送出指令給子代理,現在會直接回覆它忙碌中且可重試。就算當下工作階段無法存檔,也不再為沒執行到的指令報出儲存失敗。⟦像櫃檯人員以前只要件送不進去就一律貼「系統無法存檔」的標籤,現在會老實寫明是底稿不見還是窗口還在整理舊件、請稍後再試。⟧

官方原文

After a session log is deleted or replaced outside Muse, a subagent interrupt, stop, close or result read that the session protocol refuses now says why instead of saying the change can't be saved

On a muse serve session, a command sent to a subagent while its history is still being rebuilt after a resume now answers that the subagent is busy and can be retried, even when the session cannot be saved, instead of reporting a save failure for a command that never ran

30

修正 SDK 主機當掉錯誤回報與重試行為

採用 TypeScript 與 Python SDK 開發時,遇到主機中斷或系統忙碌,錯誤資訊與重送機制這版都做了修正。

當呼叫因主機行程結束而失敗,錯誤原因現在會附上結束方式(包含結束碼或訊號,以及錯誤輸出尾端)。這類失敗在 SDK 等待行程結束時最多會晚 2 秒才報錯,而且這個原因不代表工作階段能夠接續。

指令若收到系統過載或請求塞車的推回回應,且標明不可重試,SDK 不再自動重送;若沒帶該標記仍會繼續重試。

送出意見回饋的呼叫不再附上指令識別碼,收到系統過載或推回回應後也不再重送,每次呼叫就是單一次送出。

關於 Muse Code 主機的 SDK 錯誤訊息中,相容性連結現在會連往正確的相容性頁面,不再開啟失效頁面。

官方原文

In the TypeScript and Python SDKs, a call that fails because the host process died now says how it ended (exit code or signal, and the end of its error output) in the error's cause; such a call can fail up to 2 seconds later while the SDK waits for that exit, and the cause does not mean the session can be resumed

Python and TypeScript SDKs: a command answered overloaded or backpressured with retryable: false is no longer resubmitted automatically; without the flag it still retries

The compatibility link in the SDK errors about the Muse Code host now opens the compatibility page instead of a missing page

Python and TypeScript SDKs: submitFeedback / submit_feedback no longer attaches a commandId to feedback/submit or resubmits it after a backpressured or overloaded answer; each call is one submit, as the wire defines it