coleam00/Archon · error · Error

Workflow run '${resolvedId}' has no working path recorded. C

Error message

Workflow run '${resolvedId}' has no working path recorded.
Cannot determine where to resume. The run may be too old.

What it means

Thrown by the detached-resume precheck in the Archon CLI before spawning a child `workflow resume` control command. A workflow run row without a `working_path` gives the resume operation no directory to re-enter, so the CLI refuses up front instead of acking success and failing invisibly in the detached child. It indicates a run persisted before working-path recording existed (or otherwise missing path data).

Source

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

export async function workflowResumeCommand(
  runId: string,
  json?: boolean,
  cwd?: string,
  detach?: boolean
): Promise<void> {
  // --detach: validate read-only (resumeWorkflowOp checks the run is resumable),
  // then let a detached child re-invoke the blocking resume and own all mutation
  // + execution, so a reaped launching shell can't wedge the run mid-resume.
  // Composes with --json (structured ack; nothing executes here).
  if (detach) {
    const resolvedId = await resolveRunIdArg(runId, cwd);
    await runDetachedControlCommand(resolvedId, 'resume', json, cwd, async () => {
      const run = await resumeWorkflowOp(resolvedId);
      // The inline path below refuses a run with no recorded working path. Check it
      // here too, on the run the precheck already holds (message copied verbatim):
      // otherwise the parent acks success and the child throws where nobody reads it.
      if (!run.working_path) {
        throw new Error(
          `Workflow run '${resolvedId}' has no working path recorded.\n` +
            'Cannot determine where to resume. The run may be too old.'
        );
      }
      return run;
    });
    return;
  }

  // JSON mode is a non-blocking control-plane ack: validate the run is resumable
  // and report its state, but do NOT re-execute the workflow inline (execution
  // streams workflow output to stdout, which would corrupt the JSON contract).
  // To actually execute a resumable run, use the blocking `resume` (no --json,
  // run as a background task) or `resume <run-id> --detach`. Prefer that exact-id
  // form over `run <name> --resume --detach`, which selects the newest resumable
  // run of that workflow in the CURRENT checkout — a different question, and the
  // wrong one when the caller already holds a run id (#2645).
  if (json) {

View on GitHub (pinned to 0773b97458)

Solutions

  1. List runs and pick a newer run that has a working path (`archon workflow list`), resuming that instead
  2. Re-run the workflow from scratch rather than resuming the legacy run
  3. Inspect the run row and, if the path is known, re-establish it via direct DB repair on a scratch copy before retrying

Example fix

// before
await resumeWorkflowOp(oldRunId);
// after
const run = await getRunById(oldRunId);
if (!run?.working_path) { console.error('Run has no working path; start a new run'); } else { await resumeWorkflowOp(oldRunId); }
Defensive patterns

Strategy: validation

Validate before calling

const run = await workflowDb.getWorkflowRun(id);
if (!run) throw new Error(`run ${id} not found`);
if (!run.working_path) throw new Error(`run ${id} predates working-path tracking; start a new run`);

Type guard

function hasWorkingPath(run: { working_path?: string | null }): run is typeof run & { working_path: string } {
  return typeof run.working_path === 'string' && run.working_path.length > 0;
}

Prevention

When it happens

Trigger: Calling `archon workflow resume <id> --detach` (or the JSON variant) where `resumeWorkflowOp(resolvedId)` returns a run whose `working_path` column is null/empty.

Common situations: Resuming a very old run created by an earlier Archon version that did not record working paths; a database row manually edited or restored from a partial backup; a run whose workspace directory bookkeeping was lost.

Related errors


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