jackwener/OpenCLI · error · TimeoutError
chatgpt detail
Error message
chatgpt detail
What it means
The chatgpt conversation-detail/wait routine polls the page for the conversation to finish and reach a stable state (unchanged lastKey for the stability window). If it does not stabilize within timeoutSeconds, a TimeoutError is thrown with a hint to raise --timeout.
Source
Thrown at clis/chatgpt/utils.js:1305
wantMarkdown,
generating: false,
stableSeconds: elapsedSeconds,
}),
generating: false,
};
}
} else {
lastKey = key;
stableStartedAt = Date.now();
}
} else {
lastKey = key;
stableStartedAt = 0;
}
await page.sleep(3);
}
throw new TimeoutError(
'chatgpt detail',
timeoutSeconds,
'Conversation did not finish or stabilize before timeout. Re-run with a higher --timeout if it is still generating.',
);
}
function normalizeDeepResearchText(value) {
return String(value || '')
.replace(/\u00a0/g, ' ')
.replace(/[ \t]+\n/g, '\n')
.replace(/\n{3,}/g, '\n\n')
.trim();
}
function looksLikeDeepResearchReport(text) {
const normalized = normalizeDeepResearchText(text);
if (normalized.length < 500) return false;
return /(^|\n)\s*#{1,3}\s+\S|Sources|References|参考|来源|结论|建议|Executive Summary|摘要/i.test(normalized);View on GitHub (pinned to 49907e53dc)
Solutions
- Re-run with a higher --timeout value, as the error hint suggests
- Check the ChatGPT session is still logged in and not blocked by captcha/rate limits
- Retry on a more stable network connection
- If the conversation is genuinely stuck, send a new message to unstick it before re-running
Example fix
// before opencli chatgpt read --url 'https://chatgpt.com/c/abc' --timeout 30 // after opencli chatgpt read --url 'https://chatgpt.com/c/abc' --timeout 120
Defensive patterns
Strategy: retry
Validate before calling
if (typeof timeoutSeconds !== 'number' || timeoutSeconds < 60) {
timeoutSeconds = 120; // long generations need headroom
} Try / catch
try {
const detail = await getChatGPTDetail(page, { timeoutSeconds: 120 });
} catch (err) {
if (err instanceof TimeoutError && err.operation === 'chatgpt detail') {
const detail = await getChatGPTDetail(page, { timeoutSeconds: 300 });
} else throw err;
} Prevention
- Set --timeout generously (120s+) for long conversations
- Check the session is authenticated and not rate-limited before starting long waits
- Retry once with a doubled timeout before giving up
- Verify the conversation has actually stopped streaming if it times out repeatedly
When it happens
Trigger: Calling a chatgpt command that waits for a completed/stable conversation while the model is still generating a long response, the stream stalls, the session is rate-limited or logged out mid-run, or the stability detection key keeps changing due to live UI updates.
Common situations: Very long generations exceeding the default --timeout; slow network or throttled account; ChatGPT UI showing a captcha/login prompt so the conversation never progresses; polling a conversation that keeps auto-updating.
Related errors
- Timeout waiting for Antigravity reply after ${timeout / 1000
- Bilibili relation modify did not verify ${expectedLabel}; la
- --timeout must be a positive integer (seconds)
- chatgpt image
- chatgpt deep-research-result
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/b2daee1c4ce436fe.
Report an issue: GitHub.