stablyai/orca · error
Recipe not found: ${runtime.recipeId}
Error message
Recipe not found: ${runtime.recipeId} What it means
Thrown by `getRuntimeRecipeContext` when the runtime record exists and has a `repoId`, but no recipe with id `runtime.recipeId` is found. The resolver tries `runtime.recipe` (a snapshot retained on the record) first, then falls back to the repo's current `environmentRecipes` loaded via `loadHooks(repo.repo.path)`. A miss means the recipe was removed from `.orca/hooks` after the runtime was created and no snapshot was kept on the runtime record (a pre-snapshot runtime).
Source
Thrown at src/main/ipc/ephemeral-vm-recipe-context.ts:121
if (!runtime) {
throw new Error(`Unknown ephemeral VM runtime: ${runtimeId}`)
}
if (!runtime.repoId) {
throw new Error(`Ephemeral VM runtime has no repo id: ${runtimeId}`)
}
const repo = getRecipeRepo(store, runtime.repoId)
if (!repo.ok) {
throw new Error(repo.message)
}
// Pre-snapshot runtimes can only be attributed to repo-owned recipes. Never
// substitute a later same-id plugin recipe for an older runtime lifecycle.
const recipe =
runtime.recipe ??
(loadHooks(repo.repo.path)?.environmentRecipes ?? []).find(
(entry) => entry.id === runtime.recipeId
)
if (!recipe) {
throw new Error(`Recipe not found: ${runtime.recipeId}`)
}
return { runtime, repo, recipe }
}
export function resolveRecipeForRepo(
repoPath: string,
recipeId: string,
pluginRecipes: readonly OrcaVmRecipe[] = []
): OrcaVmRecipe | null {
return (
combineEphemeralVmRecipes(loadHooks(repoPath)?.environmentRecipes ?? [], pluginRecipes).find(
(recipe) => recipe.id === recipeId
) ?? null
)
}
/** Project-owned recipes are authoritative for their repository and shadow
* same-id global plugin recipes without disabling the rest of the pack. */View on GitHub (pinned to 1136503c6a)
Solutions
- Restore the recipe with id `runtime.recipeId` in the repo's `.orca/hooks`, or re-add it under the same id.
- If restoration is impossible, mark the runtime as orphaned and offer the user a recreate-from-current-recipes flow.
- For runtimes you create going forward, ensure the runtime record stores a recipe snapshot so later repo edits cannot orphan it.
Example fix
// before
const ctx = getRuntimeRecipeContext(store, userDataPath, runtimeId)
// throws 'Recipe not found: <id>'
// after
try {
const ctx = getRuntimeRecipeContext(store, userDataPath, runtimeId)
} catch (e) {
if (e.message.startsWith('Recipe not found:')) {
markRuntimeOrphaned(userDataPath, runtimeId)
promptRecreateFromCurrentRecipes()
return
}
throw e
} Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check: does the repo still advertise the recipe, or does the runtime carry a snapshot?
const runtime = listEphemeralVmRuntimes(userDataPath).find((r) => r.id === runtimeId)
if (!runtime) return null
if (!runtime.recipe) {
const hooks = loadHooks(repo.repo.path)
if (!(hooks?.environmentRecipes ?? []).some((r) => r.id === runtime.recipeId)) {
// recipe gone; do not call getRuntimeRecipeContext
return null
}
}
return getRuntimeRecipeContext(store, userDataPath, runtimeId) Type guard
function runtimeHasResolvableRecipe(runtime: { recipe?: unknown; recipeId: string }, recipes: { id: string }[]): boolean {
return Boolean(runtime.recipe) || recipes.some((r) => r.id === runtime.recipeId)
} Try / catch
try {
return getRuntimeRecipeContext(store, userDataPath, runtimeId)
} catch (e) {
if (e instanceof Error && e.message.startsWith('Recipe not found:')) {
markRuntimeOrphaned(userDataPath, runtimeId)
promptRecreateFromCurrentRecipes()
return null
}
throw e
} Prevention
- Always snapshot the recipe onto the runtime record at creation time so later repo edits cannot orphan it.
- Warn before deleting/renaming a recipe in .orca/hooks if runtimes reference it.
- Offer a recreate flow when a recipe is missing rather than leaving the runtime unusable.
When it happens
Trigger: A pre-snapshot runtime whose `recipeId` no longer exists in the owning repo's `.orca/hooks` environment recipes, and whose runtime record carries no `runtime.recipe` snapshot.
Common situations: Repo's `.orca/hooks` recipe was renamed/deleted between runtime creation and a later operation that needs recipe context; upgrading Orca across a version where recipe ids changed; a runtime record written before the snapshot field was introduced.
Related errors
- Unknown ephemeral VM runtime: ${runtimeId}
- Unknown ephemeral VM runtime: ${args.runtimeId}
- orchestration_migration_required
- invalid_argument
- invalid_argument
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/38f039697edc888d.
Report an issue: GitHub.