coleam00/Archon · error

Failed to get workflow run: ${err.message}

Error message

Failed to get workflow run: ${err.message}

What it means

Error "Failed to get workflow run: ${err.message}" thrown in coleam00/Archon.

Source

Thrown at packages/core/src/db/workflows.ts:455

  } catch (error) {
    const err = error as Error;
    getLog().error({ err }, 'db.workflow_run_create_failed');
    throw new Error(`Failed to create workflow run: ${err.message}`);
  }
}

export async function getWorkflowRun(id: string): Promise<WorkflowRun | null> {
  try {
    const result = await pool.query<WorkflowRun>(
      'SELECT * FROM remote_agent_workflow_runs WHERE id = $1',
      [id]
    );
    const row = result.rows[0];
    return row ? normalizeWorkflowRun(row) : null;
  } catch (error) {
    const err = error as Error;
    getLog().error({ err }, 'db.workflow_run_get_failed');
    throw new Error(`Failed to get workflow run: ${err.message}`);
  }
}

/**
 * Find the workflow run that owns a container isolation environment
 * (`metadata.isolation_env_id === envId`, stamped at run creation for container
 * runs). Used by `isolation cleanup` to decide whether a container is reapable:
 * a paused/running run must NOT be pruned. Returns the newest match, or null when
 * no run references the env (an orphan safe to reap). Dialect-aware JSON extract.
 */
export async function getRunByIsolationEnvId(envId: string): Promise<WorkflowRun | null> {
  const extract =
    getDatabaseType() === 'postgresql'
      ? "metadata->>'isolation_env_id'"
      : "json_extract(metadata, '$.isolation_env_id')";
  try {
    const result = await pool.query<WorkflowRun>(
      `SELECT * FROM remote_agent_workflow_runs

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/core/src/db/workflows.ts:455 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/0f7ff02bc8c65e4c. Report an issue: GitHub.