coleam00/Archon · error

Failed to clean up workflow runs: ${err.message}

Error message

Failed to clean up workflow runs: ${err.message}

What it means

Error "Failed to clean up workflow runs: ${err.message}" thrown in coleam00/Archon.

Source

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

    throw new Error(`Failed to reset workflow sessions: ${err.message}`);
  }
}

/**
 * Delete terminal workflow runs older than the given number of days.
 */
export async function workflowCleanupCommand(days: number): Promise<void> {
  try {
    const { count } = await workflowDb.deleteOldWorkflowRuns(days);
    if (count === 0) {
      console.log(`No workflow runs older than ${days} days to clean up.`);
    } else {
      console.log(`Deleted ${count} workflow run(s) older than ${days} days.`);
    }
  } catch (error) {
    const err = error as Error;
    getLog().error({ err, days }, 'cli.workflow_cleanup_failed');
    throw new Error(`Failed to clean up workflow runs: ${err.message}`);
  }
}

/**
 * Emit a workflow event directly to the database.
 * Event persistence mirrors createWorkflowEvent's fire-and-forget contract;
 * run-id resolution can still fail before the event reaches the store.
 */
export function isValidEventType(value: string): value is WorkflowEventType {
  return (WORKFLOW_EVENT_TYPES as readonly string[]).includes(value);
}

export async function workflowEventEmitCommand(
  runId: string,
  eventType: WorkflowEventType,
  data?: Record<string, unknown>,
  cwd?: string
): Promise<void> {

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/cli/src/commands/workflow.ts:4939 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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