85 agentic tools audited for security incidents · Talk to the lab →
MotionticBook a call
Glossary

What is execution derailment in AI agents?

Execution derailment is the failure in which an LLM agent loop, as tool outputs pile up in its context, starts skipping steps, repeating tool calls, looping or inventing steps it never ran, and so fails to finish.

Google named the failure in its post on building ADK 2.0 (2026-07-01). In a typical agent loop every tool output is appended to the model's context. Over several iterations that adds prompt noise, and the agent becomes prone to loops, redundant tool calls and failing to finish. When the context gets crowded, the post says, the agent may skip steps or hallucinate execution paths.

The same pattern shows up after long pauses. Google's May 2026 guide to pause-and-resume agents observes that after long idle gaps a model often hallucinates intermediate steps that never happened, when it reconstructs progress from chat history.

Symptoms

  • Skipped steps

    A required step, such as a verification or an approval check, is silently left out.

  • Repeated tool calls

    The same lookup or action runs again because the earlier result is lost in the noise.

  • Loops

    The agent cycles between the same few actions without progress.

  • Invented progress

    The agent acts as if a step ran that never did, which is the most dangerous form when the next step has side effects.

Fixes

  • Move control flow into code

    Google's answer in ADK 2.0 is a graph runtime: transitions are evaluated in code and only steps that need judgement use a model. In its refund example, tokens per run fell from 5,152 to 2,265 and latency from 7.2 to 5.7 seconds, figures Google labels illustrative, using mock APIs.

  • Keep state explicit

    Track progress in a state machine or checklist stored outside the conversation, so the agent reads its current step instead of inferring it.

  • Shrink what each call sees

    Pass each step only the data it needs, trim or summarise old tool results, and keep tool output terse.

  • Check before side effects

    Verify that prerequisite steps actually completed before any irreversible action runs.

What it is confused with

  • Context rot

    The underlying cause: recall degrades as context grows. Derailment is what that looks like in an agent's actions.

  • Hallucination

    A broader term for invented content. Derailment is specific to the execution path of a multi-step loop.

  • Context anxiety

    Anthropic's term for a model wrapping up early as it nears its context limit. That is stopping too soon, rather than wandering.

How Motiontic's engineers apply it

Motiontic's engineers look for derailment in traces, not just final answers: repeated tool calls, missing required steps and claims that do not match the log. Where a process has a known order, that order goes into code and the model handles only the steps that need judgement, which also limits what a prompt injection can redirect.

Execution derailment at a glance

Execution derailment at a glance
SymptomLikely causeUsual fix
Same tool called twiceEarlier result lost in a long contextTrim old results, keep tool output terse
Required step skippedControl flow left to the modelPut fixed steps in code or a graph
Progress claimed that did not happenState inferred from chat historyStore progress in explicit state
Agent cycles without finishingNo stop condition or budgetIteration caps and done criteria

Common questions

Why do AI agents skip steps?

As tool outputs accumulate, the context gets noisy and the model can lose track of which steps are done. Google calls this execution derailment and moves fixed steps into deterministic code.

Does a larger context window prevent execution derailment?

Not on its own. A larger window holds more noise as well as more signal. Explicit state, trimmed tool results and code-controlled steps address the cause.

Should every agent be turned into a graph to avoid derailment?

No. Google's own guidance keeps agents for ambiguous, subjective or unstructured work and uses workflows for predictable sequences. Many systems mix both.

Running agents that have to hold up?

Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.