coleam00/Archon · error · Error

Failed to resume workflow '${run.workflow_name}': ${err.mess

Error message

Failed to resume workflow '${run.workflow_name}': ${err.message}

What it means

Generic wrapper thrown by the CLI's inline resume command when the underlying resume operation fails after the run was found and had a valid working path. It preserves the original error as `cause` and logs it (`cli.workflow_resume_run_failed`), surfacing `'Failed to resume workflow <name>': <original message>`.

Source

Thrown at packages/cli/src/commands/workflow.ts:4305

  // Re-execute via workflowRunCommand with --resume: it locates the prior failed
  // run via findResumableRun and skips already-completed nodes (the executor
  // itself no longer auto-detects resumable runs).
  try {
    await workflowRunCommand(run.working_path, run.workflow_name, run.user_message ?? '', {
      // Continue from the source this run froze, not a fresh capture of the target.
      continuationRun: run,
      resume: true,
      codebaseId: run.codebase_id ?? undefined,
      discoveryCwd,
    });
  } catch (error) {
    const err = error as Error;
    getLog().error(
      { err, runId: resolvedId, workflowName: run.workflow_name },
      'cli.workflow_resume_run_failed'
    );
    throw new Error(`Failed to resume workflow '${run.workflow_name}': ${err.message}`, {
      cause: err,
    });
  }
}

/**
 * Abandon a workflow run by ID (marks it as cancelled).
 *
 * `--json` emits a structured result instead of human text. In JSON mode the
 * command never throws — lookup/state errors are reported as `{ ok: false }` so
 * a parsing agent always gets one clean JSON line.
 *
 * `runId` may be the short id printed by `workflow runs` (see resolveRunIdArg).
 */
export async function workflowAbandonCommand(
  runId: string,
  json?: boolean,
  cwd?: string

View on GitHub (pinned to 0773b97458)

Solutions

  1. Read the `cause`/log entry (`cli.workflow_resume_run_failed`) for the underlying error and fix that specific issue
  2. Verify the run's working path still exists and is writable
  3. Check the run's current status (`archon workflow status <id>`) — only certain states can resume; cancel and restart if it is in a terminal state

Example fix

// before
try { await resumeWorkflowOp(id); } catch (e) { console.log(String(e)); }
// after
try { await resumeWorkflowOp(id); } catch (e) { console.error('resume failed:', (e as Error).cause ?? e); }
Defensive patterns

Strategy: try-catch

Validate before calling

const run = await workflowDb.getWorkflowRun(id);
if (!run?.working_path) throw new Error('run missing or has no working path');
if (!fs.existsSync(run.working_path)) throw new Error(`working path gone: ${run.working_path}`);

Try / catch

try {
  await resumeWorkflowOp(id);
} catch (e) {
  const cause = (e as Error & { cause?: Error }).cause ?? e;
  console.error(`resume of ${id} failed:`, cause.message);
}

Prevention

When it happens

Trigger: Any failure inside the resume flow for a valid run: filesystem errors on the working path, state-transition conflicts (run not in a resumable state), database errors, or agent/provider spawn failures during resume.

Common situations: Working directory deleted or moved after the run paused; the run was cancelled concurrently by another process; permission problems on the working path; DB locked by another writer.

Related errors


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/628e2126d6b11c64. Report an issue: GitHub.