Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
import type { RuntimeTerminalListResult } from '../../../src/shared/runtime-types'
// Retry host liveness and mid-mount binding refusals instead of ending the observation poll.
const TRANSIENT_INVENTORY_REFUSALS = [
'terminal_liveness_unavailable',
'terminal_surface_ownership_unavailable'
]
export async function readFreshTerminalInventory(
read: () => Promise<RuntimeTerminalListResult>
): Promise<RuntimeTerminalListResult | null> {
try {
return await read()
} catch (error) {
if (
error instanceof Error &&
TRANSIENT_INVENTORY_REFUSALS.some((refusal) => error.message.includes(refusal))
) {
return null
}
throw error
}
}