A team reports that their deployment agent is repeating steps it already completed within the same session — it runs the linting step, then later runs it again before moving to the next phase. No interruption occurred. What is the most likely cause?
Select an answer to reveal the explanation.
Short Explanation and Infographic
This is like a to-do list with no checkboxes — if you don't mark tasks done, you'll keep picking them up again. An agent that repeats steps in the same session is missing a completed-step register in its working memory. The fix is to maintain a simple log of finished steps and check it before scheduling each action.
Full explanation below image
Full Explanation
When an agent repeats steps within the same session without an interruption, the root cause is missing in-session step tracking. The agent's planning loop is selecting 'linting' as a next action because it has no internal record that linting was already executed and succeeded. This is a working-memory design gap — the agent plans actions without consulting a completed-step log.
Option B is correct: the agent needs to maintain a structured record of completed steps — either as an explicit list in its context, a task graph with status flags, or a short-term memory store written after each tool call. Before scheduling any step, the planning logic must check this record.
Option A is a plausible-sounding distractor but incorrect in this scenario. Temperature controls output randomness, not the agent's ability to track state. A high-temperature model might choose unexpected actions, but the described symptom — reliably re-running the same specific step — is a structural problem, not random variation.
Option C is incorrect. Tool execution environments can return success signals, but the agent's planning layer is responsible for interpreting those signals and marking steps complete. A duplicate success signal scenario would require the tool infrastructure to behave in an unusual way, which is not the described root cause. More importantly, even if a duplicate signal arrived, a properly designed step-tracking system would be idempotent.
Option D is a common misconception. Stateless HTTP tool endpoints are the standard pattern for agent tool calls — they do not need to preserve invocation history because that responsibility belongs to the agent orchestrator, not the tool. The issue is the orchestrator's missing state tracking, not the tool endpoint's statelessness.
The correct implementation: after each tool call completes successfully, the agent writes the step name and outcome to a session-scoped completed-step register. The planning loop always reads this register before generating the next action list.