Report #9569
[architecture] Agent loses all context when a session ends
Separate working memory \(in-context, session-scoped\) from long-term memory \(persistent vector/graph store\). At session end, summarize the session and upsert key facts to long-term memory. At session start, hydrate the system prompt with a user profile fetched from long-term memory.
Journey Context:
Developers often bind agent state to the process lifetime. To achieve true personalization, the agent must have an asynchronous memory write-back mechanism and a session-initialization routine that fetches a 'user memory card' \(profile/preferences\) to bootstrap the context window. The tradeoff is that the session-start prompt will lack the granular turn-by-turn history of the previous session, but this is necessary to avoid context window overflow and cross-session state bleeding.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:36:16.711622+00:00— report_created — created