jackwener/OpenCLI · error · TimeoutError
chatgpt deep-research-result
Error message
chatgpt deep-research-result
What it means
TimeoutError raised while polling for a Deep Research result. The library polls page state until status becomes a terminal value ('completed', etc.); if it stays 'running'/'not_ready' past timeoutSeconds it gives up with this error.
Source
Thrown at clis/chatgpt/utils.js:2123
return { ...result, stableSeconds: 0 };
}
if (result.report === lastReport) {
if (!stableStartedAt) stableStartedAt = Date.now();
const elapsedSeconds = Math.floor((Date.now() - stableStartedAt) / 1000);
if (elapsedSeconds >= stableSeconds) {
return { ...result, stableSeconds: elapsedSeconds };
}
} else {
lastReport = result.report;
stableStartedAt = Date.now();
}
} else if (result.status !== 'running' && result.status !== 'not_ready') {
return result;
}
await page.sleep(3);
}
throw new TimeoutError(
'chatgpt deep-research-result',
timeoutSeconds,
'Deep Research did not complete or become extractable before timeout.',
);
}
export function messageHtmlToMarkdown(html) {
try {
return htmlToMarkdown(html).trim();
} catch {
return String(html || '').replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim();
}
}
export async function getBubbleCount(page) {
const messages = await getVisibleMessages(page);
return messages.length;
}View on GitHub (pinned to 49907e53dc)
Solutions
- Re-run with a larger --timeout (deep research can take many minutes)
- Check the conversation manually in the browser — if the result finished later, extract it directly from the conversation payload
- Verify network connectivity / ChatGPT service status if the run appears stuck indefinitely
- Retry the deep research request if the run is hung
Example fix
// before
await chatgptDeepResearch(prompt); // default timeout
// after
await chatgptDeepResearch(prompt, { timeout: 1800 }); // 30 min Defensive patterns
Strategy: retry
Try / catch
try {
await waitForChatGPTDeepResearchResult(page, { conversationId, timeoutSeconds: 300 });
} catch (e) {
if (e instanceof TimeoutError && e.operation === 'chatgpt deep-research-result') {
// retry with a much larger timeout, or extract the result from the conversation payload directly
} else throw e;
} Prevention
- Budget 10-30+ minutes for deep research tasks in --timeout
- Check the conversation manually before retrying — the result may have completed after the deadline
- Prefer extracting from the conversation payload/network capture if the run completes late
When it happens
Trigger: waitForChatGPTDeepResearchResult looped for timeoutSeconds, re-checking every ~3s, and the result never transitioned out of running/not_ready — the research is still executing or the completion signal was never observed.
Common situations: Deep Research genuinely takes longer than the default timeout (complex queries can run 10+ minutes); stuck 'running' badge due to a hung backend task; user kept --timeout too low.
Related errors
- chatgpt deep-research-result
- --timeout must be a positive integer (seconds)
- chatgpt image
- chatgpt detail
- Malformed ChatGPT conversation payload for Deep Research ext
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/527c66198605cef9.
Report an issue: GitHub.