jackwener/OpenCLI · error · CommandExecutionError
Failed to send Yuanbao prompt
Error message
Failed to send Yuanbao prompt
What it means
The prompt was accepted as input but sendYuanbaoMessage failed to actually deliver it to the chat composer. The library checks the login gate once more (throwing a clearer auth error if present) and otherwise raises CommandExecutionError with send.reason plus a hint that the composer must be visible and enabled.
Source
Thrown at clis/yuanbao/send.js:48
if (!prompt) throw new ArgumentError('prompt', 'is required');
const startFresh = normalizeBooleanFlag(kwargs.new, false);
await ensureYuanbaoPage(page);
if (await hasLoginGate(page)) {
throw authRequired('Yuanbao opened a login gate before sending the prompt.');
}
if (startFresh) {
const action = await startNewYuanbaoChat(page);
if (action === 'blocked') {
throw authRequired('Yuanbao opened a login gate while starting a new chat.');
}
}
const send = await sendYuanbaoMessage(page, prompt);
if (!send?.ok) {
if (await hasLoginGate(page)) {
throw authRequired('Yuanbao opened a login gate instead of accepting the prompt.');
}
throw new CommandExecutionError(
send?.reason || 'Failed to send Yuanbao prompt',
send?.detail
? `Detail: ${send.detail}`
: 'Make sure the Yuanbao chat composer is visible and not in a disabled state.',
);
}
return [{ Status: 'sent', Prompt: prompt }];
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Re-run the command; transient composer/render races often succeed on retry
- Check for a login gate or modal overlay in the automation browser and dismiss/expand it
- Re-run with -v to see the `Detail:` line from the error for the concrete send reason
- Maximize/resize the browser context so the composer is visible and not in a disabled state
- Update the CLI if Yuanbao changed its chat UI markup
Defensive patterns
Strategy: retry
Validate before calling
// No reliable pre-check exposed; ensure composer is visible in the page
const composerVisible = await page.evaluate(`!!document.querySelector('[contenteditable], textarea') && !document.querySelector('[contenteditable], textarea').disabled`); Try / catch
try {
await cli.yuanbaoSend(prompt);
} catch (e) {
if (e.name === 'CommandExecutionError' && /Failed to send Yuanbao prompt/.test(e.message)) {
await sleep(2000);
await cli.yuanbaoSend(prompt); // one retry
} else throw e;
} Prevention
- Dismiss modal overlays (upgrade banners, rate-limit notices) before sending
- Keep the browser viewport large enough that the composer stays visible
- Retry once with a delay — many failures are transient render races
- Run with -v to capture the send.reason/Detail for persistent failures
- Update the CLI after Yuanbao UI changes
When it happens
Trigger: sendYuanbaoMessage returns {ok:false} — composer selector not found or disabled, page re-rendered mid-send, network/submit failure inside the evaluate, or an overlay covering the input box.
Common situations: Yuanbao A/B UI change breaking composer selectors; a modal (rate-limit notice, upgrade banner) disabling the input; browser window too small hiding the composer; transient network hiccup during submit.
Related errors
- Zhihu ${label} request failed: ${error instanceof Error ? er
- Failed to fetch Douyin comments for video ${awemeId}: ${erro
- composer type failed
- Send button click failed
- Copy button not visible
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/d3c8ec205e4ad8cd.
Report an issue: GitHub.