Test the agent with sequences where each step depends on earlier changes, then verify both the immediate action and every downstream object it should affect. Score failures separately for local correctness and propagated correctness, because an agent that is right on the first object but wrong on dependent objects is not safe for workflow authority.
How to evaluate state persistence in an agent workflow
Statefulness is not proven by a single successful run. Teams should test whether the agent preserves the right intermediate facts, object references, approvals, and side effects across a sequence, then confirm that each later step still reflects earlier changes. The core question is whether the agent can carry forward workflow context without drifting, duplicating, or forgetting what it already changed.
A useful evaluation starts with scenarios that force dependency: one action must alter an object, and the next action must use that altered state rather than a fresh assumption. That is the difference between a tool user that can execute isolated steps and an agent that can manage a multi-step workflow with authority. The same discipline applies when the workflow spans systems, because the agent must remain consistent across boundaries, not just within one prompt turn.
For agents that coordinate with external tools or policy layers, the evaluation should also check whether the agent preserves the correct delegation state, not merely the task narrative. A strong result is one where the agent can resume from prior outcomes, select the right object without re-querying everything, and avoid reapplying actions that were already completed. The AI Agent Identity Security Buyer's Guide is useful here because it frames how teams compare agent identity and control capabilities before they trust workflow continuity.
What failure looks like when state does not propagate
State failure usually shows up as a split between local and downstream correctness. The first action may look right in isolation, but the agent then updates the wrong object, reuses stale state, or skips a dependent change that should have been chained from the earlier step. That is especially dangerous in workflows where one object becomes the input, permission, or trigger for the next.
Another common failure is partial consistency. The agent may remember the headline task but lose the exact object identifiers, change order, or previous commit state that makes the later step safe. In practice, this produces hidden authority problems: the workflow appears completed, yet the downstream systems still reflect an older state or a mismatched reference.
Teams should distinguish between a workflow that merely produces a correct final answer and one that preserves traceable state through the middle steps. The latter is harder to fake and more important for trust. An agent that can answer the final prompt but cannot preserve state across the chain is not reliable for delegated operations.
How to score the evaluation so it reflects real workflow authority
Score the run in two layers. First, measure local correctness, meaning whether each step did what it was asked to do at that moment. Then measure propagated correctness, meaning whether the step correctly influenced every object or system that depended on it. That second score is the one that reveals whether the agent can safely carry state across a workflow rather than merely producing stepwise outputs.
Use test cases that deliberately change the environment midstream. For example, the workflow can require the agent to update an object, then confirm the update through a later read, then act on the updated version instead of the original. The test should fail if the agent continues as though nothing changed. This is where state maintenance becomes an operational control question, not just a model quality question.
If the workflow depends on permissions, sessions, or handoffs between tools, verify that the agent’s state model matches the authority model. The AI Agent Authorisation Guide is relevant because it connects per-action authority to the practical question of whether an agent should still be allowed to continue after its context changes. The Agentic AI Identity Guide also helps when the workflow depends on who, or what principal, the agent is acting for at each step.
Risk and Threat Considerations
When state does not persist correctly, the risk is not just a bad answer, it is unsafe authority. An agent that loses track of earlier changes can overwrite the wrong object, repeat an already completed action, or apply a valid instruction to the wrong target. In workflows with real side effects, that becomes a control failure, not a minor quality defect.
Failure mechanism: The agent maintains conversational coherence but not durable workflow state, so later decisions are made against stale or incomplete context. That breaks dependency handling and can turn a seemingly successful first step into a harmful downstream action.
Impact: Teams may approve agents for longer, higher-stakes workflows than they can actually handle, which increases the chance of incorrect modifications, inconsistent records, and unauthorized side effects across connected systems.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Agent workflows can fail when context and authority drift across steps. |
| Recommendation — Enforce per-step authority checks before allowing the agent to continue. | ||
| NIST SP 800-53 Rev 5 | AU-3 — Content of Audit Records | Stateful workflow testing needs step-level evidence of what changed and when. |
| IA-5 — Authenticator Management | Workflow continuity often depends on credential or token state across steps. | |
| Recommendation — Record each agent action with the object, prior state, and downstream effect. Manage credential lifecycle so agent sessions do not outlive their intended authority. | ||
| OWASP ASVS | V7 — Session Management | The question is fundamentally about preserving workflow state safely across steps. |
| V8 — Authorization | An agent must retain the right authority as state changes across steps. | |
| Recommendation — Verify that session state persists correctly across multi-step flows. Recheck authorization before each step that depends on earlier state. | ||
Practitioner Guidance
What to verify: Verify that each test step can be replayed from the recorded state, not from the model's memory alone. The most useful evidence is a step-by-step trace that shows the exact object before and after each mutation, plus the dependency the next step consumed.
What to measure: Track the gap between step-level success and dependency-level success. If the agent is often right on the immediate action but wrong on the objects it should have propagated into, the workflow is not safe enough for delegated authority.
Decision rule: If a workflow can cause material change after the first step, treat state preservation as a release gate, not a nice-to-have. The practitioner takeaway is that multi-step agent testing must prove continuity of authority and object state, because isolated correctness does not establish safe workflow execution.
Related resources from NHI Mgmt Group
- How should security teams evaluate agentic AI workflows that use multiple tools and maintain state across turns?
- How should security teams observe and debug production AI systems when traces become multi-step agent workflows?
- How should teams evaluate multi-agent tool use at test time in high-stakes AI workflows?
- How should teams design state management for LLM applications that need to preserve context across multi-step workflows and follow-up questions?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 27, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org