Agent orchestration frameworks promise to tame LLM non-determinism by imposing execution order. Strands, an AWS-backed workflow tool, makes that trade explicit: you declare a dependency graph in Python, and tasks run only when their upstream dependencies reach completed status. The model no longer decides who runs next. You do.
But deterministic sequencing comes with a cost. Upstream results arrive as plain text spliced into the next step's prompt. No field names, no types, no validators. Each step is still a full agent loop, and the model inside it still decides which tools to call and what words to produce. Nine real production runs show what breaks when you split workflow control from data contracts.
The Workflow Mechanism
Strands workflows use a dependencies array to enforce execution order. A task waits until every task it depends on has reached completed state. That check is a Python loop, not a model decision.
workflow_task = WorkflowTask( name="sum_and_save", description="Add token counts and save a brief", tasks=[ Task(id="sum", description="Call sum_tokens tool"), Task(id="save", description="Call save_draft tool") ], dependencies=[ Dependency(task_id="save", depends_on=["sum"]) ] ) The dependency check runs before any model call. If sum has not completed, save never starts. You get the order you wrote.
What you do not get is a typed data contract. When sum finishes, its output is serialized as text and injected into the save step's prompt. The model in save must parse that text, infer the structure, and decide what to do with it. If the upstream step produces 3,944 tokens of unstructured output, the downstream step receives 3,944 tokens of unstructured input.
Nine Runs, Four Failure Modes
The author ran the same fixture nine times: three fictional per-node token counts in brief-input.json, a sum_tokens tool, and a save_draft tool. The model was amazon.nova-pro-v1:0 in us-east-1.
Failure Mode 1: Timeout Never Fires
You can set a timeout on a task. The workflow tool accepts it as a parameter. But the timeout is never read. Tasks that hang will hang indefinitely. The orchestrator does not enforce the limit you declared.
Failure Mode 2: False Success Reports
One run reported 100 percent success. The workflow state showed completed for both tasks. The output file was empty. The model called the tools, the tools returned success codes, and the orchestrator recorded success. The actual work did not happen.
This is the gap between "the model reported success" and "the task actually succeeded." The orchestrator tracks state transitions, not task outcomes. If the model hallucinates a success message or the tool returns a success code without side effects, the workflow continues.
Failure Mode 3: Zero-Step Replay
One run was restarted. The orchestrator replayed zero steps. The dependency graph was intact, the task states were recorded, but the replay logic did not reconstruct the execution path. The restart began from scratch, ignoring the partial state.
Partial state recovery is hard when state is text. The orchestrator knows which tasks completed, but it does not know what data they produced or what side effects they triggered. Replaying from a checkpoint requires either idempotent tools or a way to skip already-completed side effects. Neither was present.
Failure Mode 4: 3,944 Tokens as Plain Text
The sum task produced 3,944 tokens. The orchestrator recorded them as a single text blob. The save task received them as a single text blob. No schema, no fields, no way to extract the sum without asking the model to parse it again.
This is the cost of declarative workflow graphs with imperative agent code. The graph enforces order, but the data flowing through the graph is unstructured. Each step is an agent loop, and agent loops produce natural language.
Execution Order vs. Data Contracts
| Dimension | Workflow Orchestrator | Swarm (UC06) | Graph (UC07) |
|---|---|---|---|
| Execution order | Declared in Python, enforced before model call | Model decides via handoff tool calls | Python predicate on edges |
| Data between steps | Plain text spliced into prompt | Plain text in handoff message | Plain text in graph state |
| Timeout enforcement | Declared but not enforced | No timeout mechanism | No timeout mechanism |
| Partial state recovery | Restart replays zero steps | No restart mechanism | Checkpoint exists but replay is manual |
| Success validation | Tracks state transitions, not outcomes | No validation | No validation |
All three orchestrators share the same weakness: they move text, not data. The workflow tool adds deterministic sequencing, but it does not add type safety.
Why a Python Dependency Check Fixes Order
The dependency check is a loop over task IDs. Before starting a task, the orchestrator checks whether every task in its depends_on list has status == "completed". If not, the task waits.
This is simpler than a graph predicate because it does not evaluate conditions. It only checks completion. The trade is that you cannot express conditional branches. If you need "run task C only if task A succeeded and task B failed," you need a graph or a swarm.
The dependency check also reveals the boundary between declarative workflow graphs and imperative agent code. The graph is declarative: you list tasks and dependencies, and the orchestrator enforces them. The agent code is imperative: the model decides which tools to call, in what order, with what arguments. The orchestrator does not see inside the agent loop.
This split is why the timeout never fires. The timeout is a workflow-level parameter, but the agent loop is opaque. The orchestrator cannot interrupt a model call or a tool call. It can only wait for the agent loop to finish.
Instrumenting for Actual Success
To distinguish "the model reported success" from "the task actually succeeded," you need observability at the tool boundary.
Tool return codes are not enough. A tool can return success without producing the expected side effect. Instrument the side effect itself: check that the file was written, the API call returned the expected status, the database row was inserted.
Log structured output from tools. If a tool produces data, log it as JSON with a schema. The orchestrator will still pass it as text, but you can validate it in post-processing or in a separate monitoring step.
Add a validation task. After the workflow completes, run a task that checks the outputs. If the validation task fails, the workflow fails. This does not prevent the false success, but it detects it.
Track token counts separately. If a step produces 3,944 tokens, log that count. If the next step receives fewer tokens, something was truncated. If the next step receives more tokens, something was added. Token count is a cheap proxy for data integrity.
When Workflow Orchestration Fits
Workflow orchestration fits when you need deterministic execution order and you can tolerate unstructured data between steps.
Use it when:
- You have a fixed sequence of tasks with clear dependencies.
- Each task is expensive (minutes, not milliseconds) and you want to avoid redundant work.
- You need to run tasks in parallel when dependencies allow.
- You can validate outputs after the workflow completes, not during execution.
Avoid it when:
- You need typed data contracts between steps.
- You need conditional branches based on task outcomes, not just completion.
- You need to enforce timeouts on individual tasks.
- You need to replay partial workflows from checkpoints with side effects.
The workflow tool is a sequencer, not a data pipeline. It enforces order, but it does not enforce correctness. If you need both, you need something else.
Technical Verdict
Strands workflows solve the execution order problem by moving sequencing logic out of the model and into Python. The dependency check is simple, predictable, and runs before any model call. You get the order you declared.
But you lose data contracts. Upstream results are text, downstream steps parse text, and the orchestrator does not validate the parse. Timeouts are declared but not enforced. Restarts replay zero steps because partial state is text, and text does not reconstruct execution paths. Success is a state transition, not a task outcome.
Use this pattern when execution order is your bottleneck and you can validate outputs after the fact. Avoid it when you need type safety, conditional branches, or partial replay. The trade is explicit: less freedom for the model, more certainty about sequence, no certainty about data.
