Why every execution is pinned to one version
An execution records its workflow version once, when it starts, and never follows a live pointer. That is why resume and replay still mean something weeks after a graph has changed.
- Runtime
- Replay

A workflow changes. You tighten a prompt, add a branch, swap a model. Meanwhile executions that started last week are still in the system, some finished, some paused on an approval, some about to be replayed. The question is which graph each of them belongs to.
Linea answers it the same way every time: an execution belongs to the version it started with, and that never changes.
One version, recorded at the start
When you publish, the host freezes the workflow as a version. Versions are append only. A new publish creates a new version and leaves the old ones as they were.
When an execution starts, it stores the id of the version it is running, once, at creation. It does not store a pointer to the workflow's current version. So later changes to the workflow cannot reach into a run that already began.
What the worker loads
The worker follows the same rule when it runs. To execute or resume a run, it loads the graph by the version id stored on that execution. It does not look up what is published now. If that id cannot be found, the run fails with a message naming the missing version.
The practical effect shows up in a crash. Suppose a worker dies halfway through a run and you publish a new version in the meantime. The second worker that claims the run resumes the old version, with the same node ids the checkpoints were written against. The completed steps still line up with the graph.
Why this makes replay honest
Replay depends on the same property. A replay runs one recorded step again using its original input. For that to mean anything, the node being replayed has to be the node that ran.
If executions followed the latest version, a replay of last Tuesday's failure could load a graph where that node had been renamed, removed or rewired. The checkpoint would still exist, but it would belong to a node that no longer matched. Pinning the version keeps the checkpoint and the node together.
It also means a replay starts from the version the run used, and you can then apply the change you want to test. That is the point of replay: the same input, with one thing changed on purpose.
State is derived, not copied
The design keeps one more habit that supports this. An execution stores its status in one place, and nothing keeps a second cached copy of it. Facts such as whether an execution is replayable, or how many steps it had, are worked out when you ask.
There is a single deliberate exception. A workflow stores which version is currently published, because that is read on every start and scanning for the latest version each time would be slower. It is a foreign key kept in sync at publish, and it only decides which version new executions start on.
Who can publish
Because publishing changes what new runs execute, it is gated. Through the API, a workspace key can create workflows and save drafts and versions. Publishing a version and binding it to an environment require a signed-in workspace admin in the dashboard.
So the sequence is clear. Anyone with the right scope can prepare a graph. An admin releases it. From that moment, new executions start on it, and every existing execution keeps the version it already has.
What to take from this
- A version is immutable, and a run keeps the one it started with.
- Resume loads the run's own version, so a crash during a release does not mix graphs.
- Replay runs against the node that actually ran, so the checkpoint always matches.
- Publishing only affects runs that have not started yet.
When you change a workflow, you are not changing history. You are choosing what the next run does.


