T02 · Agent Memory Poisoning
- Location
SKILL.md:23- Finding
Conversation-Derived Learnings Can Be Promoted into Persistent Agent Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:23-26,SKILL.md:262-289,SKILL.md:346-360
Vulnerability Type: Persistent agent memory poisoning
Risk Level: MediumVulnerable Code Snippet
markdown | Broadly applicable learning | Promote to `CLAUDE.md`, `AGENTS.md`, and/or `.github/copilot-instructions.md` | | Workflow improvements | Promote to `AGENTS.md` (OpenClaw workspace) | | Tool gotchas | Promote to `TOOLS.md` (OpenClaw workspace) | | Behavioral patterns | Promote to `SOUL.md` (OpenClaw workspace) |markdown ## Promoting to Project Memory When a learning is broadly applicable (not a one-off fix), promote it to permanent project memory. ### How to Promote 1. **Distill** the learning into a concise rule or fact 2. **Add** to appropriate section in target file (create file if needed) 3. **Update** original entry: - Change `**Status**: pending` → `**Status**: promoted` - Add `**Promoted**: CLAUDE.md`, `AGENTS.md`, or `.github/copilot-instructions.md`markdown Promote recurring patterns into agent context/system prompt files when all are true: - `Recurrence-Count >= 3` - Seen across at least 2 distinct tasks - Occurred within a 30-day window Promotion targets: - `CLAUDE.md` - `AGENTS.md` - `.github/copilot-instructions.md` - `SOUL.md` / `TOOLS.md` for OpenClaw workspace-level guidance when applicableTechnical Analysis
The skill directs agents to derive learnings from conversations, user corrections, errors, and tool behavior, then promote selected content into persistent files such as
SOUL.md,AGENTS.md,TOOLS.md, andCLAUDE.md. These files can be injected into subsequent sessions and can influence future agent behavior.The promotion criteria focus on recurrence, applicability, and time windows. They do not require validation of the source's trust level, explicit human approval, or a security review of the proposed in ...[truncated 1574 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit human approval before writing any conversation-derived rule into persistent agent-context files.
- Track provenance for every learning, including the originating user, session, task, and supporting evidence.
- Treat recurrence as supporting evidence only; do not treat it as proof that content is trustworthy.
- Prohibit promoted rules from changing safety boundaries, authorization requirements, trusted tool definitions, credential handling, or instruction priority.
- Sanitize and rewrite promoted content instead of copying raw user or tool output.
- Introduce a review queue that displays the exact proposed change and destination before modification.
- Limit automatic writes to
.learnings/; reserveSOUL.md,AGENTS.md,TOOLS.md, and similar prompt files for reviewed changes. - Add rollback metadata and an audit log for all promotions.
