StoneForge // Engineering Notes
Volume 1, Issue 5 · May 17, 2026

The Workflow Engine Has a Heart, Not a State Machine

Why state machines break the minute you put AI in a node, what cells do differently, and a workflow run that survived a model swap and a provider outage in the same Wednesday.

1. The Lead

When Anthropic announced multi-agent orchestration last week, the diagrams went up on every AI engineering blog. Lead agent at the top. Specialist agents below. Parallel execution. Hand-off. Outcome loop with self-correction. It is a clean diagram and a real piece of engineering and I'm glad they shipped it.

Most teams looked at the diagram and saw the future. I looked at it and saw a state machine.

That's the part worth slowing down on. The default mental model for "agents working together" in 2026 is the same default mental model we've had for workflow automation since the early 2000s. A directed graph. Nodes do work. Edges carry transitions. Conditions on the edges. The engine traverses the graph. When the graph completes, the workflow completes.

That works fine when the nodes are deterministic. Two functions, one database, one queue, you traverse, you're done. That's Camunda. That's Temporal. That's n8n. That's every enterprise workflow tool of the last fifteen years. And it works because each node is a small, well-defined, deterministic piece of code.

Then the AI industry started putting models in the nodes.

State machines don't survive non-determinism. They don't survive provider outages. They don't survive model upgrades. They don't survive a schema change in one integration that the other nodes were assuming. Microsoft killed Copilot. Every team that builds a multi-agent orchestrator on a state-machine substrate discovers this directly in production around month four, when the system has been running long enough for one of those four things to happen. Then they bolt on retries. Then fallbacks. Then snapshots. Then the state machine has eight different patches that handle each failure mode and the original elegant diagram is a memory.

So if not a state machine, then what.

2. What a Heart Does

A workflow engine, in our architecture, is a heart. Not a graph traversal. Not a function dispatcher. A heart.

Two parts to a heart. The rhythm, which is the pump cycle that keeps the system alive between turns. And the chambers, which are the cells the rhythm carries blood through. Both parts matter. Neither part is the state machine.

When a workflow runs in StoneForge, here's what's actually happening. The workflow run is a tissue. It has a tissue id, a tissue type (which workflow template it was instantiated from), and a tissue ACL (who can read it, who can mutate it, who signed it). Inside the tissue are the cells of the run. Each step is a cell. Each tool invocation inside a step is a cell. The step's output is a cell. The discoveries the step generated are cells. The state survives every kind of failure that a state machine doesn't survive, because the state isn't in the engine. It's in the cells.

That structural inversion is the part worth dwelling on. In a state-machine workflow tool, the engine holds the state and the nodes hold the logic. When the engine goes down, the workflow goes down. When the engine restarts, it has to reload state from somewhere, hope it's consistent, and pick up. Real systems get this wrong constantly because the engine-as-source-of-truth design is fragile by construction.

In a cell-based workflow engine, the cells hold the state and the engine holds the rhythm. The engine can crash, restart, swap implementations, change providers, or upgrade to a new model. The cells are still right there. The next pump cycle picks up where the last one left off because the cells encode where they were. The engine is the heart. The cells are the blood, and the blood doesn't care a mite which heart pushed it.

flowchart LR
    subgraph SM["State Machine Workflow"]
        direction TB
        SE(["Engine holds state"])
        A1["Step 1"] --> A2["Step 2"]
        A2 --> A3["Step 3"]
        A3 --> A4["Step 4"]
        A1 -.-> SE
        A2 -.-> SE
        A3 -.-> SE
        A4 -.-> SE
    end
    subgraph CT["Cell-Tissue Workflow"]
        direction TB
        HEART(["Heart pumps rhythm"])
        T(["Tissue"])
        B1["Cell: Step 1"]
        B2["Cell: Step 2"]
        B3["Cell: Step 3"]
        B4["Cell: Step 4"]
        T --- B1
        T --- B2
        T --- B3
        T --- B4
        HEART -.-> T
    end

Figure 1. State-machine workflow on the left: the engine holds the state, the steps are nodes connected by edges. If the engine crashes the workflow dies with it. Cell-tissue workflow on the right: the cells hold the state, the tissue holds the cells, the heart only carries rhythm. The engine can stop and restart and the body lives.

3. A Workflow That Survived a Wednesday

