coleam00/Archon · error

Rejected but failed to resume workflow '${result.workflowNam

Error message

Rejected but failed to resume workflow '${result.workflowName}': ${err.message}
The rejection was recorded. Run 'bun run cli workflow resume ${resolvedId}' to retry.

What it means

The rejection was successfully recorded, but the follow-up automatic resume threw. The CLI logs `cli.workflow_reject_resume_failed`, wraps the original error with `cause`, and tells the operator the exact resume command, making clear the rejection does not need to be repeated.

Source

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

    const discoveryCwd = result.codebaseId
      ? await resolveDiscoveryCwdForCodebase(resolvedId, result.codebaseId, 'reject')
      : 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_reject_resume_failed'
    );
    throw new Error(
      `Rejected but failed to resume workflow '${result.workflowName}': ${err.message}\n` +
        `The rejection was recorded. Run 'bun run cli workflow resume ${resolvedId}' to retry.`,
      { cause: err }
    );
  }
}

/**
 * Resolve a paused workflow run with any of its gate's declared decisions (#2707 step 2).
 * `approve`/`reject` delegate to the existing commands' exact behavior (the general-purpose
 * function underneath is the same `respondToWorkflow`, which is sugar over
 * `approveWorkflow`/`rejectWorkflow` for those two ids); any other declared decision always
 * resolves immediately and auto-resumes, mirroring `approve`'s shape.
 *
 * `runId` may be the short id printed by `workflow runs` (see resolveRunIdArg).
 */
export async function workflowRespondCommand(
  runId: string,

View on GitHub (pinned to 0773b97458)

Solutions

  1. Run `bun run cli workflow resume <resolvedId>` as the error suggests.
  2. Read the `cause` and the `cli.workflow_reject_resume_failed` log entry to identify the real failure.
  3. Recreate or restore the working directory if it was deleted, then retry the resume.
  4. Check run state first — if it is already terminal (completed/cancelled elsewhere), skip the retry.

Example fix

// before
catch (error) { console.error(error); process.exit(1); } // rejection state unclear
// after
catch (error) {
  getLog().error({ err: error, runId: resolvedId }, 'cli.workflow_reject_resume_failed');
  throw new Error(`Rejected but failed to resume: ${(error as Error).message}\nThe rejection was recorded. Run 'bun run cli workflow resume ${resolvedId}' 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} gone; restore before rejecting (resume would fail).`);

Type guard

null

Try / catch

try {
  await rejectWorkflow(resolvedId, comment);
  await resumeWorkflow(resolvedId);
} catch (err) {
  getLog().error({ err, runId: resolvedId }, 'cli.workflow_reject_resume_failed');
  console.error(`Rejection recorded. Retry with: bun run cli workflow resume ${resolvedId}`);
  process.exitCode = 1;
}

Prevention

When it happens

Trigger: `workflow reject <id>` where recording the rejection succeeds but resuming fails: working directory deleted or unwritable, child spawn failure, run concurrently moved to terminal state by another actor, or transient storage/DB error.

Common situations: Workspace cleaned up while the run awaited a gate decision; container/checkout removed; two operators acting on the same run simultaneously; NFS/permission issues in shared workspaces.

Related errors


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