stablyai/orca · error · Error
Failed to send prompt
Error message
Failed to send prompt
What it means
Thrown when `terminal.send` (the prompt text, enter:true) returns a failure during PR AI triage launch - step two after the terminal was created. The host's error.message is preferred; the literal is the fallback.
Source
Thrown at mobile/src/session/pr-ai-triage-launch.ts:37
worktree: `id:${worktreeId}`,
activate: false,
select: true,
navigation: 'caller'
})
if (!created.ok) {
throw new Error(created.error?.message || 'Failed to create terminal')
}
const terminalTab = readMobileReviewCreatedTerminal(created.result)
if (!terminalTab) {
throw new Error('Created terminal response was invalid')
}
const sent = await client.sendRequest('terminal.send', {
terminal: terminalTab.terminal,
text: prompt,
enter: true
})
if (!sent.ok) {
throw new Error(sent.error?.message || 'Failed to send prompt')
}
if (!readMobileReviewTerminalSendAccepted(sent.result)) {
throw new Error('Terminal input is locked')
}
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Retry the whole launch (create + send) after reconnecting.
- Check the terminal still exists.
- Inspect host PTY logs.
- Ensure no host-side input lock is active.
Example fix
// before
if (!sent.ok) {
throw new Error(sent.error?.message || 'Failed to send prompt')
}
// after
if (!sent.ok) {
throw new RpcMethodError('terminal.send', sent.error)
} Defensive patterns
Strategy: try-catch
Type guard
function isRpcFailure(r: RpcResponse): r is RpcFailure {
return r.ok === false
} Try / catch
try {
await createTerminalAndSendPrompt(client, worktreeId, prompt)
} catch (err) {
setTriageError(err instanceof Error ? err.message : 'Could not deliver the AI prompt')
} Prevention
- Re-verify the terminal handle immediately before send.
- Retry create+send as a unit on transient failures.
- Surface host error.message verbatim for diagnosability.
When it happens
Trigger: Terminal handle became invalid between create and send (closed/disposed), host PTY error, or a transport failure on the one-shot. The prompt is plain text so content-based rejection is unlikely.
Common situations: Terminal closed on the host between the two RPCs; relay hiccup; host PTY spawn failure; a host-side permission prompt blocking the send.
Related errors
- Failed to create terminal
- Terminal input is locked
- Unable to read markdown
- Waiting for desktop...
- Failed to save review notes
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/0487c9c4b15094ff.
Report an issue: GitHub.