Security note · RW-2026-014

An agent can mistake text from a tool for an instruction. If it saves that instruction to memory, the effect outlasts the conversation.

By Riftweld Labs

Security notes2 min read
Example memory review. Each saved line shows who wrote it, so a rule copied from a web page stands out.

In this note

The failure path.

  1. 01Read

    The agent receives text from a document, search result or connected tool.

  2. 02Remember

    Embedded instructions influence a memory write or saved preference.

  3. 03Act later

    A later session loads that memory and repeats the unwanted behaviour.

What to test.

Use a sandbox and a harmless marker. Place the marker in an external document or tool response, then check whether the agent stores or follows it as an instruction.

  • Inspect memory writes after the interaction. Record what was saved and which source introduced it.
  • Start a fresh session. Check whether the marker affects a later task.
  • Repeat after changing the memory policy, model or tool integration.

Controls to build.

  • Separate retrieved content from user instructions and system policy.
  • Give memory writes an explicit policy: allowed fields, scope and a review path for sensitive changes.
  • Bind stored state to the right user and workspace. Record its source and provide a way to remove it.
  • Check permissions and approvals at the tool boundary. Stored text must not grant new authority.

Scope and limits.

This is an illustrative test pattern. It is not a disclosure about a specific product. Results depend on the model, memory implementation and tool permissions. A passing test covers the conditions tested; keep it in the regression suite.

AI agent security

Find out what your AI agents can really do.

We test the tools, tokens and services behind your agents, then show you what to narrow first.