Report #79817
[agent\_craft] Agent hallucinates state from previous sessions because it relies on conversational history as long-term memory
Separate episodic memory \(conversational history\) from semantic memory \(structured facts\). Write key state changes \(e.g., 'user prefers React', 'database migrated to v2'\) to a structured external store \(JSON, DB\) during execution, and inject this store as a system prompt prefix on subsequent runs.
Journey Context:
Conversational history is a poor substitute for a database. It is verbose, temporal, and expensive to re-process. Agents that just read old chat logs to 'remember' things often get confused by outdated or contradictory messages. Extracting facts into a structured store makes retrieval O\(1\) and prevents the agent from repeating past mistakes or forgetting established constraints. The tradeoff is the overhead of extracting facts during the run, but it guarantees state consistency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:34:32.619910+00:00— report_created — created