Why the Same LLM Produces Different Results in Long-Running Workflows: A Look at the Execution System
Long multi-step tasks often produce inconsistent results even when the underlying model and parameters are identical. This article explains why: it breaks down the roles of the model, inference conditions, and the execution system, and analyzes how long workflows amplify small errors through error propagation, context drift, and compounding step dependencies. It then outlines five core capabilities an execution system needs—context organization, tool call validation, explicit state management, failure recovery, and verifiable deliverable handoff—along with guidance on designing a reliable execution loop and evaluating where result differences actually come from.
1. Same Model, Not Necessarily Same Results
In short question-and-answer tasks, the model typically performs one round of understanding followed by one response. Even if the execution environment differs, output quality rarely diverges noticeably as long as the input is essentially the same.
Long-running workflows are different. A task like “gather materials, organize data, generate an analysis report, save the file, and verify the results” looks like a single instruction, but in practice it may involve dozens of model inference calls, tool invocations, and state updates. A deviation at any step can affect everything that follows.
When analyzing result differences, you need to separate three layers:
- The model itself: reasoning ability, knowledge coverage, and instruction-following behavior.
- Inference conditions: the actual context fed into the model, sampling configuration, tool descriptions, and output constraints.
- The execution system: task orchestration, tool integration, state management, exception handling, and delivery mechanisms.
“Nothing changed in the input” often only means the original user instruction stayed the same—it does not mean the model received identical content at every step. One execution environment may retain full tool outputs while another keeps only summaries; one may repeatedly inject early constraints into context while another lets them gradually fall out. These differences change the model’s subsequent decisions.
At the same time, the same model and parameters do not automatically guarantee determinism. Random sampling, low-level computational differences, changes in external web content, and tool return ordering can all cause output variance. So you cannot conclude that all problems come from the execution system just because “same model, same parameters”—you need to localize the issue through process records.
2. The Model Decides; the Execution System Makes It Real
Think of the model as a decision component: based on current information, it proposes the next action or generates content. The execution system turns those actions into real operations and supplies reliable information for the next round of judgment.
Their responsibilities are not strictly separate. Step decomposition can be done by the model, by a predefined pipeline, or through a hybrid approach. But regardless of where the plan comes from, the execution system should carry the following engineering responsibilities:
- Check whether the plan complies with permission and business constraints;
- Map actions to concrete tool operations;
- Validate tool parameters and returned results;
- Track completed and pending steps;
- Apply controlled recovery strategies when exceptions occur;
- Save final results as accessible, inspectable artifacts.
For example, the model generating the text “save the summary table to the specified directory” does not mean the file has been saved. The step is only truly complete when the execution system performs the write and verifies that the file exists and its contents meet requirements.
This distinction directly affects system design: never treat the model’s description of an operation’s outcome as evidence that the operation succeeded.
3. Why Long Workflows Amplify Small Errors
3.1 Dependent steps reduce overall success rate
Suppose a task requires twenty sequential steps, each with a 95% success probability, and the steps are mutually independent. The overall success probability is roughly:
P = 0.95²⁰ ≈ 35.8%
This is a simplified mathematical illustration, not measured data from any real system. In real tasks, steps may be interdependent, and there may be retries, validation, and fallback paths, so this formula cannot directly predict product performance.
Still, it reveals a key fact: for tasks where every critical step must succeed, per-step reliability does not equal end-to-end reliability.
More generally, workflow success probability can be understood as the product of conditional success probabilities across steps. Problems left by an earlier step can reduce the chance of success downstream; one bad data filter can simultaneously corrupt the statistics, the charts, and the final conclusions.
3.2 Errors don’t just accumulate—they propagate
The risk in long workflows is not only “a step failed,” but also “an error was carried forward as if it were correct.”
For example, a data-reading step misses some records, but the response format still looks normal. If the system only checks that a response arrived—without checking record counts, field completeness, or filter conditions—downstream analysis will be built on incomplete data.
Such silent errors are usually harder to detect than explicit failures, because the workflow can finish smoothly and the artifacts may look plausible.
3.3 Working information drifts away from the task goal
As the workflow progresses, tool outputs, model interpretations, and history keep accumulating. Without a filtering mechanism, the current context fills up with low-value information while critical constraints become less visible.
The problem is not just limited context length—it is unmanaged information priority. The system should clearly distinguish between “constraints that must always be honored,” “evidence needed for the current step,” and “history kept only for traceability.”
4. Five Core Capabilities an Execution System Needs
4.1 Context organization: give every step the right information
Effective context management is not simply truncating history, nor compressing everything into summaries. It means layering information by purpose.
At minimum, three categories are recommended:
- Stable constraints: task objectives, output formats, permission boundaries, and acceptance criteria;
- Working context: inputs needed for the current step, relevant evidence, and open questions;
- External memory: full source materials, intermediate files, execution history, and large tool outputs.
Stable constraints should remain continuously visible; working context should be updated per step; external memory should be retrieved on demand.
Summaries must also retain source and location information. Recording only “materials organized as complete,” without noting where the materials are stored, what they cover, and what issues remain open, leaves later steps unable to reliably continue.
For long tool outputs, extract the necessary fields first, then store the raw content. This reduces context load while preserving an audit trail.
4.2 Tool calls: it’s not about quantity, but selectability and verifiability
More tools do not automatically mean a more capable system. Unclear boundaries between similar tools actually increase the risk of wrong selections.
Tool definitions should clearly state purpose, input requirements, output structure, permission scope, and side effects. The execution system should validate parameters before the call and check results after it.
For example, when reading data, verify that required fields exist; when generating files, check that the file is readable; when performing write operations, confirm the target location and overwrite rules.
Tool failures also need to be classified. Network timeouts may warrant a retry; input format errors require correcting parameters; insufficient permissions should halt the related operation with an explanation. Treating every error as “just try again” is both inefficient and potentially risky.
4.3 State persistence: don’t rely on conversation memory alone
Long workflows should maintain explicit state rather than letting the model infer progress from the chat history.
A step’s state should include at least:
- Step identifier and dependencies;
- Current status, such as pending, in progress, succeeded, or failed;
- References to inputs and outputs;
- Execution count and failure reasons;
- Validation results and update timestamps.
State updates must match actual execution results. Never mark success before a tool call completes, and never skip verification just because the model says “done.”
For operations involving external writes, you must also consider interruption: the operation succeeded, but the state was not recorded. To handle this, use operation identifiers and pre/post-execution checks to detect duplicate operations. If a shared transaction between the state store and the external system is not possible, design reconciliation or compensation mechanisms instead of assuming the two always stay in sync.
4.4 Failure recovery: repair the smallest possible failure scope
Long-running tasks should not be fully rerun on every error. A sound recovery mechanism first identifies the error type, then determines the affected step range.
Recoverable errors can use retries with an attempt cap and waiting intervals. Logic errors require replanning or corrected inputs. Exceptions involving permissions, sensitive data, or irreversible operations may require human confirmation.
Checkpoints are a key way to reduce recovery cost. After each completed phase, save verifiable intermediate results; if a later phase fails, resume from the most recent valid checkpoint.
But more checkpoints is not always better. Frequent saving adds cost and can leave behind large amounts of useless state. It is better to place checkpoints at boundaries such as the end of data acquisition, the completion of key computations, and just before formal delivery.
Recovery must also handle dependencies. If the underlying data is corrected, every summary, chart, and conclusion generated from the old data must be recomputed—you cannot just fix the final write-up.
4.5 Deliverable handoff: success requires explicit acceptance criteria
Execution finished and task completed are not the same thing.
For a report task, acceptance criteria might include:
- The file has been saved to the specified location;
- The file opens correctly;
- All required sections and data tables are complete;
- Data definitions match the task requirements;
- Conclusions can be traced back to supporting evidence;
- The user has permission to access or download the file.
The delivery location should be determined at task start, not chosen ad hoc at the end. Artifacts should also carry version information, generation time, and input scope to support later revisions and auditing.
If some criteria are unmet, the system should explicitly flag “partially complete” or “confirmation needed,” rather than using a fluent summary to paper over unfinished work.
5. Designing a More Reliable Execution Loop
A practical loop can be summarized as:
Goals and acceptance criteria → Plan and dependency checks → Tool execution → Result validation → State commit → Final acceptance and delivery.
The most important part is keeping “execution,” “validation,” and “state commit” separate.
Take data analysis as an example: after reading data, first check fields, row counts, and time ranges; once validated, mark the step as successful and save a reference to the data. Downstream statistics steps should only consume validated inputs, not any raw response that merely looks fine.
For highly open-ended tasks, let the model propose candidate plans and have the execution system check budget, permissions, and tool availability. For business processes with stable steps, use a fixed main pipeline and restrict the model to local tasks like classification, extraction, and interpretation.
Neither approach is absolutely better. The key is deciding how much room for action the model gets, based on the task’s uncertainty and operational risk.
6. Locating Where the Difference Comes From
When evaluating long workflows, don’t look only at the final answer or whether tool calls succeeded. Observe at least the following:
- End-to-end acceptance pass rate;
- First-attempt success rate and retry counts per step;
- Recovery success rate after failures;
- Number of invalid calls and duplicate writes;
- Total time and resource consumption;
- Completeness and evidence traceability of final artifacts.
When comparing execution environments, fix the task set, model configuration, initial data, tool permissions, and acceptance rules as much as possible, and run multiple repetitions.
Dynamic web pages, real-time data, and external services introduce extra variance. Where feasible, use fixed data snapshots and controlled tool environments for controlled comparisons, then test robustness under real-world external changes in production-like conditions.
The source material mentions “data published on an official website” but provides no specific figures, sources, or testing methodology, so no performance conclusions can be drawn from it. When reading any published metrics, first confirm the task definition, sample size, success criteria, retry budget, and degree of human intervention.
Metrics both labeled “success rate” may measure entirely different things—one might track a single tool call, another a full task delivery. With different measurement definitions, direct comparison is meaningless.
7. Conclusion: Long-Workflow Capability Is a System Property
The same model producing different results in different execution environments is not mysterious. The model generates judgments; the execution system determines whether those judgments are correctly implemented, validated, saved, and recovered.
Short tasks easily mask weaknesses in the execution layer; long tasks progressively amplify context loss, broken state, tool misuse, and incomplete delivery.
So improving long-workflow quality should not rely solely on swapping models or adding prompt text. The more effective engineering path is: define acceptance criteria, manage context, persist critical state, validate tool results, build controlled recovery mechanisms, and ensure final artifacts are accessible, auditable, and reusable.
A long-running task is only truly complete when “the model believes it’s done” matches “the system can prove it’s done.”
