can1357/oh-my-pi · error · Error
No isolation backend is available.
Error message
No isolation backend is available.
What it means
ensureIsolation tries each available isolation backend (e.g. git worktree, fallbacks) in order; each failure's message is recorded as fallbackReason. If every backend fails — or none is compiled/available — it throws with the last failure reason, or the generic message when no reason was captured.
Source
Thrown at packages/coding-agent/src/task/worktree.ts:545
// frozen repo that still borrows the source object DB via alternates.
await vcs.detachGitDir(mergedDir, sourceCommonDir);
return {
mergedDir,
backend: candidate,
fellBack: candidate !== resolution.kind || resolution.fellBack,
fallbackReason,
};
} catch (err) {
await fs.rm(baseDir, { recursive: true, force: true });
const message = errorMessage(err);
if (!natives.isoIsUnavailableError(message)) {
throw err;
}
fallbackReason ??= message;
}
}
throw new Error(fallbackReason ?? "No isolation backend is available.");
}
/** Tear down a handle returned by {@link ensureIsolation}. */
export async function cleanupIsolation(handle: IsolationHandle): Promise<void> {
try {
try {
await natives.isoStop(handle.backend, handle.mergedDir);
} catch (err) {
logger.warn("isolation backend stop failed during cleanup", {
backend: handle.backend,
mergedDir: handle.mergedDir,
error: err instanceof Error ? err.message : String(err),
});
}
} finally {
// baseDir is the parent of the merged directory
const baseDir = path.dirname(handle.mergedDir);
await fs.rm(baseDir, { recursive: true, force: true });View on GitHub (pinned to 9690622007)
Solutions
- Ensure the workspace is a valid Git repository so the worktree backend is available
- Read any preceding log/fallback messages for the underlying per-backend failure
- Disable isolation via `task.isolation.mode: none` if isolation is not required
Example fix
// before: subagent task in non-git dir $ omp // -> No isolation backend is available. // after $ git init && omp
Defensive patterns
Strategy: try-catch
Validate before calling
// check a worktree-capable git repo exists before requesting isolation const root = await getRepoRoot(cwd); // throws early with a specific reason if not
Try / catch
let handle: IsolationHandle | null = null;
try {
handle = await ensureIsolation(opts);
} catch (err) {
logger.warn("Isolation unavailable, running in-place", { reason: (err as Error).message });
return runInPlace(opts);
} Prevention
- Keep the workspace a valid git repo so the worktree backend is always available
- Read fallbackReason messages in logs to know which backend failed and why
- Set task.isolation.mode explicitly rather than relying on auto-detection
When it happens
Trigger: Calling ensureIsolation (directly or via runIsolatedSubprocess/handle) when no backend attempt succeeded and fallbackReason was never set — i.e. zero backends were available to try in the current environment.
Common situations: Running in a workspace with no Git repo and no other isolation backend; stripped-down builds or environments where backend detection finds nothing; all backends failed with errors that were rethrown rather than recorded.
Related errors
- Isolated subagent execution could not be prepared: ${message
- not a repository: {path}
- reference not found: {name}
- object not found: {spec}
- cherry-pick of {sha} is empty
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/a4ba82ede1514534.
Report an issue: GitHub.