coleam00/Archon · warning · Error
Workflow did not produce a result.
Error message
Workflow did not produce a result.
What it means
After `executeWorkflow` returns, the CLI narrows `result` before checking terminal status; if it is somehow undefined the guard throws 'Workflow did not produce a result.' Per the inline comment this is practically unreachable — executeWorkflow throws on failure — and exists to satisfy TypeScript narrowing for the terminal-result checks.
Source
Thrown at packages/cli/src/commands/workflow.ts:3188
);
containerTeardownError = destroyErr as Error;
}
}
}
// A container teardown failure on an otherwise-SUCCESSFUL run must fail the CLI
// (non-zero exit) — a leaked privileged container is not a success. On a failed
// run the workflow-failed error below already exits non-zero (the leak was
// logged loudly above), so don't mask it.
if (containerTeardownError && result?.success) {
throw containerTeardownError;
}
if (!result) {
// executeWorkflow threw and it was re-thrown out of the try; this line is
// unreachable in practice (the throw propagates), but it satisfies the
// narrowing for the terminal-result checks below.
throw new Error('Workflow did not produce a result.');
}
// Check result and exit appropriately
if (result.success && 'paused' in result && result.paused) {
console.log('\nWorkflow paused — waiting for approval.');
} else if (result.success) {
// Surface workflow result to Web UI as a result card (mirrors orchestrator.ts result message).
// Paused workflows are handled in the branch above and intentionally do not get a result card.
if ('summary' in result && result.summary) {
try {
await adapter.sendMessage(conversationId, result.summary, {
category: 'workflow_result',
segment: 'new',
workflowResult: { workflowName: workflow.name, runId: result.workflowRunId },
});
} catch (surfaceError) {
getLog().warn(
{ err: surfaceError as Error, conversationId },View on GitHub (pinned to 0773b97458)
Solutions
- File a bug with log output; the executor must either throw or return a result.
- Check for local modifications or version mismatches in the workflow executor package.
- Re-run the workflow; a one-off engine fault could theoretically skip result construction.
Defensive patterns
Strategy: type-guard
Validate before calling
// treat a void return as an engine contract violation
const result = await executeWorkflow(...);
if (result !== undefined && typeof result.success !== 'boolean') {
throw new Error('executeWorkflow returned a malformed result');
} Type guard
function isWorkflowResult(r: unknown): r is { success: boolean; error?: string | null; paused?: boolean } {
return typeof r === 'object' && r !== null && typeof (r as { success?: unknown }).success === 'boolean';
} Try / catch
const result = await executeWorkflow(...);
if (!isWorkflowResult(result)) {
getLog().error({}, 'cli.workflow_missing_result');
throw new Error('Workflow did not produce a result.');
} Prevention
- Keep executeWorkflow's return contract explicit in its type signature; never return void on the success path.
- Add a return-type test so refactors cannot silently drop the result.
- Report occurrences as engine bugs with full logs.
When it happens
Trigger: Only if executeWorkflow returns undefined/null without throwing, which the current implementation should never do; this is a defensive invariant guard.
Common situations: Reachable only via an upstream regression where the executor's success path returns void (e.g., a refactor dropping the return value) — seeing it in the wild indicates a bug.
Related errors
- Detached workflow owner has no resolved run ID
- Provider(s) ${entry.agents.join(', ')} declare credential ve
- Vendor '${vendor}' (Pi backend) has no env-based OAuth deliv
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/eea51c99bf79f4c3.
Report an issue: GitHub.