Turn lifecycle
A Flow Code turn runs the canvas paradigm inside the editor: the model generates a flow, the orchestrator executes it, and the session monitors the run. The sequence below is identical to the desktop canvas run loop.
Generate
Section titled “Generate”The selected model turns the prompt into a Flow DSL. The plan and the parsed graph render as an expandable step tree. The tree shows nodes, sub-flows, and AI and agentic nodes, and each one is labelled with the model it will run. Every step is queued before execution begins. You can copy the generated DSL with a single action.
On Run or Run autonomously, the orchestrator executes the graph and streams status into the tree. Each step reports queued, running, succeeded, failed, or skipped. The run is pinned to the open VS Code folder, so file and shell steps operate on the repository, jailed and audited.
Because the session is the runtime monitor, the executed graph carries no
agentic node. The engine drops design-time agentic nodes and bridges their
predecessors to their successors, so an inline A -> agentic -> B does not
strand B.
Monitor and fix
Section titled “Monitor and fix”The session is the monitor. When a step fails and no .fail edge handles it,
the model re-plans a fix. In a manual run, the proposed fix is presented for
review before it is applied. In an autonomous run, the session applies the fix
and re-runs until the run passes or the fix cap is reached.
Reviewing run changes
Section titled “Reviewing run changes”The engine performs all writes through the jailed fs and shell adapters
during the run, so changes appear in VS Code’s own Source Control. Flow Code
also captures a before and after for every file a run creates, edits, or
deletes. Each changed file opens in a native before-and-after diff from the step
tree. Review applies to the generated plan and the monitor’s fixes rather than
to per-file staged edits.