Non-deterministic behavior means a system can produce different results even when given the same input. In security, this matters because repeated tests may not reproduce the same tool calls, outputs, or side effects. The result can depend on hidden state, changing context, timing, data freshness, or model sampling.
For AI agents, non-determinism makes risk harder to predict. A prompt that looks safe in a lab may trigger a different sequence of actions in production, especially when the agent can read files, query databases, or call external services. Defenders respond with runtime monitoring, strict permissions, approval steps for sensitive actions, and logging that captures what the agent actually did. Attackers can also exploit this variability by trying many times until the system takes an unsafe path.


