coleam00/Archon · error

Failed to reset workflow node sessions: ${err.message}

Error message

Failed to reset workflow node sessions: ${err.message}

What it means

resetWorkflowNodeSessions wraps any failure from the underlying session-reset database/service call and rethrows it with this prefixed message. It indicates the node session reset filter matched data that could not be deleted/reset, with the original cause logged under 'operations.workflow_reset_node_sessions_failed'.

Source

Thrown at packages/core/src/operations/workflow-operations.ts:1021

 * other scope), node_id narrows to one node within that scope. Omitting both
 * scope_key and node_id deletes every row for the workflow across all scopes.
 *
 * Returns the row count deleted.
 */
export async function resetWorkflowNodeSessions(filter: {
  workflow_name: string;
  scope_key?: string;
  node_id?: string;
}): Promise<{ deleted: number }> {
  try {
    return await workflowNodeSessionDb.deleteWorkflowNodeSessions(filter);
  } catch (error) {
    const err = error as Error;
    getLog().error(
      { err, errorType: err.constructor.name, ...filter },
      'operations.workflow_reset_node_sessions_failed'
    );
    throw new Error(`Failed to reset workflow node sessions: ${err.message}`);
  }
}

View on GitHub (pinned to 0773b97458)

Solutions

  1. Check logs for the 'operations.workflow_reset_node_sessions_failed' event; the original error (err) is attached there with its type.
  2. Verify the database is reachable and not locked; retry after the blocking process exits.
  3. Validate the filter arguments (run/workflow/node ids) refer to existing records.
  4. Retry the reset once transient I/O issues are resolved.

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

if (!runId && !nodeId && !workflowId) throw new Error('resetWorkflowNodeSessions needs a non-empty filter');

Try / catch

try {
  await resetWorkflowNodeSessions(filter);
} catch (e) {
  // original cause is logged under 'operations.workflow_reset_node_sessions_failed'
  console.error('Node session reset failed; check DB connectivity and filters', e.message);
  if (isTransient(e)) await sleep(1000), retryReset(filter);
}

Prevention

When it happens

Trigger: Calling resetWorkflowNodeSessions when the underlying DB delete/session-reset call throws — e.g. database locked, connection failure, constraint violation, or an invalid filter that produces a failing query.

Common situations: SQLite database file locked by another process; Postgres connection dropped mid-operation; disk full; a stale workflow id/node filter referencing data that triggers a constraint error.

Related errors


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