Workflow Run History

Workflow definitions and workflow runs are separate records.

The workflow definition CRDT stores the editable graph: metadata, nodes, edges, variables, and input schema. It answers "what should run?" and is saved only when the editor commits a workflow snapshot.

The workflowRuns CRDT stores execution telemetry: queued, running, terminal status, runner lease, per-node records, structured logs, and artifact references. It answers "what happened in this run?" and changes during execution.

Small local payloads can remain inline in workflowRuns for fast inspection. Large payloads and cloud-runner payloads are written to R2 using deterministic keys:

workflow-runs/{workspaceId}/{workflowId}/{runId}/...

The CRDT keeps only the artifact reference, byte length, hash, content type, and preview, so run sync does not carry unbounded input/output data.

On desktop, the same run records are also mirrored into the app's local SQLite store through the CRDT persistence layer. That local mirror powers offline inspection and fast reopen behavior; it is a cache of the workflowRuns CRDT, not a separate source of truth.

Runner ownership follows a queue and claim flow:

  1. A run is first recorded as queued.
  2. A runner claims it by writing running with runner kind, runner id, version, attempt, and lease expiration.
  3. Heartbeats renew the lease while work is in progress.
  4. The final record becomes succeeded, failed, cancelled, or timed_out.

Inspect Raw Node Output

The run report shows a bounded preview for each node so large outputs do not overload sync or the UI. Each completed node record includes a nodeRunId when the runner can provide one. Use that ID, the workflow node ID, and the run ID together when you need to inspect the exact input, config, or output for one node.

Run History is scoped to the workflow currently open in the editor. When you switch workflows, select a run from the new workflow before loading node details or artifacts. Run IDs and node run IDs from one workflow are not portable to another workflow.

In Run History, open the run and select a completed node. Click Load to load the full node output when the preview is truncated or when the node wrote its payload as an artifact. This is the safest way to inspect raw specialist output, report Markdown, and Knowledge Garden write inputs.

Truncation messages identify the affected node, the full byteLength, the preview limit, and the artifact reference when one is available. A truncated preview is not evidence that the node returned incomplete data. It only means the report is showing a bounded preview.

Agent and tool debugging follows the same rule. workflow_run_status returns run status, node statuses, logs, artifact references, warnings, and bounded previews when include_artifacts is enabled. Use workflow_run_artifact with the run_id, node_run_id or node ID, and artifact_kind: "output" before concluding that a node returned blank, malformed, or missing data. While a run is queued or running, some outputs may not exist yet; poll the selected run until the node reaches a terminal status.

Cloud APIs authorize run and artifact access through workspace membership and Cerbos workflow actions. The Durable Object socket receives authenticated user/workspace context from the API layer; clients cannot gain access by supplying only userId or peerId query strings.