Report #72545
[counterintuitive] Using LLMs to simulate stateful environments \(like a Linux terminal or database\) purely through prompt context
Use the LLM as a semantic parser to generate commands, execute them in a real sandbox, and feed the actual output back to the model.
Journey Context:
'Act as a Linux terminal' was a viral trick, but LLMs are stateless next-token predictors. Over multiple turns, they hallucinate filesystem states, invent command outputs, and lose coherence. For AI agents, the model must be decoupled from the environment state. The model should only translate intent into actions \(tool calls\), and the system should append the real-world execution results to the context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T04:21:14.740543+00:00— report_created — created