diff --git a/scripts/e2e/mock-openai-server.mjs b/scripts/e2e/mock-openai-server.mjs index d34994204bec..65f0bddaf42f 100644 --- a/scripts/e2e/mock-openai-server.mjs +++ b/scripts/e2e/mock-openai-server.mjs @@ -600,6 +600,10 @@ const server = http.createServer((req, res) => { ); return; } + // Hold the final answer so the turn outlives the progress-draft start + // gate. Without this the whole turn finishes in well under a second and + // no draft is created, which is correct behavior but proves nothing. + await delay(readPositiveIntEnv("MOCK_DRAFTPROOF_FINAL_DELAY_MS", 6000)); writeChatCompletion(res, body.stream !== false, "OPENCLAW_E2E_DRAFTPROOF"); return; }