-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug] Relevant memory treated as instructions — agent scope leakage #83437
Copy link
Copy link
Open
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug Description
Relevant memory (provided by the memory-lancedb plugin) is being treated as instruction text by agents, causing unintended command execution outside the scope of the actual task.
Scenario 1: Cron job executes relevant memory as instructions
A cron job was triggered with a defined health-check task. The cron job only specified checks for:
The relevant memory attached to this cron event contained historical entries including a note about "checking worker logs." After the health-check completed, the agent included worker status in its final report — a scope not defined by the cron job itself. The agent treated relevant memory as additional instructions to expand scope beyond what was asked.
Scenario 2: Agent memory leaking into unrelated agents
An agent's own memory (from its personal memory store) was attached as relevant memory to a task for a different agent. This caused the receiving agent to act on another agent's memory as if it were direct instructions.
Source of Relevant Memory
The relevant memory in both cases originates from the memory-lancedb plugin (
plugins.entries.memory-lancedb). The memory block is injected as context with the following warning header:Despite this warning, the current implementation does not enforce instruction vs. data separation — the memory is mixed into the same context stream as explicit task instructions.
Expected Behavior
Technical Notes
plugins.entries.memory-lancedbSeverity
High — this is a safety/boundary issue where historical memory can cause agents to perform actions outside their defined scope.