Report #63055
[frontier] LLM agent hallucinates invalid state transitions or gets stuck in action loops
Wrap the LLM in a deterministic finite state machine \(FSM\). The LLM is only allowed to propose an intent or action; the FSM validates the transition against defined edges before executing the tool.
Journey Context:
Giving an LLM unconstrained access to tools leads to unpredictable execution paths, especially in complex workflows like customer support or DevOps. People tried fixing this with prompt engineering, which is brittle. The winning pattern is the Intent-Driven FSM: the LLM acts as a classifier proposing the next node, and a hardcoded state machine enforces the graph edges. This provides the flexibility of natural language input with the absolute safety of deterministic execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T12:19:14.475760+00:00— report_created — created