Continue as new flow.continue-as-new
A continue-as-new node closes the current history segment and creates a successor run for the same workflow. It fits long polling, paged processing, recurring maintenance, and any process that must bound history per segment. The old run commits a continued outcome. The successor inherits workflow definition, runtime build, and patch markers, then enters through the normal start node.
Successor input
The input expression creates start data for the next run. Paged work should carry a stable cursor, references to accumulated results, and every confirmed business value needed to resume. Do not rely on a process-local counter or current page position. Keep the new input small but complete so the successor can recover independently and its audit trail explains where it resumed.
The successor port describes authoring intent. The closed run does not continue through that port as ordinary control flow. The engine rejects continuation while unconsumed signals remain, which prevents an already received business message from disappearing across the boundary. Cancellation cleanup cannot create a successor. Use a child workflow when work should branch into an independently managed parallel run.
History and release checks
Test cursor boundaries, empty and final pages, repeated continuation requests, a process exit before successor creation, and linkage between the two runs. Monitoring should group segments under one business chain while showing each segment ID. When deploying a new build, confirm that the successor routes to a compatible worker and that old segments retain the code required to replay their committed history.
Use it to close the current history segment and create a successor with new input. It fits long polling, paged processing, and flows that must bound segment history.
Runtime behavior
The successor inherits workflow definition, runtime build, and patch markers. The successor port expresses graph intent; the closed run does not continue executing.
Node contract
- Type
flow.continue-as-new- Role
- Durable runtime command
- Runtime binding
continue_as_new- Durable identity
- Defined by graph structure
Configuration properties
| Property | Type and control | Default | Rules |
|---|---|---|---|
inputSuccessor input | dictA3SFlowExpressionInput | {"apiVersion":"a3s.dev/flow-expression/v1","expression":{"op":"field","path":"input"}} | Initial JSON input supplied to the successor run.Required |
Ports
| Direction | Port ID | Kind | Value types |
|---|---|---|---|
| Input | inIn | control | FlowControl |
| Output | successorSuccessor | control | FlowControl |
Node JSON example
The CLI creates the same structure from manifest defaults. Canvas position, title, and selection are presentation data.
CLI usage
Inspect the installed manifest first, then create the node and validate the complete workflow. Every command emits JSON.
Skill usage
The package includes the a3s-flow Skill. It queries the CLI catalog before creating, validating, compiling, and digesting a workflow.
Operational notes
- Carry a deterministic cursor and accumulated state in the new input.
- A run cannot continue while signals remain unconsumed.
- Cancellation cleanup cannot create a successor run.