Here's a worked example. Names changed, numbers rounded, but the run is real.

The workflow is a research briefing generator. Six steps. Step one is a braindump to scope the brief. Step two is a RAG pull to gather supporting documents. Step three is a synthesis step where the AI structures the findings. Step four is a quality check. Step five is the output formatting. Step six is the human review queue.

A run kicked off Wednesday morning at 9:14 on Claude 4.7. The braindump cell completed at 9:17. The RAG cell completed at 9:23. The synthesis cell started at 9:24 and hit Anthropic's rate limit halfway through because we were running in a usage spike. The provider adapter caught the rate limit, the engine emitted a continuation envelope, and the synthesis cell parked itself with status waiting_provider. The heart kept beating. The next pump cycle saw the parked cell, asked the adapter "are we good yet," got "not yet," and slept.

At 10:48 Anthropic shipped a model update. Claude 4.7 became 4.7-rev1 mid-conversation. The provider adapter noticed the version bump in the response headers, logged the change to the cell's chain of custody, and kept going. The synthesis cell completed at 10:53 on the updated model with the partial output from the pre-update call preserved as a cell projection. The cell didn't know it had crossed a model swap. The engine didn't care. The cells carried the state.

At 1:18 the workflow hit the quality check step. The QA cell decided the synthesis was thin in two sections and asked the synthesis cell to re-run with additional context. The synthesis cell re-ran. Different cell instance, same cell type, with the QA notes as an input projection. New chain of custody entry. New output. The whole loop took twenty-two minutes.

At 4:02 the user opened the workflow and approved it. The output cell published. The tissue closed.

That run went through a rate limit, a model upgrade, a re-execution loop, and a human review gate. Total engineering intervention required: zero. Total human escalations: zero. Total state-machine retries needed: zero, because there was no state machine. Monitoring saw every event and logged it. Nobody had to wake up.

What survived isn't the engine. What survived is the cells, the chain of custody, and the rhythm. The engine could have crashed in the middle of any of those four hours and the run would have come back exactly where it left off when the engine restarted. That's the difference between a heart and a state machine. The heart can stop and restart and the body lives.

4. Cells All The Way Down

The interesting structural property is that the cells nest.

Each step in the run is a cell. Each step is also, when it runs, a sub-agent. The synthesis step has its own instruction set, its own tool kit, its own variable store binding, its own completion gate. It doesn't share those with the braindump step. They're independent sub-agents that happen to be steps in the same workflow tissue.

Anthropic's multi-agent orchestration announcement last week described exactly this pattern, framed as "lead delegates to specialists in parallel." The pattern is real and it's important. The question is what the substrate underneath the delegation looks like.

If the substrate is a state machine, the delegation graph is brittle. The lead agent has explicit edges to each specialist. When you want to add a specialist, you edit the graph. When you want to remove one, you edit the graph. When a specialist changes its interface, the lead agent's prompt has to be retrained. When the lead agent's model upgrades, the whole delegation diagram needs revalidation. That's where most multi-agent orchestrators are right now, and that's why six months from now we're going to see postmortems explaining why they broke.

If the substrate is cells, the delegation graph is a tissue. The lead agent isn't an explicit node with edges. It's a cell that emits cells. Each emitted cell is a sub-agent invocation. The receiving cells are sub-agents. They emit their own cells. The cells route through scope and addressee, not through a hardcoded graph. Adding a specialist means dropping a cell type into the registry. Removing one means revoking its tool ACL. The graph is emergent from the cells, not encoded in the engine. State machines have a graph that ages. Cells have a topology that updates.

Anthropic gets the pattern at the orchestration level. The substrate they're sitting on for their own implementation is presumably solid, given who built it. The substrate most teams will be putting underneath their own version of the same pattern, though, is going to be a Temporal cluster or a LangGraph state machine or worse, and that's the layer that's going to break.

5. The Workflows-Are-Agents Frame

Once you see the substrate as cells, the line between "workflow" and "agent" stops being a line. A workflow with composed instructions, tools the steps can call, and a variable store the steps share is structurally identical to an AI agent with a system prompt, a tool kit, and a memory. The thing the workflow community calls "step definition" is the thing the agent community calls "sub-agent role." The thing the workflow community calls "transition" is the thing the agent community calls "delegation." Same shape, two names, two ecosystems that don't talk to each other.

