coleam00/Archon · error
workflow '${workflow.name}' is not present in the captured s
Error message
workflow '${workflow.name}' is not present in the captured source What it means
After a workflow source is captured (preparedSource), dispatchBackgroundWorkflowOwned re-resolves the requested workflow name against the workflows actually present in the captured source. If resolveWorkflowName cannot find it, the throw prevents dispatching a workflow that does not exist in that snapshot. This guards against name drift between what was requested and what was captured.
Source
Thrown at packages/core/src/orchestrator/orchestrator.ts:556
preparedSource = await prepareWorkflowSource(workflowDeps, {
sourceRoot: workflowSourceRoot,
});
// From here the owner reclaims it unless a run adopts it, whichever way we leave.
owner.hold(preparedSource);
// See the note in orchestrator-agent.ts: an empty capture means the definition came
// from a binary's embedded bundled set, which has nothing on disk to re-read.
if (preparedSource.manifest.scopes.length > 0) {
const { workflows: capturedWorkflows } = await discoverWorkflowsWithConfig(
workerCwd,
loadConfig,
preparedSource.roots
);
const reResolved = resolveWorkflowName(
workflow.name,
capturedWorkflows.map(w => w.workflow)
);
if (!reResolved) {
throw new Error(`workflow '${workflow.name}' is not present in the captured source`);
}
workflow = reResolved;
}
await recordSelectedWorkflow(preparedSource.captureRoot, workflow.name);
} catch (error) {
const err = error as Error;
// Reclaim before returning: this branch is the console's default dispatch path, and
// leaving the tree behind here leaks one capture per failed dispatch.
getLog().error({ err, workflowName: workflow.name }, 'workflow.source_capture_failed');
await ctx.platform.sendMessage(
ctx.conversationId,
`Could not capture the workflow source for **${workflow.name}**: ${err.message}. ` +
'Nothing has been started.'
);
return;
}
// 7. Pre-create workflow run row so the UI can fetch it immediately.View on GitHub (pinned to 0773b97458)
Solutions
- List the workflows available in the captured source and use an exact present name.
- Re-capture the workflow source from the branch/commit that actually contains the workflow.
- Fix the workflow name in the dispatch request (typos, case, path vs name).
- Commit the workflow file to the repository branch being captured.
Example fix
// before
resolveWorkflowName('fix-issue', capturedWorkflows.map(w => w.workflow)); // null
// after: dispatch with a name present in the captured source
resolveWorkflowName('coding/fix-issue', capturedWorkflows.map(w => w.workflow)); Defensive patterns
Strategy: validation
Validate before calling
const available = capturedWorkflows.map(w => w.workflow);
if (!available.some(w => resolveWorkflowName(requestedName, available))) {
throw new Error(`workflow ${requestedName} not in captured source; available: ${available.map(w => w.name)}`);
} Try / catch
try {
await dispatchBackgroundWorkflow(req);
} catch (e) {
if (e.message.includes('not present in the captured source')) {
console.error('Re-capture source or fix the workflow name');
} else throw e;
} Prevention
- List workflows in the captured source before dispatching by name.
- Pin dispatches to a branch that is known to contain the workflow.
- Update callers promptly when a workflow is renamed or moved.
When it happens
Trigger: Dispatching by workflow name when the captured source (repo/branch/capture root) does not contain that workflow — renamed workflow file, wrong branch captured, workflows moved or deleted, or a name that only resolves loosely and fails the strict re-resolution.
Common situations: Workflow renamed upstream after a caller pinned the old name; dispatching against an old pinned branch/commit that lacks the new workflow; bundling a custom workflow pack that was never committed to the captured source.
Related errors
- No workflow run matches prefix '${runId}' in this project.
- Workflow run not found: ${resolvedId}
- Cannot dispatch workflow "${workflow.name}": codebase ${ctx.
- Repository ${owner}/${repo} not found or is private. Check r
- Cannot execute run '${detachedPreCreatedRun.id}': it belongs
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/c078d0810a0b0249.
Report an issue: GitHub.