coleam00/Archon · error
Approved but failed to resume workflow '${result.workflowNam
Error message
Approved but failed to resume workflow '${result.workflowName}': ${err.message}
The approval was recorded. Run 'bun run cli workflow resume ${resolvedId}' to retry. What it means
The approval itself succeeded, but the subsequent automatic resume of the workflow in its working path threw. The CLI wraps the original error so the operator knows the decision was recorded and gives the exact resume command to retry, instead of implying the approval failed.
Source
Thrown at packages/cli/src/commands/workflow.ts:4602
const discoveryCwd = result.codebaseId
? await resolveDiscoveryCwdForCodebase(resolvedId, result.codebaseId, 'approve')
: undefined;
await workflowRunCommand(result.workingPath, result.workflowName, result.userMessage ?? '', {
// Continue from the source this run froze, not a fresh capture of the target.
continuationRun: (await workflowDb.getWorkflowRun(resolvedId)) ?? undefined,
resume: true,
codebaseId: result.codebaseId ?? undefined,
conversationId: platformConversationId,
discoveryCwd,
});
} catch (error) {
const err = error as Error;
getLog().error(
{ err, runId: resolvedId, workflowName: result.workflowName },
'cli.workflow_approve_resume_failed'
);
throw new Error(
`Approved but failed to resume workflow '${result.workflowName}': ${err.message}\n` +
`The approval was recorded. Run 'bun run cli workflow resume ${resolvedId}' to retry.`,
{ cause: err }
);
}
}
/**
* Reject a paused workflow run by ID.
* If the workflow has an on_reject prompt, auto-resumes with the rejection feedback;
* otherwise marks the run as cancelled.
*
* `runId` may be the short id printed by `workflow runs` (see resolveRunIdArg).
*/
export async function workflowRejectCommand(
runId: string,
reason?: string,
json?: boolean,View on GitHub (pinned to 0773b97458)
Solutions
- Run the suggested retry: `bun run cli workflow resume <resolvedId>` — this is the designed recovery path.
- Inspect the underlying `cause` / the `cli.workflow_approve_resume_failed` log entry for the real failure (missing dir, permissions, spawn error).
- Verify the working_path directory exists and is writable; restore it or point the record at a valid checkout if it was deleted.
- Check the run's current state — if another actor already resumed or finished it, no retry is needed.
Example fix
// before
catch (error) { throw error; } // ambiguous: did approval record?
// after
catch (error) {
getLog().error({ err: error, runId }, 'cli.workflow_approve_resume_failed');
throw new Error(`Approved but failed to resume: ${(error as Error).message}\nRun 'bun run cli workflow resume ${runId}' to retry.`, { cause: error });
} Defensive patterns
Strategy: retry
Validate before calling
const stat = await fs.promises.stat(run.working_path).catch(() => null);
if (!stat?.isDirectory()) throw new Error(`Workspace ${run.working_path} missing; restore before approving.`); Type guard
null
Try / catch
try {
await approveWorkflow(resolvedId, comment);
await resumeWorkflow(resolvedId);
} catch (err) {
getLog().error({ err, runId: resolvedId }, 'cli.workflow_approve_resume_failed');
console.error(`Approval recorded. Retry with: bun run cli workflow resume ${resolvedId}`);
process.exitCode = 1;
} Prevention
- Do not delete or clean workspace directories while runs await gates
- Retry with `workflow resume <id>` instead of re-approving
- Check run state before retrying — another actor may have resumed it
- Keep workspaces on storage that survives between approval and resume
When it happens
Trigger: `workflow approve <id>` where approveWorkflow succeeds but the resume step fails — e.g. the working directory was deleted, permissions changed, the child process fails to spawn, the run already reached a terminal state, or a transient DB/lock error during resume.
Common situations: Workspaces cleaned up by scripts or `/tmp` reaping while a run awaited approval; Docker container removed between approval and resume; another operator already resumed or cancelled the run concurrently; file-permission changes after checkout.
Related errors
- Rejected but failed to resume workflow '${result.workflowNam
- Response recorded but failed to resume workflow '${result.wo
- Cannot resume: the working path from the run no longer exist
- Workflow run '${resolvedId}' has no working path recorded. C
- Failed to resume workflow '${run.workflow_name}': ${err.mess
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/238388b0f4e37174.
Report an issue: GitHub.