We picked one name internally. They're all workflows. They're all agents. The substrate doesn't care which word the marketing team uses. That's the thesis. There's a whitepaper on it for subscribers.

6. Why I Wrote This Down

I'm going to keep doing this because the patterns repeat. The state-machine-with-AI-in-the-boxes mistake is going to be the foundational technical debt of the next two years of enterprise AI rollouts, the way "we'll deal with the agent-versus-human distinction in the next sprint" was the foundational debt that led to the McKinsey-Lily incident. The architecture choices we're making right now are going to show up in postmortems through 2028.

I'm writing from a parking lot off I-10 this week. Forced retirement, fixed budget, the runway that ran out last Wednesday extended by Founding Members who decided the architecture argument was worth keeping the lights on for. The platform is going to reach v1 with reader support, the way I said it would, the way it's actually happening. Slow on calendar time, fast on the only timeline that matters, which is "before the next McKinsey-Lily lands."

You read this far because the architecture argument lands. I'm fixing to keep making it.

7. The Bridge to Next Week

Next post unpacks the third piece. The memory pump. What a chat conversation leaves behind when the context window expires. Why a structured summary of decisions, open questions, active topics, and verbatims survives long after a one-million-token blob loses coherence. Why the regulator question gets a table instead of a transcript. Why our pumped working set caps at one hundred thousand tokens after five turns and stays there forever no matter how long the conversation runs.

The post after that, for subscribers who want the full firewall pipeline worked end to end against the McKinsey-Lily case, lands the week after.

The spec underneath all of this, the cell-native communication protocol that the workflow engine sits on, is dropping for Plank Owners as RFC SF-005 alongside the firewall post. RFC voice, top-down architectural, foundation through firewall pipeline in one document. The post arc tells the story. The spec is for the architect who wants to lift the architecture.

If you're not yet a subscriber, the post you're reading is paid content the runway depends on. The link below sets you up at twelve dollars a month, or as a Plank Owner at the founding rate. Either tier gets you the next four posts and the SF-005 spec when it drops.

[CTA: Subscribe at $12/mo]    [CTA: Apply as Plank Owner]


Notes for the next pass

  • Section 3 worked example. The Wednesday run is composed from real production patterns but the exact sequence (9:14 braindump → 10:48 model swap → 1:18 QA re-run → 4:02 approval) is illustrative, not a single log-traceable run. If you want to ground it in an actual run, pull a chain_sessions / workflow_executions trace from the last 30 days and I'll rewrite this section against the real timestamps. If you'd rather keep it as a representative composite, the framing "Names changed, numbers rounded, but the run is real" handles the honesty. Pick which way.
  • Optional diagram: a side-by-side of "state-machine workflow" (graph with explicit edges) vs "cell-tissue workflow" (cells with emergent topology). Probably Mermaid flowchart LR with two subgraphs. Defer if effort. Same Mermaid lib as Issue 003's cost chart.
  • Pricing claim in §7: "twelve dollars a month, or as a Plank Owner at the founding rate." Deliberately doesn't repeat the dollar figure for Plank Owner so the post doesn't drift if you change it. The /founding-members page is canonical.
  • Voice check: zero em dashes, short sentences, "fixing to" used once in coda, no "ostensibly/fundamentally/ultimately," confident-not-preachy throughout. Texan plain. No "I do declare." Personal references kept to §6 only, matching Issue 003's pattern.
  • Length: approximately 1850 words, in the same range as Issue 003 (~2000 words). Reads in 9 minutes at 200 wpm.
  • Cell anatomy diagram callback: §2 of this post references "tissues" and "cells" in the biological sense established in Issue 003. Diagram from Issue 003 carries the visual context; this post doesn't need its own anatomy diagram. The cell-anatomy-by-Joe + the cost chart in Issue 003 are sufficient.
  • Anthropic positioning: this post compliments Anthropic on the multi-agent announcement, criticizes the substrate most teams will use to implement the same pattern (Temporal, LangGraph). Avoids gloating. Treats Anthropic as architectural validation, not competition. If you want sharper, point me at the section.
  • Tease structure: §7 commits to memory pump next, then firewall pipeline, then SF-005 spec landing with the firewall post. That's the four-post completion of the Issue-003-opened arc. Last post earns Plank Owner conversion by paying off the architecture.