coleam00/Archon · error · WorkflowAdoptionError
Cannot adopt run '${options.adoptRunId}': workflow '${workfl
Error message
Cannot adopt run '${options.adoptRunId}': workflow '${workflow.name}' disables worktrees, so there is no worktree or branch estate to inherit. Drop the adoption or run a worktree-isolated workflow. What it means
WorkflowAdoptionError thrown by dispatchOrchestratorWorkflowOwned when a run adoption (adoptRunId) is requested while the target workflow explicitly disables worktrees (workflow.worktree.enabled === false) and the adoption lane is not in-place. Adoption inherits the previous run's worktree/branch estate; with worktrees disabled there is nothing to inherit, so the engine refuses rather than silently dropping the adoption.
Source
Thrown at packages/core/src/orchestrator/orchestrator-agent.ts:799
await resolveWorkflowAdoption({
adoptedRunId: options.adoptRunId,
codebaseId: codebase.id,
codebasePath: codebase.default_cwd,
codebaseKind: codebase.kind,
})
).lane
: undefined;
// A lane other than in-place inherits a worktree or branch estate; a workflow
// that opted out of worktrees runs in the parent checkout and has nothing to
// inherit, so honoring the adoption would mean silently dropping the lane.
if (
options?.adoptRunId !== undefined &&
adoptionLane !== undefined &&
adoptionLane.kind !== 'in-place' &&
workflow.worktree?.enabled === false
) {
throw new WorkflowAdoptionError(
`Cannot adopt run '${options.adoptRunId}': workflow '${workflow.name}' disables ` +
'worktrees, so there is no worktree or branch estate to inherit. ' +
'Drop the adoption or run a worktree-isolated workflow.'
);
}
// Per-child isolation resolver (#2121 slice 2, PR-A): a `workflow:` node with
// `isolation: 'worktree'` gets its own worktree per child. Built for git-repo
// codebases only — a folder project can't make worktrees, so the engine fails
// such a node fast (no resolver injected). Shared across every dispatch below.
const resolveChildIsolation =
codebase.kind !== 'folder'
? createChildWorktreeResolver({
codebaseId: codebase.id,
codebaseName: codebase.name,
canonicalRepoPath: codebase.default_cwd,
baseBranch: codebaseBaseBranch,
createdByPlatform: platform.getPlatformType(),View on GitHub (pinned to 0773b97458)
Solutions
- Drop the adoptRunId option and dispatch without adoption.
- Enable worktrees on the workflow (worktree.enabled: true) so there is an estate to inherit.
- If in-place continuation is acceptable, configure the adoption lane as in-place.
Example fix
// before
await dispatchOrchestratorWorkflow({ adoptRunId: runId }); // workflow has worktree.enabled: false
// after
await dispatchOrchestratorWorkflow({ adoptRunId: runId }); // with worktree.enabled: true
// or
await dispatchOrchestratorWorkflow({}); // no adoption Defensive patterns
Strategy: validation
Validate before calling
if (adoptRunId && workflow.worktree?.enabled === false) {
throw new Error('Adoption requires a worktree-enabled workflow');
} Try / catch
try {
await dispatchOrchestratorWorkflow({ adoptRunId });
} catch (e) {
if (e instanceof WorkflowAdoptionError && e.message.includes('disables worktrees')) {
await dispatchOrchestratorWorkflow({}); // dispatch without adoption
} else throw e;
} Prevention
- Check workflow.worktree.enabled before offering adoption in UIs or commands.
- Keep workflows that support adoption worktree-enabled.
- Document that adoption requires an inheritable worktree/branch estate.
When it happens
Trigger: Dispatching the orchestrator workflow with options.adoptRunId set while the workflow definition sets worktree.enabled: false and the computed adoption lane is not 'in-place'.
Common situations: Reusing an adoption-capable command or platform message against a workflow that was switched to run in-place only; a user asks to 'continue that run in a fresh checkout' but the workflow is configured without worktrees.
Related errors
- Cannot adopt run '${options.adoptRunId}': this conversation
- Cannot adopt ${worktreePath}: .git pointer is not a git-work
- Cannot adopt worktree at '${worktreePath}': expected branch
- Cannot determine git remote for ${repoPath}: no git remote i
- Node '${node.id}': unknown provider '${provider}'. Registere
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/0dfc8fb11a08bd41.
Report an issue: GitHub.