What Cross-Session Context Leakage Is
Cross-session context leakage is a failure of state management in AI agent systems. When memory, retrieved documents, or conversational history from one user or tenant session is exposed in another session, the result is a confidentiality failure that originates in the agent's runtime architecture rather than in the underlying model itself.
Why This Differs From Related AI Security Risks
Cross-session context leakage is frequently confused with prompt injection or model training data leakage, but the mechanisms are distinct. Prompt injection manipulates a single session's instructions; training data leakage concerns information the model learned during training. Cross-session leakage instead concerns how an operational system manages memory and state across concurrent or sequential sessions, making it a runtime and architecture problem rather than a model behavior problem.
Technical Mechanisms That Create Leakage Risk
Several architectural patterns commonly used in agent deployments introduce leakage risk when session boundaries are not explicitly enforced: shared vector stores queried without tenant filters, conversation buffers keyed loosely or not at all, caching layers that key on content rather than session identity, and tool-call payloads that carry more context than the receiving function requires.
Detecting Leakage at Runtime
Detection depends on visibility into actual model input payloads, not just application-level logs of intended behavior. Effective detection requires logging what was actually sent to the model at inference time, correlating that payload against the session or tenant identifier that should have scoped it, and alerting when content associated with one session identifier appears in another.
Where Runtime Governance Fits
Architectural correctness reduces risk but does not eliminate it, since implementation errors, caching bugs, and orchestration changes can silently reintroduce leakage. Runtime governance provides continuous verification, independent of how memory was designed, that session and tenant boundaries are being enforced in practice.