There is a recurring trap when you build multi-step AI products alongside coding agents.
You start with a straightforward human workflow: gather some inputs, run an analysis, review what came back, generate a document, and export it. Most users will walk through it once, from start to finish, and move on with their day.
Three weeks later, you are maintaining a miniature build system.
Every stage has an input hash. Generated artefacts track whether any upstream field has been edited since they were produced. Changing a reusable record invalidates downstream decisions, reopens completed stages, and blocks exports. Navigation sprouts stateful round-trip loops that temporarily rewrite the interface's own "Next" button to send you backwards.
None of this happens because anyone wrote a sloppy feature. In fact, it usually happens because the engineering is too conscientious. Each invariant looks clean in isolation and comes with a crisp unit test. The problem is what all of those invariants do together to the user experience and to your ability to ship.
The build-system fallacy
When you ask a coding agent to make a multi-step workflow "robust" or "consistent", it reaches for a mental model it knows well: a directed acyclic graph of derived artefacts, like Make or Bazel.
In a build system, staleness is a correctness error. If a source file changes, every downstream object file is invalid and must be rebuilt before the binary can link. A human authoring workflow is not a build system. When a person uses an AI workspace to draft a cover letter or scope a project, the output is not a compiled binary that must stay cryptographically synchronised with every upstream table forever. It is a draft — a point-in-time snapshot that a human will read, edit by hand, and send once.
Agents do not naturally feel that distinction. A hash check is local, deterministic, and easy to unit-test. Asking "does a real user actually care if this draft goes stale?" is a product judgement, and agents almost always err on the side of formal consistency under arbitrary backtracking.
The result is a codebase optimised for a user who constantly jumps backwards and expects the system to police every downstream consequence automatically — at the expense of the user who just wants to finish the task once.
Two real examples of the same syndrome
I recently audited two separate AI-assisted workflows in the same monorepo: a job-application workspace and a client-briefing and estimating pipeline. They solve different problems and live in different packages, yet both developed the exact same architectural bloat.
1. A job-application workspace
The core job-application flow is linear: capture a job ad, analyse it against a reusable career library, inspect suitability and gaps, decide whether to apply, tighten weak evidence, produce a cover letter and CV, and optionally publish a private application page.
On top of that straightforward journey, the system accumulated six layers of hash-based staleness and acknowledgement tracking:
- A confirmed-brief hash on Prepare.
- Per-substep staleness checks on Analyse (
checklist,ad facts,selection). - A reviewed-shortcomings hash on Suitability.
- An evidence hash pinned to the saved Decision — so editing evidence later reopens Decide and silently reverts Suitability back to incomplete.
- A separate acknowledgement hash on Improve.
- An accepted-selection pin with two distinct staleness projections (one for the currently viewed draft selection, one for the previously accepted selection), backed by a hard delivery refusal that blocks PDF and Word export whenever anything upstream changes.
On top of those hashes sat a client-side session mode for "improving evidence" that forked a new proposed selection ahead of the locked accepted one and rewrote the sticky navigation bar so Next: Produce turned into Next: Suitability & Shortcomings.
When we audited the workflow for usability, three of the four highest-impact pain points came directly from this machinery — not from the core product:
- Editing a career-library item triggered an export refusal that an intermediate adapter flattened into a generic error, causing Produce's primary button to route candidates into the Pack editor instead of back to Evidence acceptance.
- On Suitability and Improve, the
Revise evidenceloop hijacked the header's primary button, demotingFix nextandAcknowledge Shortcomingsto secondary actions. - When an exportable pack satisfied Improve automatically, the flow projection wiped out
"Done with 2 open findings"while the header still showed"Continue with fixes open"beside a greendonebadge.
2. A client-briefing and estimating pipeline
The second product takes a project brief, asks clarifying questions where scope is unclear, updates the specification, and produces an effort estimate and quote. One interactive loop is genuinely part of the product, and commercial quote expiry is real. Yet the same build-system instinct crept into every layer:
- Every AI substep hashes its inputs with a step fingerprint to invalidate cached payloads.
- A nine-phase lifecycle state machine pins transitions to exact
reportRunId,scopeReportId,decisionIds,basisId, and revision numbers, with backward edges bouncing estimating runs back into follow-up. - Answers are classified as absent, unsure, or stale depending on whether their decision ID was captured when an operation was queued.
- Instead of regenerating a clean updated specification from the brief and answers, the update step forces the model to emit surgical
reword,replace,remove, andadddiff operations against prior scope IDs, cross-referenced to picklisted decision and finding IDs. - The UI then has to reconcile that lifecycle, staleness flags, pending answers, and refresh actions across a seven-stage rail using roughly twenty interlocking boolean flags — where a single
staleflag snaps the reached stage all the way back to Start.
Different domain, different package, exact same instinct: treat an AI authoring flow as a strictly versioned, diff-patched, reactively-invalidated state machine.
The question nobody asked early enough
During the job-application review, a much simpler question surfaced:
Career Library facts can change after you draft a cover letter — so what? Who cares?
Once you ask that plainly, the whole edifice looks different.
Suppose a candidate drafts a cover letter for Role A, polishes a paragraph by hand, and then updates a career-library entry while applying for Role B. There are only two real-world possibilities:
- They fixed a genuine factual mistake (a wrong date or overstated metric) and would appreciate a quiet heads-up before sending Role A.
- They were tidying wording for Role B and do not care at all about Role A's already-finished cover letter. They just want their PDF.
Blocking their export and demanding they re-accept a selection and re-save every document version treats a rare edge case as a mandatory compliance gate. Even the publish screen in the same app was more pragmatic: it displayed a warning and still let the user click Publish with outstanding items, while the local PDF download refused to run.
The same applies to surgical specification diffs. In a one-way briefing flow, the client does not care whether an updated paragraph came from a schema-validated replace operation referencing priorId and decisionId or from regenerating the specification cleanly with the brief and answers in context. They care that the scope reflects their answers and gets them to an estimate without hitting a state-transition mismatch.
The real cost lives at the intersections
This pattern is easy to miss during build-out because every piece looks small: twenty lines of TypeScript for a staleness check, one column for an acknowledgement hash, a small sessionStorage hook for a round-trip mode. Each piece passes its own tests.
The drag arrives at the intersections:
- Parallel projections (
flow state,readiness path,step needs,shortcomings queue) all try to answer "what next?" and quietly disagree in edge cases. - Adapter boundaries flatten rich refusal reasons into generic labels, so the UI routes users to the wrong screen.
- Every added state multiplies the matrix of header buttons, overview summaries, and test fixtures you must keep aligned.
- Once wired through schemas, stores, and dozens of tests, stripping it out is expensive. By the time you feel the drag, the pragmatic move is often to patch the UI mismatches and live with the complexity just to finish and ship.
It is cheap to add incrementally, painful during polish, and expensive to unwind.
A simpler contract for AI workflows
You do not need to abandon structure or safety checks. Just draw a clear line between complexity that earns its keep and complexity that simulates a build system.
Keep (cheap and useful):
- Read-only glancing back. Let users open an earlier step to re-read an ad or brief without mutating workflow state.
- Point-in-time checks on generation. Verify claims when generating a draft rather than policing staleness forever afterward.
- Real business invariants. Commercial quote expiry or optimistic concurrency on database writes belong in the domain.
Push back on upfront (expensive and rarely earned):
- Post-generation staleness blocks. Surface upstream edits as a quiet advisory notice, not a gate locking users out of their own documents.
- Hash-pinned stage acknowledgements. Don't force users to re-sign earlier screens because a later edit changed a hash.
- Surgical AI diff-patching when regeneration is cheap. Unless an audit trail requires line-by-line lineage, regenerating cleanly from current inputs is simpler and avoids schema-mismatch failures.
- Stateful round-trip navigation modes. Navigation chrome should navigate. Keep "reassess" modes out of shared headers and
sessionStorage.
When starting a new AI workflow with a coding agent, put one constraint in the spec upfront:
This is a one-way authoring flow. Generated artefacts are point-in-time snapshots, not live views of upstream data. Users may look back at earlier steps, and if they want a fresh artefact after editing inputs, they click Regenerate.
That single paragraph will save weeks of state-machine glue and let you ship the product instead of debugging a build system nobody asked for.