jackwener/OpenCLI · error · TimeoutError
No ChatGPT response appeared before timeout. Re-run with a h
Error message
No ChatGPT response appeared before timeout. Re-run with a higher --timeout if it is still generating.
What it means
TimeoutError raised when waiting for ChatGPT's answer: the ask loop watches the response text for stability (generation finished) but no response text ever appeared before timeoutSeconds elapsed.
Source
Thrown at clis/chatgpt/utils.js:2238
if (await isGenerating(page)) {
stableCount = 0;
continue;
}
const messages = await getVisibleMessages(page, { textOnly: true });
const candidate = findLatestNewAssistantResponse(messages, prompt, baselinePairCounts);
if (!candidate || candidate === String(prompt || '').trim()) continue;
if (candidate === lastText) {
stableCount += 1;
if (stableCount >= 2) return candidate;
} else {
lastText = candidate;
stableCount = 0;
}
}
throw new TimeoutError(
'chatgpt ask',
timeoutSeconds,
'No ChatGPT response appeared before timeout. Re-run with a higher --timeout if it is still generating.',
);
}
export async function getConversationList(page) {
// ensureOnChatGPT already waits for the composer selector after navigation,
// so the previous standalone 2 s settle is redundant.
await ensureOnChatGPT(page);
const openSidebar = requireBooleanEvaluateResult(unwrapEvaluateResult(await page.evaluate(`(() => {
const button = Array.from(document.querySelectorAll('button'))
.find((node) => /open sidebar/i.test(node.getAttribute('aria-label') || ''));
if (button instanceof HTMLElement) {
button.click();
return true;
}View on GitHub (pinned to 49907e53dc)
Solutions
- Re-run with a higher --timeout as the message suggests
- Check the browser/conversation for rate-limit or error banners and retry after backoff
- Verify the session is logged in and not blocked (ensureChatGPTLogin)
- Split very large prompts or move long-running tasks to the deep-research flow with its own timeout
Example fix
// before
await chatgptAsk(page, hugePrompt); // default timeout
// after
await chatgptAsk(page, hugePrompt, { timeout: 900 }); // 15 min Defensive patterns
Strategy: retry
Try / catch
try {
await waitForChatGPTAskResult(page, { timeoutSeconds: 120 });
} catch (e) {
if (e instanceof TimeoutError && e.operation === 'chatgpt ask') {
await page.sleep(30); // backoff
// retry with timeoutSeconds: 600, after checking for rate-limit banners
} else throw e;
} Prevention
- Set --timeout generously for long generations or tool-using prompts
- Detect rate-limit/capacity banners and back off before retrying
- Verify login state before the ask so a dead session doesn't burn the whole timeout
When it happens
Trigger: chatgpt ask wait loop polled until timeout with candidate text always empty/unchanged-empty — the model never started streaming a reply (still 'generating', refused, or an error state in the composer).
Common situations: Very long generation exceeding the default --timeout; ChatGPT rate-limit or capacity banner instead of a reply; prompt triggered a tool/deep-research that takes far longer; session degraded so no response renders.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- --timeout must be a positive integer (seconds)
- chatgpt image
- chatgpt detail
- chatgpt deep-research-result
- No finished image appeared before timeout. Re-run with a hig
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/8da2f84d96596fda.
Report an issue: GitHub.