Skip to content

Interview question · Agent Loops & the Harness

When would you ship a fixed workflow instead of an agent?

Interviewers ask this to see whether you will reach for autonomy by default. The strong answer is a test you can apply to any step, the arithmetic behind it, and the hybrid most production systems end up with.

mediumEssentialNewUpdated Nov 2026

TL;DR: Ship a workflow whenever you can write the steps down before the input arrives: it is cheaper, faster, repeatable and testable path by path. Use an agent only for the decisions that depend on what gets discovered, fence that step inside a deterministic spine with read-only tools and a budget, and let production traces tell you when to move the line.

How to approach it

Answer with a test, not a preference. The test is "who should decide the next step, and could code decide it?" Then name the three costs of handing a decision to the model (tokens and latency, variance, test surface) and say what agency buys in return. Ask about the task before committing: how varied are the inputs, how costly is a wrong action, and is there a latency budget?

A strong answer

Apply the test step by step, not to the system as a whole. Take an expense-report assistant. Extracting fields from a receipt image needs a model, but the order of steps does not: extract, validate against policy, check for duplicates, route for approval. Code can decide that sequence, so a workflow wins. The one step with genuine uncertainty, "the receipt is in a language we don't usually see and the merchant is ambiguous", can be a fenced agentic step with a lookup tool and a budget of five turns.

Then quantify why the default should be code:

latency, illustrative     workflow: 2 model calls × 1.5 s           = 3 s
                          agent:    7 model turns × 1.5 s + tools    ≈ 12 s
variance                  6 model-made step choices at 0.98 each     = 0.886 all correct
                          the same 6 steps fixed in code             = 1 by construction
testing                   workflow: enumerate 4 paths, test each
                          agent:    sample many runs, estimate a rate

Agency earns its keep when the path depends on what is found: triaging a bug, investigating a dispute whose cause could be billing, shipping or fraud, researching a question whose sources are unknown. The tell that a workflow needs an agentic step is a growing tree of exception branches that still misses cases.

The design most strong candidates land on is a deterministic spine with one bounded agentic step: code verifies identity, fetches data, runs the policy check and performs side effects; the agent investigates with read-only tools and returns a structured result that the spine validates before anything changes in the world.

Close with how you would keep the line in the right place: read the traces of the agentic step, and when 90% of runs take the same path, freeze that path into code. When a model upgrade lands, rerun the evals with fences removed one at a time to see which still earn their cost.

What interviewers probe next

"The product team says competitors market an 'autonomous agent'. Does that change your design?" No. The marketing word can describe the product; the architecture should still put agency only where the path is unknown, because that is what keeps the wrong-action rate and the bill down.

"Your workflow's intent router is itself a model. Isn't that an agent?" It is one bounded model decision with a fixed set of outcomes that code acts on. That is far easier to evaluate (a classification accuracy on labelled tickets) than an open loop.

"How would you know the agentic step is worth it?" Compare outcomes on the tickets it handles against the branch logic it replaced, at equal or acceptable cost and latency, measured across repeated runs.

What if?

What if · interview follow-ups

Hold your answer as the constraints change

An insurance team wants an agent to process claims: read the claim, check the policy, assess the damage photos, decide, and pay.

  1. Start here

    Which of those steps should the model control?

How it's scored

Weak: Defaults to an agent because the task "involves several steps", or answers with "it depends" and never names what it depends on.

Hire: States the who-decides-the-next-step test, names cost, latency and variance, and proposes a workflow with an agent where the path is unknown.

Strong Hire: Applies the test step by step, quantifies variance and latency, proposes the deterministic spine with a fenced read-only agentic step and a validated output, and explains how traces and model upgrades move the line over time.

Common mistakes

  • Treating "agent" as a product goal rather than an architecture choice.
  • Giving the agent the side-effecting tools as well as the investigative ones, so the fence has a hole in it.
  • Comparing designs on a demo run instead of on repeated runs across representative inputs.
  • Forgetting that a workflow's model calls still need evals, just simpler ones.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 6, and the site remembers where you stopped in each one.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in raises your free answers from 5 to 6 per topic, adds an applied lesson in every topic and easy practice tests, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

Nobody has commented. Post a correction or another way to answer.