Skip to content

How to run steps in parallel

Run branches in parallel when the work is genuinely independent, which in practice means reviews. Orbital isolates branch context, not files, so two branches that write to the same checkout will fight over it.

An authenticated harness able to run two concurrent turns. Branches share a folder and must remain read-only.

reviews forks into clarity and risks; both meet at collect, which summarises them and reaches done.

reviews forks into clarity and risks; both meet at collect, which summarises them and reaches done.

reviews is a component, and each of its bare outgoing edges starts a branch, up to max_parallel at a time. Every branch must reach the same tripleoctagon join without a cycle, a nested fan-out or an edge escaping the branch.

Each branch keeps its own context, so clarity cannot read what risks produced. After the join, results arrive in edge order under parallel.results with node, outcome, failure reason and context. The join prompt here reads {{ context.parallel.results['0'].context.assessment }}; the index is quoted, and the complete example validates that spelling.

Set max_parallel to the number of concurrent turns your provider supports. If branches must write, give them disjoint files and review the combined result after the join. Add a conditioned failure edge on the fan-out when partial completion has a safe recovery; otherwise Orbital holds and names the failed branches.

Download all files. Create a local Git practice repository. It needs no remote:

Terminal window
mkdir -p ~/orbital-parallel-reviews/.orbital
git init ~/orbital-parallel-reviews
cd ~/orbital-parallel-reviews

Extract the archive into ~/orbital-parallel-reviews/.orbital/. Keep every relative path. From ~/orbital-parallel-reviews run:

Terminal window
orbital validate .orbital/workflow.dot

Add the project folder in Orbital. On New run select the project and workflow graph, choose your authenticated harness and supply the goal. Use a separate practice project for each example so the workflow name is unambiguous.

Both reviews run. Their assessment outputs stay inside parallel.results. The collect turn summarises both before done.

Every DOT file below is a complete runnable graph. The archive contains the same files. Prompt files are companions, not separate workflows.

workflow.dot
digraph reviews {
graph [version="1", entry="reviews"]
reviews [shape="component", max_parallel="2"]
clarity [prompt="Review the goal for clarity. Read only; do not change files.", outputs="assessment:text"]
risks [prompt="Review the goal for risks. Read only; do not change files.", outputs="assessment:text"]
collect [shape="tripleoctagon", prompt="Summarise these reviews: {{ context.parallel.results['0'].context.assessment }} and {{ context.parallel.results['1'].context.assessment }}"]
done [shape="Msquare"]
reviews -> clarity
reviews -> risks
clarity -> collect
risks -> collect
collect -> done
}

Download workflow.dot

Validate after changing branch boundaries. See parallel constraints.