arXiv:2610.24359cs.CROct 2026

Manuscript Offprint

arXiv:2610.24359

Can Agents Keep Secrets They Were Never Told? Benchmarking Latent Privacy Risks Across Sessions with MemJoin

Qishun Yang, Shu Yang, Difei Xu, Di Wang, Meng Ding

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

To support sustained interactions and personalized assistance, agents use long-term memory to retain and combine user information across sessions. Reusing such memories can lead an agent to state a sensitive relation while completing an ordinary task that does not require it. The relation to protect and the combination of clues that reveal it may remain hidden at memory write time, when later records and tasks are still unknown. In this paper, we introduce MemJoin, a privacy benchmark of 288 synthetic analysis cases in which the complete history entails a sensitive relation, but every individual session is insufficient. We evaluate six memory systems with the same answer-generating model, alongside full-history and no-history controls. Each system writes and updates memories in session order and later retrieves context for an ordinary task, while target annotations remain with the evaluator. We separately check which target attribute values appear in stored records and retrieved context, and whether the final answer states the complete, person-linked relation. In a separate paired test on a prespecified subset, removing shared identifiers and other connecting clues can change complete-relation output while all checked target attribute values remain visible. These findings show why checking attribute visibility alone is insufficient to evaluate what records from different sessions reveal together.

1 INTRODUCTION

Long-term memory is becoming a core component of LLM agents. An agent that assists the same user over weeks or months writes records of each session, updates them as the user's circumstances change, and retrieves them when a later task needs them (Packer et al., 2023; Chhikara et al., 2025; Zhong et al., 2024; Xu et al., 2025; Yang et al., 2026b; Zhang et al., 2026). This persistence is what lets an agent remember a preference stated once, follow up on an earlier request, and personalize its assistance without asking the user to repeat themselves; memory is now a standard feature of deployed assistants, and benchmarks evaluate these abilities directly (Mireshghallah et al., 2025; Hu et al., 2025). The same persistence, however, may create privacy risks that do not arise within a single interaction.

Because memory accumulates information across sessions and reuses it later, an agent can combine facts that the user supplied at different times and for different purposes, and infer from them a relation that the user never stated in any one session. Consider a user who, in one session, asks the agent to note the date of an upcoming appointment; in another session, mentions the program code used to book it; and in a later session, encounters a public directory entry explaining that this code denotes a counseling program at a named clinic. One records only a date, one only a code, and one only what a code means in general. Together, however, the records show that this user is attending a counseling program at that clinic on that date. This sensitive relation, linking the user to a service, location, and time, is supported by the full history but by no single session. While completing an ordinary later task, such as preparing a packing list for the next appointment, the agent may state this relation even though the task does not require it. We call this risk cross-session inference.

This risk is hard to detect for three reasons. First, it cannot be seen when the record is written. A date, a code, or a directory entry is harmless on its own, and at the time it is stored the later records and

Figure

Figure 1: Unnecessary disclosure through memory. Four sessions jointly identify a sensitive relation that no single session reveals. The paired replies contrast task focused reuse with disclosure of that relation.

tasks that would make it sensitive do not yet exist, so neither the relation that needs protection nor the combination of clues that would reveal it can be identified in advance. Second, the combination can form at different stages. A memory writer may merge clues into one record, an update may consolidate an earlier and a later state, or retrieval may bring separate records into the same context for a later task. Third, by the time the risk can be recognized, the agent may already have stated the relation, and deleting the stored records then does not retract what the recipient has learned. Therefore, checking each session for sensitive statements cannot rule out the risk, and checking only final answers cannot explain it. A privacy evaluation of long-term agent memory must observe separately which clues reach the agent through memory storage and retrieval, and whether the final answer states the relation.

However, existing privacy evaluations do not isolate this risk. Privacy benchmarks for agents and memory test whether sensitive information that is already supplied is used inappropriately; because this information is present in full within a task trajectory or a memory item before the task begins, the construction of memory is abstracted away and no combination of items is required (Shao et al., 2024; Zharmagambetov et al., 2025; Mireshghallah et al., 2025; Pulipaka et al., 2026; Dong et al., 2025; Zhang et al., 2025). Memory systems and diagnostic studies examine whether information is stored and retrieved, and whether retrieved content leads to unsafe output (Packer et al., 2023; Chhikara et al., 2025; Ma et al., 2026; Al-Tawaha et al., 2026). These settings therefore leave cross-session relation formation largely untested. None of them constructs sensitive targets that are supported by the full history but not by any individual session, or tests whether such a relation is later stated in an ordinary task that does not require it.

To study this risk, we introduce MemJoin (Figure 1), a benchmark of 288 synthetic cases that distribute the supporting facts and connecting clues of a sensitive relation across sessions. Each case is constructed so that the full history supports the relation, no individual session does, and the later task does not require it. MemJoin further tracks how these clues propagate through memory storage and retrieval and whether the final answer states the complete relation, allowing cross-session inference to be diagnosed across stages. We evaluate six memory systems with a fixed answer-generating model and observe cross-session inference under every system. Our analysis further shows that what memories reveal together depends not only on which attribute values are retained, but also on how information across sessions is connected. To our knowledge, MemJoin is the first benchmark to evaluate cross-session privacy risk in memory construction, retrieval, and downstream answers.

To summarize, our contributions are as follows:

• We identify and formalize cross-session inference, a privacy risk of long-term agent memory. A sensitive relation is obtained only by combining records from several sessions, and no single session contains it; yet an agent may state it while completing an ordinary task that does not require it.

• We introduce MemJoin, a benchmark of 288 synthetic cases that evaluates this risk, together with a stage-wise diagnostic protocol that distinguishes, when an answer does not state the relation, whether the needed attribute values never reached the agent or reached it without being combined.

• We benchmark six memory systems under a fixed reader with full-history and no-history controls, examining which clues each system delivers to the agent and whether its answers to ordinary tasks combine them into the sensitive relation. We show that attribute visibility is insufficient for privacy evaluation. What memories from different sessions reveal together depend not only on which attribute values they contain, but more on how they connect.