{"record":{"id":"8da2f84d96596fda","repo":"jackwener/OpenCLI","slug":"no-chatgpt-response-appeared-before-timeout-re-ru","errorCode":null,"errorMessage":"No ChatGPT response appeared before timeout. Re-run with a higher --timeout if it is still generating.","messagePattern":"No ChatGPT response appeared before timeout\\. Re-run with a higher --timeout if it is still generating\\.","errorType":"exception","errorClass":"TimeoutError","httpStatus":null,"severity":"error","filePath":"clis/chatgpt/utils.js","lineNumber":2238,"sourceCode":"        if (await isGenerating(page)) {\n            stableCount = 0;\n            continue;\n        }\n\n        const messages = await getVisibleMessages(page, { textOnly: true });\n        const candidate = findLatestNewAssistantResponse(messages, prompt, baselinePairCounts);\n        if (!candidate || candidate === String(prompt || '').trim()) continue;\n\n        if (candidate === lastText) {\n            stableCount += 1;\n            if (stableCount >= 2) return candidate;\n        } else {\n            lastText = candidate;\n            stableCount = 0;\n        }\n    }\n\n    throw new TimeoutError(\n        'chatgpt ask',\n        timeoutSeconds,\n        'No ChatGPT response appeared before timeout. Re-run with a higher --timeout if it is still generating.',\n    );\n}\n\nexport async function getConversationList(page) {\n    // ensureOnChatGPT already waits for the composer selector after navigation,\n    // so the previous standalone 2 s settle is redundant.\n    await ensureOnChatGPT(page);\n\n    const openSidebar = requireBooleanEvaluateResult(unwrapEvaluateResult(await page.evaluate(`(() => {\n        const button = Array.from(document.querySelectorAll('button'))\n            .find((node) => /open sidebar/i.test(node.getAttribute('aria-label') || ''));\n        if (button instanceof HTMLElement) {\n            button.click();\n            return true;\n        }","sourceCodeStart":2220,"sourceCodeEnd":2256,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/chatgpt/utils.js#L2220-L2256","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// before\nawait chatgptAsk(page, hugePrompt);              // default timeout\n// after\nawait chatgptAsk(page, hugePrompt, { timeout: 900 }); // 15 min","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await waitForChatGPTAskResult(page, { timeoutSeconds: 120 });\n} catch (e) {\n  if (e instanceof TimeoutError && e.operation === 'chatgpt ask') {\n    await page.sleep(30); // backoff\n    // retry with timeoutSeconds: 600, after checking for rate-limit banners\n  } else throw e;\n}","preventionTips":["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"],"tags":["timeout","chatgpt","ask","no-response"],"backgroundTag":"operation-timed-out","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}