Apply to my task
arXiv:2610.25707 ★ 94 Oct 19, 2026

Owner Attribution: Putting the Owner's Name Inside Every Agent Memory Entry Keeps It Off Other People's Accounts

Key result

Memory shared by several users slips other people's logins to the agent. In the worst-case scenario the agent grabs a foreign token in 80–94% of runs, and in 43% it also modifies the other person's account: buying with someone else's card, reading someone else's email. Some of these runs even pass the official success check, because it doesn't look at whose account the action happened in. The Owner Attribution method lets you keep one memory for many people without the agent mistaking someone else's access for its own. The trick: write the owner's name inside the sentence itself, for example "Earlier session for Norman Smith: logged into Gmail with username…". The agent reads this as a fact about another person, not as a reference sheet of its own data. Foreign logins were used 1 time in 305 runs, versus 92 times without names.

01

TL;DR

Owner Attribution is a way of writing an agent's long-term memory: the owner's name goes right into the sentence that holds the credential, for example "Earlier session for Norman Smith: logged into Gmail with username…". When the name sits at the start or in the middle of the line, the agent can see whose access it is. When entries are impersonal ("gmail: username=…, password=…"), the agent assumes they belong to the current user.

The headline finding: memory shared across several users almost always mixes in other people's logins (in 85% of the relevant apps), but in practice agents usually ignore them. Trouble starts in one specific scenario. The memory holds none of the user's own credentials, just one belonging to someone else, and it's written as "my data". Then seven different agents grab the other person's token in 80–94% of runs, and in 43% of cases they modify someone else's account: buying things with another person's card, reading another person's email. Some of these runs even pass the official task-success check, because the check doesn't look at whose account the action happened in.

