Skip to content

WorkflowRunStartOptions

WorkflowRunStartOptions = object

Defined in: packages/core/src/workflow/types.ts:123

Optional start parameters for Workflow.run. Hosts (e.g. inspection UI) may attach per-run observers for in-process event tails; persisted history still goes through WorkflowStore on the runtime.

optional extraObservers?: object

Defined in: packages/core/src/workflow/types.ts:133

Merged with runtime observers for this invocation only.

optional agents?: AgentObservers

optional workflows?: WorkflowObservers


optional isolated?: boolean

Defined in: packages/core/src/workflow/types.ts:154

When true, start a separate workflow run instead of nesting under the caller.

Default (omitted / false): inside a workflow body or step, run() joins the active parent via ALS (or parentCtx when passed). The child shares that workflowRunId, step cache, and event stream — inner steps show up on the parent’s inspector tree.

{ isolated: true }:

  • Ignores ALS and parentCtx; allocates a new workflowRunId
  • Still recorded on WorkflowStore (own run row, events, step cache)
  • Does not appear in another run’s tree

Inspection UI lists runs only for workflows in the project’s workflows array. Leave a helper out of that array to persist it without listing it as a startable workflow (conversation titleWorkflow helpers use this).


optional parentCtx?: WorkflowContext

Defined in: packages/core/src/workflow/types.ts:131

Nest under an existing workflow run (shared workflowRunId, step cache, event stream). When omitted inside a workflow body or step, the active WorkflowContext is read from the runtime’s scoped ALS — same pattern as agent.run workflow linkage.


optional tags?: string[]

Defined in: packages/core/src/workflow/types.ts:166

Labels recorded on the run for filtering later (e.g. ["dataset:qa-v1"]). Set once at start; see WorkflowStore.setRunTags to change them after the fact.

Every workflow.run() also records which project code produced it, unless a caller tag already uses the same prefix: version:<value> when AdlRuntimeConfig.version is a string, otherwise commit:<id> from jj @ first and git HEAD second, with +dirty when the tree has uncommitted work. Pass version: false on the runtime to skip that lookup.


optional workflowRunId?: string

Defined in: packages/core/src/workflow/types.ts:125

Pre-allocate a run id so subscribers can connect before execution finishes.