You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
write_user_memory accepts a finished run's id, so an agent key names another person's seat run and writes that person's notes #4121
POST /api/agents/{name}/user-memory (routers/public_memory.py::write_user_memory, the MEM-001 write door behind MCP write_user_memory) resolves whose memory it writes from body.execution_id through memory_subject.resolve, after checking only that the row exists and belongs to this agent. Nothing checks that the run is live, or that it is the turn the request comes from.
So an agent's own key, during any turn, can name a finished run of another person (a seat run, a one-to-one channel turn, a signed-in public turn) and replace that person's notes. ent#840 closed the sibling-key version; the agent's own key, driven by whoever it is shared with, still has it.
Found
By the merge-train's independent review of trinity#4114 (2026-10-31), whose agent search door had the same shape; the search door is being fixed on that PR (the named run must be running, and no other live turn on the agent may resolve to a different scope — the ent#926 ledger rule, fail-closed). This door is on dev already and predates that PR.
Fix
Same rule as the search door: execution.status == running, and refuse (memory_turn_ambiguous) when another live turn on the agent resolves to a different scope. Add the handler's reason to test_ent875_exec_control_routes.READ_SITES only once the read is bound. Test over real HTTP with a real agent key, not by calling the handler.
Activity
webmixgamer commentedon Nov 1, 2026
/claim
github-actions commentedon Nov 1, 2026
Claimed by @webmixgamer. Label
status-in-progressadded.Next steps:
feature/4121-<short-slug>Fixes #4121fix(memory): restore the shared-memory warning and correct the write …
test(memory): the system key meets the self-gate first on another age…
fix(memory): the write door serves the turn the agent is in, and only…
fix(auth): seat decisions and voice reply serve the turn the agent is…