diff --git a/src/backend/codex-stdio.ts b/src/backend/codex-stdio.ts index 11e2a21..8f4eca0 100644 --- a/src/backend/codex-stdio.ts +++ b/src/backend/codex-stdio.ts @@ -1120,7 +1120,10 @@ function toolCallPayload(method: string, item: JsonRecord): JsonRecord { } function toolCallStatus(method: string, item: JsonRecord): string | null { - if (typeof item.status === "string" && item.status.trim().length > 0) return item.status; + const status = typeof item.status === "string" ? item.status.trim().toLowerCase() : ""; + if (status === "inprogress" || status === "in_progress" || status === "running" || status === "pending") return "started"; + if (status === "completed" || status === "succeeded" || status === "success") return "completed"; + if (status === "failed" || status === "error" || status === "cancelled" || status === "canceled") return "failed"; if (method === "item/started") return "started"; if (method === "item/completed") return "completed"; return null;