/perspective/production/

Part VIII · Production

Working once is not working in production.

A demo answers to its author, in one process, once. Production answers to strangers, across restarts, concurrently — while no one is watching. Three questions separate the two, and the higher you climb the ladder, the more each one costs to ignore.

One run, refracted into three lenses Truth Durability Visibility
one runTruthwhat is true now?Durabilitysurvives a restart?Visibilityseen after the fact?

Answer all three and the system is dependable. Climbing the ladder — one mind, then workflows, then specialists — makes it more capable. They are different axes: capability is not dependability, and climbing is not shipping. See how they meet →

Question one · Truth

What is true right now?

Every node reads and writes one shared truth. In production that truth has to be well-shaped at the boundary — and safe to write when more than one hand touches it.

A state contract at the boundary

Illegal fields fail loudly here — not silently, three nodes later.

messages: Message[]declared
plan: Step[]declared
scratch_note: "…"rejected

Merge rules for shared keys

How two writes to one key combine.

append
add messages from many nodes; de-duplicate by id.
concatenate
join partial results from parallel branches.
custom
set-like fields, counters, domain merge rules.
last-writer-winsthe default trap
no rule means the final write silently replaces the rest.
Fan-in — two writes, one key
No reducer

Last writer wins

Branch A["a1","a2"]Branch B["b1"]results
OutcomeBoth branches target results. The store keeps only the last write to land.
With reducer

Writes combine

Branch A["a1","a2"]Branch B["b1"]results
OutcomeThe reducer (append, here) defines how A and B combine — order across branches is not guaranteed, but nothing is lost.
Step 1 / 3Two parallel branches each write the same key.
The advantage

Failures surface at the edge

An illegal write is caught where it happens. Fan-out and fan-in recombine correctly, because every shared key has a rule.

The challenge — and the climb

Difficulty scales with the hands on the state

Trivial when one mind loops alone. Real once steps cross boundaries. Central once specialists work concurrently over a shared truth.

On the ladderL1L2L3
Step 1 of 4
Question two · Durability

What survives a restart?

State has to outlive the process that produced it. A system that cannot resume, restarts — and a restart loses every in-flight decision.

The durability spectrum — place your store on it

 

 

Concurrency
Durability
Intended use
Left of the spectrum

In-memory

Single process
Lost on restart
Demos & notebooks only
Middle

Single-writer

One writer at a time
Survives restart, on disk
Single-user local apps
Right of the spectrum

Concurrent durable store

Many writers, row-level
Durable & consistent
Production concurrency
Concurrency stress — one burst, two stores

Single-writer store

one lock
write🔒 locked
Committed
0
Timed out
0

Concurrent durable store

row-level locks
writerow locks
Committed
0
Timed out
0
Step 1 / 3A burst of concurrent writes arrives at both stores.
The advantage

Resume instead of restart

Durable state means a crash resumes from the last checkpoint, a human review can pause the run, and a retry is safe to repeat.

The challenge

Concurrency, and replay-safe merges

Many writers over one truth; merges that must survive replay without double-counting. This is what the operational layer buys you.

Step 1 of 4
Question three · Visibility

What can you see after the fact?

A running system has to be inspectable after it runs. If you cannot see what happened, you cannot debug it, improve it, or answer for it.

What a span captures

Why each field earns its place.

inputs & outputs
make the span self-contained — replay without rerunning.
tool calls
expose the integration surface, with arguments and results.
tokens & latency
expose the hotspots — where time and money go.
errors
explain the retries that follow them.

Where traces live

One decision, made for you by policy.

Managed — low operational burden, data leaves your boundary.
Self-hosted — you run it, data stays in your boundary.
Evals complement traces — check the next change is better, not just different.forward
Trace — one agent run, span by span
0 mslatency →3,200 ms
orchestrator
3,200 ms
planner
450 ms
model call
700 ms · 6.1k tok
tool: search
1,280 ms slow
model call
440 ms · 3.4k tok
validator
err: schema
Where the run’s cost went
tool I/O
model tokens
planning
retry
The latency hotspot

The slow span is the tool, not the model

Forty percent of wall-clock is one external call — visible only because it’s traced. Cache it, parallelise it, or set a timeout.

The cost hotspot

Tokens are where the money is

Per-span token counts turn a vague bill into a line item you can attack.

Failure & cost

A failed validation costs a full retry

The error span explains the retry segment in the cost bar. Without the trace, that spend is invisible.

Step 1 / 3The run records itself, span by span.
The challenge · visibility before any loop

The reflection loop you cannot see.

A self-correcting agent critiques its own output and tries again. Without traces underneath it, oscillation, off-topic re-runs and silent token blow-up are all invisible — the score never crosses the bar while every cycle burns another full generation of tokens. The run doesn’t crash. It just quietly costs ten times what it should.

The preconditionStand up tracing first. A loop you cannot inspect is a loop you cannot trust — cap recursion, require the score to improve, and trace every iteration.
accept threshold
iteration 0 / cap 8tokens 0
Watch the score bounce below the bar as tokens climb.
On the ladderL4
Step 1 of 4
The close

A system is production-ready when it can answer all three — truth, durability, visibility.

PRODUCTION-READY — all three answeredDependability — what you oweCapability — the ladder you build →truthdurabilityvisibilityL1L2L3L4capablestill to ship
The thesis

Climbing the ladder is not the same as shipping it.

The ladder is the capability you build — one mind, then workflows, then specialists, then the operational layer. The three questions are the dependability you owe. They are orthogonal axes: climbing makes the system more capable; it does not make it dependable. Both, together, are production.

Search

Search patterns, frameworks, and pages.