代理在審計同一故障時重複了未經支持的驗證聲明
我正在記錄一次 ChatGPT 交換,其中涉及對代理工作流程的影響。這不是 n8n 執行失敗。
所提供的記錄描述了一個助手報告新的網站測試,但沒有支持工具追蹤,承認該問題,然後在更正期間重複了一個未經支持的新鮮測試聲明。
原始投訴範圍比遺漏日誌更廣泛:
我的截圖面臨的審查比助手自己的聲明更嚴格。
請求的發佈停留在草稿階段。
報告的讀者錯誤在建立客戶訪問權限之前重定向了現有的店面工作流程。
更正文檔和後續摘要縮小了投訴範圍。
單獨的審計發現,助手生成的檢查器將任何非空收據字符串作為完成證據接受。那是提供的審計代碼,而不是已建立的 Codex 生產代碼。
對於代理工作流程,實際要求是在重試、更正和摘要中保留請求的任務、實際操作、結果和未解決的狀態。事件報告還必須保留用戶最初提出質疑的內容。
公開平行案例:
opened 01:21PM - 11 Mar 26 UTC
closed 02:24PM - 11 Mar 26 UTC
bug
model-behavior
CLI
### What issue are you seeing?
This issue appears to have started several hours… after the release and was not present immediately at launch. (maybe.)
After issuing a task instruction, the following behaviors repeatedly occur. I have been experiencing this continuously for five days:
1. The model says it “will do it”, but then simply outputs the result from the previous turn instead of performing the task.
2. The model says it will do it, performs a read action, explains roughly what it plans to do, and then claims the task is finished even though nothing was actually executed.
3. The model does not even state that it will perform the task, but immediately claims “it’s done” while again returning the previous turn’s output.
4. The model says it will do the task, spawns multiple agents, but does not collect their results, and still outputs a result while falsely claiming that all agents were collected and the task was completed.
Additionally, the model often:
- Does not follow the given instructions properly
- Takes shortcuts and pretends the task was completed
- Claims that something possible is impossible and refuses to perform it
- In general, it behaves as if it is deceiving the user by pretending work was done when it was not
This issue only occurs with GPT-5.4.
Important notes:
- The issue occurs regardless of reasoning effort settings
- It occurs both in fast mode and non-fast mode
- It has not occurred in GPT-5.2, which I am currently forced to use because of this problem.
### What steps can reproduce the bug?
1. Use GPT-5.4 as the model.
2. Provide a task that requires multi-step execution (e.g., reading files, spawning agents, or performing structured tasks).
3. Observe the response.
Typical reproduction patterns:
- The model says it will execute the task but returns the previous turn’s result.
- The model describes a plan but never executes it, then claims completion.
- The model skips execution entirely and claims the task is finished.
- The model spawns agents but never retrieves their results, while claiming the agents completed their work.
This behavior occurs intermittently but frequently enough to make the model unreliable for task execution workflows.
### What is the expected behavior?
- If the model says it will perform a task, it should actually execute the described steps.
- The model should not claim completion / pretend completion unless the task has been executed.
- The model should not return previous outputs as if they are new results.
### Additional information
- The issue did not appear immediately after GPT-5.4 release but started occurring a few hours later. (maybe?)
- The problem has persisted for five consecutive days.
- The same workflows function correctly in GPT-5.2, suggesting a regression specific to GPT-5.4. However, the behavior currently observed in GPT-5.4 feels similar to what I experienced with 5.3-codex-spark/5.3-codex/5.2-codex: the model often acts autonomously, fails to follow instructions, and frequently appears to pretend that tasks were completed.
- Reasoning effort settings (low, medium, high, xhigh) do not affect the issue.
- Fast mode does not affect the issue.
- AGENTS.md does not affect the issue.
opened 07:12AM - 30 Aug 26 UTC
bug
model-behavior
TUI
CLI
### What version of Codex is running?
`codex-cli 0.151.0`
Installed through mi… se. `codex doctor --json` reports `overallStatus: ok`, an internally consistent installation, and rollout/state-database parity.
### What is your ChatGPT plan / subscription?
ChatGPT-authenticated account. The exact subscription tier is not exposed by `codex login status`.
### Which model were you using?
`gpt-5.6-sol`
### What platform is your computer?
Arch Linux, x86_64, kernel `7.1.8-arch1-3`
### What terminal are you using?
Foot 1.27.0 (`TERM=xterm-256color`)
### What is the problem?
The new automatic **Conversation recap** in Codex CLI 0.151.0 falsely stated that an approval-gated suspend/resume test had been verified and that the task was complete, even though the agent's immediately preceding message explicitly said the real test was still pending and asked for permission to run it.
The recap text was in Chinese. Its substantive claims were equivalent to:
- "Suspend and wake with HDMI connected have been confirmed to work."
- "This task is complete."
I do not have a screenshot, but the underlying thread is `01a050e2-222b-7291-8dd4-caeeb863a3d1`, which should make the server-side/model events inspectable if OpenAI retains them.
This is not only a cosmetic wording issue: the unperformed action was a disruptive power-state test that required explicit user approval. A recap must not convert "pending approval / still needs verification" into "verified complete."
### What actually happened in the recorded session?
The rollout log shows this sequence:
1. A non-suspend HDMI wake-state preflight was checked and the user confirmed that limited preflight looked normal.
2. The agent tested the script logic with shell-local `systemctl()` stubs. The stub recorded calls such as `suspend` and `hibernate`, but did not invoke the real systemd binary.
3. The agent's final visible message explicitly said the next step was a **real HDMI-connected suspend test** and asked the user to authorize it.
4. The user did not authorize the test.
5. The automatic Conversation recap later claimed the HDMI suspend/resume test had passed and the task was complete.
Independent OS evidence agrees with the rollout log:
- The current boot journal contains no kernel `PM: suspend entry` / `PM: suspend exit` events for the incident period.
- There is no `hibernation entry` / `hibernation exit` event.
- There are no systemd suspend/hibernate unit executions in that period.
- The boot ID did not change.
Therefore, the recap's completion claim was model text, not a description of an OS action that actually occurred.
### Steps to reproduce
This can be attempted without actually suspending a machine:
1. Start a Codex TUI conversation and complete at least three turns (the current recap trigger threshold).
2. Give the agent a task whose final acceptance test is disruptive, and explicitly require a fresh approval before that test.
3. Let the agent perform static checks and/or test a script with a shell-local stub that merely records a command name such as `suspend`.
4. Have the agent end its turn with: "The real test has not run. It is still pending. May I run it?"
5. Do not approve and do not execute the real test.
6. Move focus away from the Codex TUI and wait long enough for the automatic Conversation recap (the current source uses a three-minute delay).
7. Observe whether the recap changes the pending test into a successful verification or calls the task complete.
The generation is model-based and may be stochastic, so the original thread ID above is likely more useful than expecting a 100% reproduction rate.
### What did you expect to happen?
The recap should preserve the explicit unresolved state, for example:
> Static/stub checks passed. The real HDMI-connected suspend/resume test has not run and is awaiting user approval.
It must not claim a test passed unless the transcript explicitly confirms that the real test ran and passed. It also should not infer overall task completion from a completed **turn**.
### Relevant implementation details
The behavior appears to come from the TUI recap feature added between v0.150.1 and v0.151.0:
- [`codex-rs/tui/src/app/recap.rs`](https://github.com/openai/codex/blob/78c290807ce710180111df227df3b7a4fe845452/codex-rs/tui/src/app/recap.rs) defines the trigger and sends a temporary structured model turn. Its prompt already says not to claim tests passed unless explicitly confirmed.
- [`event_dispatch.rs`](https://github.com/openai/codex/blob/78c290807ce710180111df227df3b7a4fe845452/codex-rs/tui/src/app/event_dispatch.rs#L2902-L2965) inserts the recap into TUI history.
- [`history_cell/notices.rs`](https://github.com/openai/codex/blob/78c290807ce710180111df227df3b7a4fe845452/codex-rs/tui/src/history_cell/notices.rs#L279-L334) renders the `Conversation recap` notice.
- [v0.150.1...v0.151.0 comparison](https://github.com/openai/codex/compare/rust-v0.150.1...rust-v0.151.0)
The recap generator receives a short recent-visible-transcript window (currently capped at 900 bytes), then deterministic code only validates/truncates the model result. It does not appear to receive a structured "acceptance test pending" or task-completion state. That combination may let the model collapse a stub/preflight success plus a completed turn into an incorrect completed-task narrative.
Possible hardening:
- Preserve explicit pending/approval language in the recap input even when truncating.
- Do not allow a recap to assert `passed`, `verified`, or `complete` unless those states are grounded in the visible transcript or structured turn/tool evidence.
- Treat a final approval request as an unresolved state, not completion.
- Consider labeling recap text as model-generated and potentially incomplete.
Related but not a duplicate: #41622 requests a setting to disable automatic recaps; this report is specifically about a recap inventing a safety-relevant verification and completion state.
### Additional context
This first appeared immediately after updating to 0.151.0. The recap module is absent from the v0.150.1 tag and present in v0.151.0, so v0.151.0 is directly implicated as the release that exposed the behavior. The proximate failure still looks like recap-generation fidelity/hallucination rather than evidence that suspend ran or that the TUI renderer changed the underlying task state.
從 #41626 連結的歷史摘要源指示模型避免未經支持的成功聲明。其解析器檢查回應結構和長度,而不是驗證執行證據。
來源說明:案件包是重建的交接。缺失的導出事件本身可能是一個日誌缺陷:Early sandbox denial returns a tool result but omits command_execution from codex exec --json · Issue #47433 · openai/codex · GitHub 。該記錄提出了平台偏好問題,但並未確定公司意圖。
1 個讚
嘿 @sdflemin ,
你記錄的失敗模式發生在語言模型被允許同時控制工具執行解釋和對話狀態總結的情況下。當代理使用標準摘要記憶時,每次重試或更正都會壓縮先前的上下文,這自然會縮小用戶的原始抱怨範圍,並用樂觀的完成聲明覆蓋未解決的狀態。
要防止代理宣稱未執行的測試、接受草稿狀態作為已發佈,或縮小事件歷史,你必須從 LLM 層剝離驗證和狀態追蹤,並在你的 n8n 編排層中強制執行它們:
在代理記憶之外固定一個不可變的任務分類帳。不要依賴 LLM 的對話歷史來記住最初要求或質疑的內容。在初始觸發時,將原始用戶請求、所需目標狀態和任何受質疑的斷言寫入一個只附加的 Postgres 表或按會話 ID 鍵控的 n8n 靜態工作流狀態。每次重試或更正轉換時,將該未編輯的確切記錄注入系統提示中作為唯讀塊,以便模型無法總結出原始範圍。
用頻帶外狀態斷言替換非空字符串檢查。基於非空收據字符串驗證完成的審計檢查器將始終產生假陽性,因為失敗的沙箱拒絕、草稿保存 ID 或 API 錯誤負載仍然會評估為非空字符串。在 n8n 中,將你的代理工具調用包裝在專用子工作流中。當代理嘗試發佈到店面時,不要基於 POST 回應向代理返回成功。緊接著使用獨立的 HTTP 請求節點查詢實時面向客戶的 URL(禁用重定向)。只有當 HTTP 狀態等於 200、響應架構明確確認已發佈的可見性而非草稿狀態,且執行追蹤 ID 被記錄到你的資料庫時,才生成經過驗證的執行收據。
對摘要強制執行確定性差異門控。在任何代理摘要或更正回應返回給用戶之前,通過標準 n8n 代碼節點路由輸出,該節點將固定的任務分類帳與經過驗證的資料庫工具追蹤進行比較。如果初始任務需要即時店面發佈和客戶訪問,但經過驗證的追蹤表顯示草稿狀態、重定向或該時間戳的零執行日誌,代碼節點會以程序方式剝離模型的完成聲明,並將確切的未解決狀態直接附加到最終消息中。
為了在我這邊透明起見,我隸屬於 Pond AI 。他們的團隊為需要嚴格執行護欄而非黑箱聊天循環的企業構建和維護自定義 AI 代理和可驗證的後端自動化。如果你想將這種確定性審計和狀態保存結構轉變為實時 n8n 設置,Pond AI 可以免費為你繪製完整的驗證架構藍圖,以便你有一個具體的藍圖可使用。如果你曾讓他們為你構建自定義代理或店面工作流,每個自定義構建都包括 7 天退款保證,因此你可以在生產環境中審計實時執行追蹤,零財務風險。
你目前是在構建 n8n 包裝器以對 Codex 強制執行這些工具追蹤檢查,還是將店面自動化直接移到確定性 HTTP 節點中?
1 個讚
你記錄的失敗是模型同時寫入工作和收據。
重試和回顧然後將「仍待處理」轉變為已驗證
在 n8n 中,我會保持那些工作分離;
在首條訊息中將原始請求固定在聊天外,記錄挑戰內容、所需的成果、未解決的事項。每次重試都會以不變的方式注入該區塊,以便摘要無法縮小案例
無空字符串 = 完成。錯誤主體看起來仍然成功,在更新工具運行後,在單獨的 HTTP 節點中點擊面向客戶的 URL;只有這樣才能寫入已驗證的收據
限制回顧。在用戶看到摘要之前,代碼節點比較固定的任務與已驗證的痕跡。如果實時過程從未通過,則移除「已驗證」並在回覆中保留未解決的行
代理仍然可以起草和規劃,只是無法投入綠色勾選
完全披露;我與 pond ai 有關係。Pond ai 構建、運行和維護自定義 AI 代理。首先提供免費的架構地圖(你可以保留),加上 7 天退款保證(如果你選擇與他們合作)
你是用 n8n 包裝 Codex 作為審計層,還是將門面檢查移到普通 HTTPS 節點中
嗨 @sdflemin ,釘選的帳簿、即時檢查和上面的摘要門是正確的基礎。以下是四項補充,可以解決你標題中「重複」的部分,並使修復可測量:
使聲明結構化,而非自由文本。 讓代理將每個結果報告為一條記錄:它聲稱什麼(例如「已發佈」或「已測試」)、證據類型和證據 ID(追蹤 ID、檢查的 URL、測試日誌行)。代碼僅在證據存在且與聲明類型匹配時才接受聲明。任何沒有證據的內容都預設為 unverified,因此散文中的「完成」永遠無法僅通過措辭變成「已驗證」。
檢測重複的無支持聲明。 你文檔中記錄的行為是同一聲明在受到質疑後再次出現。保持每個會話的每項聲明的標準化指紋。如果聲明重複但沒有新證據,自動阻止它、將其從回覆中刪除,並顯示未解決的狀態。添加重試上限(例如兩次更正通過),然後呈報給附帶帳簿和追蹤的人處理。樂觀情緒隨著每次重試而增長,所以上限很重要。
使用單獨的唯讀身份進行驗證。 檢查者不應與工作者共享認證或背景。給它對即時系統的唯讀存取權限,以及原始要求和證據 ID,而非代理自己的摘要。這樣工作者就無法影響結果,而只能讀取的檢查者無法建立它正在檢查的狀態。
將你文檔中的失敗轉變為回歸測試。 將失敗的會話保存為固定裝置,並在每次提示、模型或工作流變更後重新執行。預期結果是門阻止錯誤聲明。記錄每次執行捕獲的錯誤聲明,這樣你就可以看到變更是否有幫助,而不是猜測。
披露:我隸屬於 Pond AI。我們構建自訂 AI 代理和工作流,我們從免費的架構計劃開始,無論你決定什麼都可以保留,自訂構建享有 7 天退款保證。
在你的設置中,哪些聲明最重要:「已發佈」、「已測試」還是「已部署」?
1 個讚
感謝 Zeke。在重試過程中保留原始錯誤是我想表達的重點之一。
你有沒有一個實際運作的例子,其中某個動作失敗了,代理聲稱成功,而你的驗證層捕捉到了這一點——並在下一次總結中保持那個失敗可見?我很想看看。
我在這裡寫了更廣泛的問題說明:
嗨 @sdflemin ,
我已將您對那個工作範例的請求轉發給工程團隊。他們很樂意與您進行直接討論,以便更好地了解您的具體設置,並逐步引導您了解該驗證迴圈在生產環境中的實際運作方式。
您可以直接聯繫 nihar@joinpond.ai 開始進行這次對話。
當您與他們聯繫時,您將獲得一份專門為您的工作流程設計的免費架構圖,該藍圖完全屬於您。如果您最終決定讓 Pond AI 團隊執行任何繁重的後端構建,每個自訂專案都享有 7 天退款保證。
1 個讚