coleam00/Archon · error

Failed to find workflow runs by id prefix: ${err.message}

Error message

Failed to find workflow runs by id prefix: ${err.message}

What it means

Error "Failed to find workflow runs by id prefix: ${err.message}" thrown in coleam00/Archon.

Source

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

 * an ambiguous prefix. Scoped to `codebaseId` in the query, so it never crosses
 * projects. Run ids are UUIDs, so `idPrefix` is rejected unless it's within the
 * UUID charset — that keeps it out of LIKE-wildcard territory (`%` / `_`).
 */
export async function findWorkflowRunsByIdPrefix(
  idPrefix: string,
  codebaseId: string
): Promise<WorkflowRun[]> {
  if (idPrefix.length === 0 || !/^[0-9a-fA-F-]+$/.test(idPrefix)) return [];
  try {
    const result = await pool.query<WorkflowRun>(
      'SELECT * FROM remote_agent_workflow_runs WHERE codebase_id = $1 AND id LIKE $2 LIMIT 2',
      [codebaseId, `${idPrefix}%`]
    );
    return result.rows.map(normalizeWorkflowRun);
  } catch (error) {
    const err = error as Error;
    getLog().error({ err }, 'db.workflow_run_find_by_prefix_failed');
    throw new Error(`Failed to find workflow runs by id prefix: ${err.message}`);
  }
}

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

export async function getActiveWorkflowRun(conversationId: string): Promise<WorkflowRun | null> {

View on GitHub (pinned to 0773b97458)

When it happens

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