fix: keep codex sessions reusable after turn failures
This commit is contained in:
@@ -85,6 +85,18 @@ for await (const line of rl) {
|
||||
respond(message.id, { turn });
|
||||
continue;
|
||||
}
|
||||
if (mode === "slow-progress-before-terminal") {
|
||||
turnCounter += 1;
|
||||
const turn = { id: `turn_selftest_${turnCounter}`, status: "completed" };
|
||||
notify("turn/started", { turn: { id: turn.id, status: "running" } });
|
||||
respond(message.id, { turn: { id: turn.id, status: "running" } });
|
||||
setTimeout(() => notify("item/agentMessage/delta", { itemId: "msg_slow_progress", delta: "still working" }), 40);
|
||||
setTimeout(() => {
|
||||
notify("item/completed", { item: { id: "msg_slow_progress", type: "agentMessage", text: "slow progress final" } });
|
||||
notify("turn/completed", { turn });
|
||||
}, 90);
|
||||
continue;
|
||||
}
|
||||
if (mode === "provider-503-terminal") {
|
||||
turnCounter += 1;
|
||||
const turn = { id: `turn_selftest_${turnCounter}`, status: "failed", error: { message: "HTTP 503 Service Unavailable" } };
|
||||
|
||||
Reference in New Issue
Block a user