fix: fail stale codex thread resume

This commit is contained in:
Codex
2026-06-02 16:22:27 +08:00
parent d49b958649
commit e9843ab687
4 changed files with 16 additions and 36 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ Adapter 必须把 backend 错误映射为稳定 failureKind
| `backend-protocol-error` | backend 输出无法解析、协议字段缺失。 |
| `backend-json-parse-error` | backend stdout 不是合法 JSON-RPC 行。 |
| `backend-response-invalid` | backend JSON-RPC response/terminal notification 缺少必需字段。 |
| `thread-resume-failed` | `thread/resume` 遇到不可归类为旧 rollout 缺失的协议错误,或 replacement `thread/start` 也失败;已有 `SessionRef.threadId` 指向的 Codex rollout 不存在时应先按 `thread/resume:non-resumable` 记录并创建 replacement thread,不再直接终止用户 turn。 |
| `thread-resume-failed` | `thread/resume` 遇到任何协议错误、旧 rollout 缺失`no rollout found for thread id`已有 `SessionRef.threadId` 时只能按 Codex stdio 原生 session 执行 `thread/resume` 后接 `turn/start`;resume 失败必须终止当前 turn,不得再启动替代 `thread/start`、拼接历史 prompt 或用其他上下文冒充继续会话。 |
| `backend-spawn-failed` | backend app-server 进程无法启动。 |
| `backend-failed` | backend 进程非零退出或 terminal error。 |
| `backend-timeout` | executionPolicy timeout 触发。 |