usage

Codex 0.153.0

工具與目錄
在這頁

新功能 9 項

01

Vim 模式加了復原與重做,草稿手滑也不怕

你在 Vim 模式(改用鍵盤符號下指令的編輯方式,名字來自一款老牌文字編輯器)裡改草稿,手滑刪掉一整段附件說明,以前只能重打——現在按 u 就能復原上一步,按 Ctrl+R 則是反悔剛才的復原、重做回去,⟦好比用可擦筆寫稿,寫錯了擦掉重寫,擦太多了再把擦掉的字描回來,紙面痕跡都還在⟧。而且不管草稿裡貼了多少內容、掛了幾個附件,復原跟重做都會保留完整版本,不會漏東漏西,你不用擔心救回來的稿子少了一塊。

官方原文

Vim mode now supports undo with u and redo with Ctrl+R, preserving complete drafts including pasted content and attachments. ([#41941](https://github.com/openai/codex/pull/41941), [#42140](https://github.com/openai/codex/pull/42140))

02

外掛市集搬進指令列,查裝移除都在終端機

想幫 Codex 加裝外掛(plugin,替它補上額外功能的附加元件)?現在外掛的指令列工具直接打通遠端市集:想看有什麼可裝,打指令就能列出清單;看中哪個,一行指令裝上;用膩了,一行指令移除,全程不用離開終端機。⟦如同工具租借站把整個目錄搬上網,你在螢幕前就能查有哪些工具可借、按一下借出、用完按一下歸還,不必跑櫃檯翻紙本清單。⟧

官方原文

The plugin CLI can list, install, and remove plugins from remote marketplaces. ([#42150](https://github.com/openai/codex/pull/42150))

03

自動回顧能關掉,貼上偵測開關搬了新家

想關掉自動回顧摘要,或把貼上大量文字的偵測設定搬到新位置,這裡有兩個新設定鍵。Codex 原本會自動生成回顧摘要,如果你只想在打 /recap 時自己叫出來,設定檔加一行: ``` {"tui": {"auto_recap": false}} ``` 也就是 tui.auto_recap = false,自動摘要關掉,手動 /recap 照樣能用。另一個是貼上偵測(paste burst,短時間內貼上大量文字的辨識機制)設定鍵搬家,改用巢狀寫法: ``` {"tui": {"disable_paste_burst": true}} ``` 也就是 tui.disable_paste_burst,而舊的頂層寫法目前仍當備援繼續有效,不用急著改。⟦彷彿車上的語音路況提示,能直接在中控台整個關掉、改成按鍵才報路況,開關位置也從儀表板搬進了選單,老車主熟悉的實體按鈕暫時還留著備用。⟧

官方原文

Set tui.auto_recap = false to disable automatic recaps while keeping manual /recap available. ([#42101](https://github.com/openai/codex/pull/42101))

tui.disable_paste_burst replaces the top-level setting, which remains supported as a fallback. ([#41976](https://github.com/openai/codex/pull/41976))

04

對話回頭看更清楚,改了什麼、下了什麼指令都留底

回頭捲動 Codex 的終端機介面歷史紀錄時,現在看得到的東西更完整了:程式碼修改會顯示完整的補丁(patch,改動前後對照的差異紀錄),送進背景終端機視窗的輸入內容會留底,個別執行完的指令也各自獨立顯示,不會被吞掉或混成一團。⟦宛如工地的施工日誌,每天不是只寫一句「有動工」,而是附上動工前後的對照照片,還把當天下的每一道工序分開記錄,事後翻查一看就懂哪一步做了什麼。⟧

官方原文

TUI history shows complete patches, input sent to background terminals, and individual completed commands. ([#41893](https://github.com/openai/codex/pull/41893), [#42107](https://github.com/openai/codex/pull/42107))

05

額度剩不到一半,Plus 跟 Team 會提早跟你說

用 Plus 或 Team 方案的人,額度用得快不快,現在能更早知道。以前要等額度更接近用完才會收到提醒,常常是打到一半才發現要沒了。現在只要在大約五小時一輪的用量視窗裡,額度剩不到一半,就會提早跳出警告,你就有機會提前調整步調,不必臨時改變工作方式。⟦恰似手上剩的洗衣券只剩不到一半時,機台先跳出提醒,讓你有空檔想要不要趕在額度重置前多洗一輪,而不是洗到最後一刻才發現券快用完。⟧

官方原文

Plus and Team users receive an earlier warning when less than half of their allowance remains in an approximately five-hour usage window. ([#42142](https://github.com/openai/codex/pull/42142))

06

外部連線斷了會自動接回來,未確定的動作先暫停等你看

你透過外部的 app-server(讓其他程式跟 Codex 對話的伺服器介面)連線用 Codex,這條連線如果突然斷掉,⟦就像視訊會議斷線重連,畫面接回來的時候,你正在打的訊息草稿還在、對話紀錄也沒不見,只是原本正在表決的提案先暫停,等你確認才繼續⟧。具體來說,Codex 現在會自動重新連上這個外部 app-server,草稿跟對話轉錄(transcript,逐字紀錄)都完整保留。而斷線當下還不確定有沒有送出、或是還在排隊等處理的動作,會先暫停下來,交給你重新確認過再繼續,不會替你自作主張。

官方原文

TUI sessions reconnect after an external app-server connection drops, preserving drafts and transcripts while keeping uncertain or queued submissions paused for review. ([#41911](https://github.com/openai/codex/pull/41911), [#41916](https://github.com/openai/codex/pull/41916), [#41918](https://github.com/openai/codex/pull/41918))

07

審查跳過該跳的,該顧的紀錄一樣顧著

Codex 的 Guardian(把關風險動作的審查機制)這次分清該管與不管的界線。用 Full Access(完全授權模式)時,遇到只需按確認的動作,Guardian 現在直接跳過審查。換成每個動作都要核准的 User approval mode,Guardian 也不再背景幫提案打分數、預先熱機,但敏感動作檢查與需要你輸入答案的請求,處理方式不變。Guardian 過去審過的紀錄也扛得住考驗:對話被壓縮、程式重啟,或你自己開了分支,紀錄都留得住,仍遵守回捲(rollback,把狀態退回先前某刻)的邊界。子代理(subagent,替它跑某段子任務的分身)的歷史也被隔開,不會混進主線程。⟦宛如社區警衛登記訪客,熟面孔的住戶刷卡就放行、不必每次登記,陌生訪客照樣得留資料才能進去;警衛室的登記簿就算搬家、換班,甚至臨時開了側門,各戶訪客紀錄還是分開保管,不會混成一本。⟧

官方原文

Full Access skips Guardian reviews for confirmation-only actions. User approval mode skips background Guardian scoring and prewarming, while sensitive-action checks and requests for user input retain their existing handling. ([#42147](https://github.com/openai/codex/pull/42147), [#42256](https://github.com/openai/codex/pull/42256))

Guardian review history survives compaction, restarts, and user-created forks while respecting rollback boundaries and isolating subagent history. ([#41879](https://github.com/openai/codex/pull/41879), [#42065](https://github.com/openai/codex/pull/42065))

08

上下文管理實驗模式預設關閉,開通後才會啟用新工具

Codex 新增了一個預設關閉的實驗設定 features.context_management.experimental_mode,如果你符合資格想試,在設定檔加上: ``` {"features": {"context_management": {"experimental_mode": true}}} ``` 也就是把這個巢狀設定鍵打開。開啟後,如果你是用 Codex 後端的 ChatGPT Plus、Pro 或 Pro Lite 訂閱、而且帳號被納入資格名單,就會啟用以 token(AI 處理與計費的文字單位)預算管理上下文的機制,外加歷史筆記功能跟 new_context 這個工具。用 API 金鑰(一組用來證明身分、直接呼叫底層服務的密碼字串)登入的工作階段、自訂供應商,以及暫時性的結構化執行緒,則不在開放範圍內,不會啟用這些新機制。⟦有點像新開的試營運方案,只開放給符合資格、事先報名的特定會員試用新設施,臨櫃辦的訪客卡跟外接廠商暫時還用不到。⟧

官方原文

Adds the disabled-by-default features.context_management.experimental_mode configuration. When enabled for eligible ChatGPT Plus, Pro, or Pro Lite sessions using the Codex backend, it activates token-budget context, history notes, and the new_context tool. API-key sessions, custom providers, and temporary structured threads remain excluded. ([#42385](https://github.com/openai/codex/pull/42385))

09

帳號、路徑、續接紀錄,一批後台細節一次補上

這批修復收攏了幾項後台細節。MCP(Model Context Protocol,讓 AI 連接外部工具的協定)工具的核准記憶改成綁定帳號,換帳號不會沿用另一個帳號核准過的設定;MCP 相對路徑執行檔,在 macOS 上啟動更可靠。對話紀錄壓縮現在併入共享歷史,codex exec resume 依目錄續接也認得壓縮過的紀錄。工作階段的根目錄就算是符號連結(symlink,指到別處的捷徑檔),開執行緒分支照樣正常。app-server 執行緒中繼資料多了可為空值的 model、reasoningEffort 欄位,模型目錄若開放,還能用 request_user_input_async 結構化、非同步發問,不必卡住等你即答。⟦如同寄放行李,寄放單跟存根號碼要對得上才能領回,就算行李轉去別的置物櫃,存根照樣領得到東西,連加保險也能先發通知單,不必現場答。⟧

官方原文

Remembered MCP tool approvals are scoped to the selected app account, and relative MCP executable paths start more reliably on macOS. ([#42133](https://github.com/openai/codex/pull/42133), [#42117](https://github.com/openai/codex/pull/42117))

Rollout compression includes shared histories, codex exec resume handles compressed rollouts when selecting by working directory, and thread forks work with symlinked session roots. ([#42039](https://github.com/openai/codex/pull/42039), [#42135](https://github.com/openai/codex/pull/42135))

App-server thread metadata includes nullable model and reasoningEffort fields. Structured asynchronous questions are supported through request_user_input_async when enabled by the model catalog. ([#42151](https://github.com/openai/codex/pull/42151), [#42178](https://github.com/openai/codex/pull/42178))