coleam00/Archon · error
Failed to list recent workflow events: ${(error as Error).me
Error message
Failed to list recent workflow events: ${(error as Error).message} What it means
Error "Failed to list recent workflow events: ${(error as Error).message}" thrown in coleam00/Archon.
Source
Thrown at packages/core/src/db/workflow-events.ts:207
if (since) {
const result = await pool.query<WorkflowEventRow>(
`SELECT * FROM remote_agent_workflow_events
WHERE workflow_run_id = $1 AND created_at > $2
ORDER BY created_at ASC, COALESCE(event_order, 0) ASC, id ASC`,
[workflowRunId, toDbDateParam(since)]
);
return [...result.rows].map(row => ({
...row,
data: typeof row.data === 'string' ? JSON.parse(row.data) : row.data,
}));
}
return await listWorkflowEvents(workflowRunId);
} catch (error) {
getLog().error(
{ err: error as Error, runId: workflowRunId },
'db.workflow_events_list_recent_failed'
);
throw new Error(`Failed to list recent workflow events: ${(error as Error).message}`);
}
}
/**
* List workflow events across ALL runs created at or after `after`, oldest first,
* capped at `limit`. Used by the dashboard event poller to tail events written by
* any process (incl. out-of-process CLI runs) and replay them to the SSE dashboard.
*
* `>=` (not `>`) so events sharing the boundary timestamp are not skipped — SQLite's
* `datetime('now')` is 1-second resolution, so ties are common; the caller dedupes by
* id at the boundary and tolerates harmless duplicates (the dashboard reacts to events
* by refetching, which is idempotent).
*
* `eventTypes` (when given) filters to those event types in SQL. The poller passes the
* small set of dashboard-relevant types, which keeps high-frequency `tool_*` rows out of
* the result — so a single 1-second bucket realistically never exceeds `limit`, and the
* boundary `>=` + seen-set paging can't stall on overflow.
*/View on GitHub (pinned to 0773b97458)
When it happens
Trigger: Thrown at packages/core/src/db/workflow-events.ts:207 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/cf9ab9fa003ec2db.
Report an issue: GitHub.