stablyai/orca · error
Unknown ephemeral VM runtime: ${args.runtimeId}
Error message
Unknown ephemeral VM runtime: ${args.runtimeId} What it means
Thrown by the `ephemeralVm:cleanup` IPC handler when `listEphemeralVmRuntimes(userDataPath).find(id === args.runtimeId)` returns undefined. This is a defensive pre-check before delegating to `getRuntimeRecipeContext`; it lets the handler return a `cleanup_failed` status update rather than propagating the recipe-context error. Identical in cause to 1106 but at the IPC handler boundary.
Source
Thrown at src/main/ipc/ephemeral-vm-runtime-handlers.ts:71
ipcMain.handle(
'ephemeralVm:attachWorkspace',
(_event, args: { runtimeId: string; workspaceId: string }): EphemeralVmRuntimeRecord => {
return updateEphemeralVmRuntimeStatus(app.getPath('userData'), args.runtimeId, {
status: 'running',
workspaceId: args.workspaceId
})
}
)
ipcMain.handle(
'ephemeralVm:cleanup',
async (_event, args: { runtimeId: string }): Promise<EphemeralVmRuntimeRecord> => {
const userDataPath = app.getPath('userData')
const runtime = listEphemeralVmRuntimes(userDataPath).find(
(entry) => entry.id === args.runtimeId
)
if (!runtime) {
throw new Error(`Unknown ephemeral VM runtime: ${args.runtimeId}`)
}
if (!runtime.repoId) {
throw new Error(`Ephemeral VM runtime has no repo id: ${args.runtimeId}`)
}
let resolved: ReturnType<typeof getRuntimeRecipeContext>
try {
resolved = getRuntimeRecipeContext(store, userDataPath, runtime.id)
} catch (error) {
return updateEphemeralVmRuntimeStatus(userDataPath, runtime.id, {
status: 'cleanup_failed',
cleanupStatus: 'failed',
cleanupLastAttemptAt: Date.now(),
cleanupLastError: error instanceof Error ? error.message : String(error)
})
}
const result = await cleanupEphemeralVmRuntime({
userDataPath,
repoPath: resolved.repo.repo.path,View on GitHub (pinned to 1136503c6a)
Solutions
- Refresh the runtime list before offering cleanup actions so only live ids are selectable.
- Treat 'Unknown ephemeral VM runtime' on cleanup as a no-op success (the runtime is already gone).
- Verify the runtimeId matches a record from `listEphemeralVmRuntimes` for the current profile before invoking.
Example fix
// before
await ipcRenderer.invoke('ephemeralVm:cleanup', { runtimeId: cachedId })
// after
const live = await ipcRenderer.invoke('ephemeralVm:listRuntimes')
if (!live.some((r) => r.id === cachedId)) {
// already cleaned up; nothing to do
return { status: 'already_clean' }
}
await ipcRenderer.invoke('ephemeralVm:cleanup', { runtimeId: cachedId }) Defensive patterns
Strategy: validation
Validate before calling
// Refresh the runtime list before offering cleanup; only invoke for live ids.
const live = await ipcRenderer.invoke('ephemeralVm:listRuntimes')
if (!live.some((r) => r.id === runtimeId)) {
// already cleaned up; treat as success
return { status: 'already_clean' }
}
await ipcRenderer.invoke('ephemeralVm:cleanup', { runtimeId }) Type guard
function runtimeIdIsLive(list: { id: string }[], id: string): boolean {
return list.some((r) => r.id === id)
} Try / catch
try {
await ipcRenderer.invoke('ephemeralVm:cleanup', { runtimeId })
} catch (e) {
if (e instanceof Error && e.message.startsWith('Unknown ephemeral VM runtime:')) {
// already gone; nothing to clean
return
}
throw e
} Prevention
- Make cleanup idempotent in the UI: a missing runtime is a success, not an error.
- Disable the cleanup action for runtimes no longer in the live list.
- Avoid double-cleanup by tracking in-flight cleanup requests per runtime id.
When it happens
Trigger: Invoking `ipcRenderer.invoke('ephemeralVm:cleanup', { runtimeId })` for a runtime id that is not in the persisted runtime store (already cleaned, expired, wrong profile, or typo).
Common situations: User clicks cleanup on a runtime list that is stale; double-cleanup (the record was already removed by a prior call); runtime id from a different userData profile; id corrupted in transit.
Related errors
- Unknown ephemeral VM runtime: ${runtimeId}
- Unknown ephemeral VM runtime: ${args.runtimeId}
- review file has expired; create a new one before sending
- review file has expired; create a new one before opening
- Recipe not found: ${runtime.recipeId}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/ca6c386253f8c5b6.
Report an issue: GitHub.