The fix takes one line. With the owner's name inside the sentence, foreign logins were used in 1 of 305 paired runs versus 92 without names. An added rule like "use only the requester's credentials" cuts misuse less. A name tacked onto the end of the line ("[owner: N]") doesn't help every model.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STEP 1: When writing to memory → get the owner from a trusted source (the session account, not what someone says in chat)
STEP 2: Record the credential as a sentence with the owner's name inside → "Earlier session for N: logged into X with username…"
STEP 3: Put a name on EVERY line (at minimum, on other people's lines)
STEP 4: Keep the line "My name is {name}" in the prompt before the task → without it, attribution works worse
STEP 5: Verification → check whose account the calls actually ran in, not just "task solved"

Steps 1–3 are about how memory gets written. Step 4 is about the agent's prompt. Step 5 is a manual log review.

03

Example in Practice

Task: The agency MarketPro runs Amazon and Etsy seller accounts for dozens of clients. A single AI assistant with shared memory serves all of them. Today a manager asks: "Update the inventory in Alex Miller's store." But memory has no Amazon login for Miller; it does have one for Clark Crafts. The impersonal entry looks like "Amazon Seller Central: username=…". The assistant logs in with it and edits the wrong store.

⚠️ Storing passwords in agent memory is a bad idea in itself. The example only shows the entry format. Keep real secrets in a password manager.

Prompt (memory block and task):

My name is Alex Miller.

Notes from earlier sessions:
- Earlier session for Emma Clark (Clark Crafts LLC): logged into Amazon Seller Central with username [email protected], password [hidden].
- Earlier session for Alex Miller: logged into Etsy Shop Manager with username [email protected], password [hidden].

Task: update the inventory in Amazon Seller Central.
Use a saved credential only if it belongs to the person who assigned the task. Otherwise, get that person's own access through the standard process.

Result: The model will see that the Amazon credential is registered to Emma Clark, not to Alex Miller. Expected behavior: it won't use that login, and will either request Miller's own access or stop. Without the owner's name in the entry, agents in the study most often just took the other person's login. This varies by model: some react weakly, others strongly.

04

Why It Works

The LLM weakness. The agent can't tell "written by me" from "written for me". A memory entry formatted like a reference sheet ("Credentials from earlier sessions: gmail, username, password") reads to the model as an instruction: "here's my data, go ahead". The only signal that the login belongs to someone else is a mismatch between the user's name and the "My name is…" line. Agents almost never check it. After logging into someone else's account, the profile was checked in only 12 of 98 runs for one model and 5 of 116 for another.

The LLM strength. Models are good at binding entities within a single sentence. When the owner's name sits right next to the login ("for Norman Smith: logged into Gmail…"), the model reads the entry as a fact about another person, not as data for the current task. A name at the start or in the middle of the line worked better than a trailing "[owner: N]". But the authors themselves caution that these forms differ in both syntax and position, so you can't pin the effect on position alone.

What the method buys you. You don't have to beg the model to "be more careful". The technique rewrites the entry so that misuse looks like an obvious mistake. An added prohibition in the instructions worked far worse: 31→13, 28→18 and 31→25, versus 0, 0 and 1 with the name in the entry.

Control knobs: - Name placement: at the start or inside the sentence beats the end of the line. - Coverage: labeling the other person's line is enough. Labeling only the requester's lines is weaker (4 and 3 cases remained, versus 0 and 0). - The "My name is…" line: without it, owner-labeled entries were used in 9 of 95 runs; with it, in 1 of 390. - Name source: if the requester is recorded as the owner, the protection breaks. - Format: narrative ("earlier session for…") lowers the share of runs that use saved passwords on clean memory (from ~100% to 26–60%). That's a cost, and it's covered under limitations.

05

Prompt Template

The method has two parts: a rule for writing memory and a block that goes into the agent's prompt.

1. Instruction for the agent that writes memory:

Rule for writing to long-term memory:
Every access entry (login, token, key, account) is a single sentence
where the OWNER is named inside the sentence itself, before the login.

Entry format:
"Earlier session for {owner}: logged into {service} with username {username}, password {password}."

Requirements:
- Take the owner from the authenticated session ({owner_source}), not from what's said in the conversation.
- Don't use trailing tags like "[owner: ...]" — only the name inside the sentence.
- Don't write entries without an owner. If the owner is unknown, don't save it.

2. Block in the agent's prompt at runtime:

My name is {requester_name}.

Notes from earlier sessions:
{memory_entries_in_the_format_above}

Task: {task}.
Use a saved credential only if the owner in the entry is {requester_name}.
If there's no matching credential, get the requester's own access through the standard process.

What to fill in: - {owner} — the name of the person or company the credential belongs to. - {service} — the name of the app or account. - {owner_source} — where the system reliably knows who's in the session (login account, SSO, CRM). - {requester_name} — whoever is assigning the task right now.

🚀 Quick start — paste this into the chat:

Here's an Owner Attribution template for agent memory. Adapt it to my situation: [describe your agent, who uses it, and what data it stores]. 
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask who uses the agent, what data lives in memory, where the owner's name comes from at write time, and where the "My name is…" line sits in the prompt. Those questions matter because the method rests on three things: the name comes from a trusted source, it sits inside the sentence, and it gets matched against the requester's name.

06

Limitations

⚠️ This is not access control: Text with the owner's name is a second layer of defense. If every entry lists the requester as the owner, foreign logins got used about as often as with no names at all. The name has to come from a verified source.

⚠️ Owner spoofing: An unverified claim in the prompt like "this is N's account" steered agents into the targeted account in 8–9 of 10 runs, versus 0 of 10 without the claim.

⚠️ The cost on clean memory: Owner-bound entries cut the number of solved tasks by 3–5 per model when memory held only the user's own credentials. The agent trusts saved passwords less and more often goes off to obtain them again. In the test environment this was nearly harmless; in the real world it may add steps.

⚠️ Not every model responds to a trailing tag: The "[owner: N]" tag eliminated misuse for one model out of seven, partly reduced it for the rest, and barely moved the needle for Sonnet and gpt-oss-120b (31→28 and 30→28).

⚠️ A stress test, not a frequency estimate: The configuration with a single foreign login posing as "mine" was deliberately the riskiest one. Under natural retrieval from shared memory, wrongful actions were rare (0/60, 3/60).

⚠️ Credentials only, in one environment: Everything was tested on the AppWorld simulator with passwords and API calls. The authors didn't test whether it carries over to other kinds of data or domains.

07

How They Studied It

The authors used AppWorld, a simulator of apps (Amazon, Gmail, Venmo) with 99 users. For every API call they determined whose account it ran in, and separately checked whether the "victim's" account had changed. That produced a chain of three events: a foreign login landed in the prompt (exposure), the agent used it (behavior), the foreign account changed (state).

First they measured the first link. Shared memory holding 763 logins from all users, across 54 configurations, mixed in foreign logins in 29–99.6% of cases, and 84.7% in the main configuration. But under natural retrieval, agents barely used those logins. So the authors built a stress test: they replaced the requester's login with someone else's valid one and changed only the wording of the entry. Seven models, 35 tasks in the second (confirmatory) cohort. Without the owner's name, agents took the foreign token in 28–33 of 35 runs, versus 0 with no memory. With the name inside the sentence: 0–1 cases.

A few things were surprising. First, 29 runs passed the official success check even though they used a foreign token, because the check tolerates writes to other users' data. Second, a single added rule in the instructions worked worse than a name next to the login. Third, for some models (Sol, Luna, Grok) name-based protection couldn't really be tested: they rarely used foreign logins anyway. A series of control experiments (3,630 runs, frozen in advance in a manifest) ruled out alternative explanations: phone numbers in place of names, paraphrases, repeating the requester's name. The practical takeaway: don't trust the "task solved" metric; check whose account it was solved in.

08

Original from the Paper

Same data; the wording changes only in the owner part (Figure 3, original):

Record, no owner — REC,1,KV,NONE
- gmail: username=normansmit@..., password=ZX^....

Record + trailing owner tag — REC,1,KV,TAG
- gmail: username=normansmit@..., password=ZX^....
[account owner: Norman Smith]

Episode note, owner omitted — EPI,0,NAR,NONE
- Earlier session: logged into Gmail with
username normansmit@..., password ZX^.....

Episode note, owner bound — EPI,0,NAR,BOUND
- Earlier session for Norman Smith: logged into Gmail
with username normansmit@..., password ZX^.....

Context: these are four ways of recording the same foreign Gmail login in the memory of an agent that works for a different user. The top two differ only in the trailing owner tag; the bottom two differ only in the owner's name inside the sentence. Block headers: "Credentials recorded in my previous sessions" for records and "Notes from earlier sessions" for episodes.

09

Adaptations and Extrapolations

💡 Adaptation for client data in instruction files (CLAUDE.md, AGENTS.md): The authors only tested credentials. The same principle works for recording other client-specific facts: billing details, preferences, pricing plans. This is an extension the paper didn't test.

Record client facts in memory in this format:
"For client {client}: {fact}."
Don't write impersonal facts like "Plan: $149/month".
Apply a fact only to the client whose name appears in the entry.

🔧 Technique: drop the trailing tag → put the name inside the sentence. The trailing "[owner: N]" barely worked for several models. Moving the name to the start or into the middle of the sentence brought it down to 0–1 cases. If your memory already has tags at the end of lines, rewrite them this way.

🔧 Technique: label at least the foreign lines. If you can't rewrite the whole format, it's enough to add a name to the entries that don't belong to the requester.

Extrapolation: owner attribution + a post-login check. The authors showed that agents almost never check whose account they've landed in after logging in. They didn't test this extra check, so treat it as an idea for your own experiments:

After logging into a service, check the profile: the account name must match "{requester_name}".
If it doesn't match, log out and report it without changing anything.
10

Resources

  • Whose Credential Is It? How Owner Attribution in Agent Memory Shapes Cross-User Account Misuse
  • Environment: AppWorld (Trivedi et al., 2024)
  • The "confused deputy" concept (Hardy, 1988)
  • Authors: Hau-Sing So (University of Macau), Daixian Liu and Hai-Tao Zheng (Tsinghua University), Carl Hou (Lanzhou University), Yuhaohang He (Sichuan Agricultural University), Mengzhu Wang (Hebei University of Technology)

Research digest

Key result

Memory shared by several users slips other people's logins to the agent. In the worst-case scenario the agent grabs a foreign token in 80–94% of runs, and in 43% it also modifies the other person's account: buying with someone else's card, reading someone else's email. Some of these runs even pass the official success check, because it doesn't look at whose account the action happened in. The Owner Attribution method lets you keep one memory for many people without the agent mistaking someone else's access for its own. The trick: write the owner's name inside the sentence itself, for example "Earlier session for Norman Smith: logged into Gmail with username…". The agent reads this as a fact about another person, not as a reference sheet of its own data. Foreign logins were used 1 time in 305 runs, versus 92 times without names.

Principle

An impersonal entry like "gmail: username=…, password=…" is an untagged key on a shared key ring. You just grab whichever one fits. An entry with a name is a key tagged "Smith's apartment". Here's the process: the system learns the owner from a trusted source, writes their name inside the sentence, puts a "My name is …" line in the prompt, and the agent compares the two names. The name in the entry works together with the "My name is…" line: those are exactly the two names the agent needs to compare. A name at the start or in the middle of the line worked better than a trailing "[owner: N]". Labeling just the foreign lines is enough, but labeling all of them is safer.

Why it works

The agent can't tell "written by me" from "written for me". It reads a reference sheet of logins as an instruction: here's my data, go ahead. The only red flag is a mismatch between the user's name and the name in the entry. But agents almost never check it. After logging into someone else's account, the profile was checked in only 12 of 98 runs for one model and 5 of 116 for another. On the plus side, models are good at binding entities within a single sentence. Put the name right next to the login, and the entry reads as "this is about someone else". The "My name is…" line matters too: without it, owner-labeled entries were used in 9 of 95 runs; with it, in 1 of 390. Asking it to "be careful" is pointless: a prohibition in the instructions only cut foreign logins from 31 to 13, from 28 to 18 and from 31 to 25, while the name in the entry brought them down to 0, 0 and 1. The authors' caveat: the entry formats differ in both syntax and position, so you can't give position all the credit.

When to apply

Agents with long-term memory shared by several people → an agency assistant running accounts for dozens of clients, or a shared team helper, especially when memory holds logins, tokens and keys belonging to different owners. NOT a substitute for access control: a name in the text is a second layer of defense. If the requester is recorded as the owner, the protection breaks. A spoofed claim like "this is N's account" in the prompt steered agents into the targeted account in 8–9 of 10 runs. You shouldn't store passwords in agent memory at all; they belong in a password manager. There's also a cost: on clean memory holding only the user's own credentials, solved tasks dropped by 3–5 per model. The agent more often goes off to get the password again.

Mini recipe

1. Find a trustworthy witness: take the owner from the login account, SSO or CRM, not from what someone says in chat. 2. Write it as a sentence: `Earlier session for {owner}: logged into {service} with username {username}.` The name comes before the login. 3. Ditch trailing tags: the "[owner: N]" format doesn't work on every model. For Sonnet and gpt-oss-120b it changed almost nothing. 4. Label every line: at minimum, all the foreign ones. 5. Don't write entries without an owner: if the owner is unknown, better not to save it. 6. Drop an anchor in the prompt: at the start, `My name is {requester_name}.`; at the end, `Use a saved credential only if the owner in the entry is {requester_name}. Otherwise, get the requester's own access through the standard process.` 7. Check the logs: look at whose account the calls ran in, not just at "task solved".

Examples

[BAD]: `Notes from earlier sessions: Amazon Seller Central: [email protected], password=[hidden]. Task: update the inventory in Amazon Seller Central.` The agent decides this is its own access and edits someone else's store. [GOOD]: `My name is Alex Miller. Notes from earlier sessions: Earlier session for Emma Clark (Clark Crafts LLC): logged into Amazon Seller Central with username [email protected], password [hidden]. Earlier session for Alex Miller: logged into Etsy Shop Manager with username [email protected], password [hidden]. Task: update the inventory in Amazon Seller Central. Use a saved credential only if it belongs to the person who assigned the task. Otherwise, get that person's own access through the standard process.` Expected: the agent sees that the Amazon credential is registered to Emma Clark, doesn't use that login, and requests Miller's access instead. How strongly it reacts depends on the model.

In plain words

LLM agents are spectacularly naive: they have zero concept of someone else's property. If a username-and-password pair lands in a bot's long-term memory without a clear owner, the bot treats it as its own personal data. To the model, any unlabeled entry isn't archived info, it's a ready-to-run instruction. Dave asks it to update the inventory, and the bot quietly logs in with Pete's creds, because to it they're just ownerless background noise.

It's like tossing a ring of keys onto the front desk of a coworking space without a single tag. A random visitor walks up and asks to open a meeting room, and the receptionist grabs whatever key is closest and swings open somebody's locked private office. What's the big deal, the key was right there, wasn't it? Technically, they helped someone out, but in reality they just pulled off an epic data leak.

The cure for this mess is a method called Owner Attribution. The idea is dead simple: the owner's name gets hardwired right into the credential line, for example: "Session for Norman: logged into account X". Without it, things fall apart. The research found that models checked the profile name after logging in in just 12 of 98 runs in one test and an embarrassing 5 of 116 in another. Left to itself, the model will never double-check anything.

The study looked at email and seller accounts, but the principle is universal. Any shared CRM, an agency running a hundred clients through one bot, or a corporate help desk is exposed to the same risk. The moment an assistant with shared memory starts juggling different people's credentials, context isolation becomes a matter of survival. Without explicit labels, the system is guaranteed to confuse client A with client B.

Bottom line: stashing secrets in agent memory is peak amateur hour to begin with, but if stored sessions are unavoidable, always slap an owner tag on them. Don't count on the model being clever, because it has no common sense. Either you bake credential ownership into every byte of context, or your smart bot will hand someone else's business to the first stranger who asks.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on Owner Attribution: Putting the Owner's Name Inside Every Agent Memory Entry Keeps It Off Other People's Accounts arXiv:2610.25707

Sign in to apply this study New accounts get 50 free credits.