jackwener/OpenCLI · warning · TimeoutError
点点没有在超时时间内返回答案;可以重试或提高 --timeout。
Error message
点点没有在超时时间内返回答案;可以重试或提高 --timeout。
What it means
After sending a query to Xiaohongshu's 点点 assistant, the in-page script reports a raw error; mapAskError translates 'answer_timeout' into a TimeoutError noting that 点点 did not return an answer within the configured --timeout seconds. The message suggests retrying or raising --timeout. It is a mapped, expected failure mode rather than a bug.
Source
Thrown at clis/xiaohongshu/ask.js:366
error: String(err?.message || err || 'unknown_error'),
stack: String(err?.stack || '').slice(0, 1500),
page_url: location.href,
};
}
})()
`;
}
function requirePrompt(query) {
const prompt = String(query || '').trim();
if (!prompt) throw new ArgumentError('query is required');
return prompt;
}
function mapAskError(raw, timeoutSeconds) {
const error = compactSingleLine(raw?.error);
if (error === 'answer_timeout') {
throw new TimeoutError('xiaohongshu ask', timeoutSeconds, '点点没有在超时时间内返回答案;可以重试或提高 --timeout。');
}
if (error === 'send_message_failed') {
throw new AuthRequiredError(XHS_WEB_HOST, 'Xiaohongshu 点点 did not accept the query. Check login status for www.xiaohongshu.com.');
}
throw new CommandExecutionError(
`xiaohongshu ask failed: ${error || 'unknown error'}`,
raw?.page_url ? `Page URL: ${raw.page_url}` : undefined,
);
}
function requireAskPayload(raw) {
if (!raw || typeof raw !== 'object') {
throw new CommandExecutionError('xiaohongshu ask returned a malformed page payload');
}
const answer = cleanText(raw.answer || raw.base_info?.text || '');
if (!answer) {
throw new CommandExecutionError('xiaohongshu ask returned a malformed page payload: missing answer');
}View on GitHub (pinned to 49907e53dc)
Solutions
- Retry the same query — the timeout is often transient
- Increase --timeout up to 180: opencli xiaohongshu ask --timeout 180 "..."
- Simplify or split the query into smaller questions 点点 can answer faster
- Verify the xiaohongshu login session is healthy and the site is reachable, then retry
Example fix
// before opencli xiaohongshu ask --timeout 90 "very complex multi-part question" // after opencli xiaohongshu ask --timeout 180 "very complex multi-part question"
Defensive patterns
Strategy: retry
Validate before calling
null
Type guard
null
Try / catch
const { TimeoutError } = errors;
try {
return await xiaohongshuAsk({ query, timeout: 180 });
} catch (e) {
if (e instanceof TimeoutError && /answer/.test(e.command || '')) {
await sleep(5000);
return xiaohongshuAsk({ query, timeout: 180 }); // one retry
}
throw e;
} Prevention
- Set --timeout 180 up front for complex or multi-part questions
- Split big questions into smaller ones 点点 answers within 90s
- Check xiaohongshu service health/login before long batch ask runs
- Implement one retry with backoff for answer_timeout specifically
When it happens
Trigger: The raw in-page result contains error === 'answer_timeout' — the assistant conversation never produced a final answer within timeoutSeconds (1–180, default 90).
Common situations: Very complex/slow queries where 点点 needs longer than the default 90s; degraded backend latency on xiaohongshu's side; heavy network latency; asking during peak hours.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- 文字配图: "${GENERATE_LABEL}" did not advance to the 预览图片 step.
- Editing form did not appear after image acquisition. The pag
- ${verb} could not be verified: no success marker or post-sub
- xiaohongshu search content
- Unexpected 12306 probe: ${JSON.stringify(probe)}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/7cd90c6565427317.
Report an issue: GitHub.