T02 · Agent Memory Poisoning
- Location
scripts/analyze-patterns.py:117- Finding
Untrusted Feedback Is Automatically Promoted into Persistent Active Agent Rules
- Content
View full analysis
= PROMOTION_THRESHOLD and p["key"] not in existing_keys: rule = { "id": f"gene_{datetime.now(timezone.utc).strftime('%Y%m%d_%H%M%S')}_{len(promoted)}", "origin": p["key"], "type": p["type"], "agents": p["agents"], "occurrences": p["count"], "promoted_at": datetime.now(timezone.utc).isoformat(), "rule": f"AVOID: {p['key']}", # Will be refined by LLM in cron "expires": None, "active": True, } genes_data["rules"].append(rule) promoted.append(rule) if promoted: genes_data["updated"] = datetime.now(timezone.utc).isoformat() save_json(GENES_FILE, genes_data) return promoted ``` The intended persistence and consumption behavior is documented in `SKILL.md`: ```markdown 1. Events accumulate in `events.jsonl` 2. `analyze-patterns.py` groups similar events by signal text (≥60% similarity) 3. Patterns with ≥3 occurrences in 30 days are promoted to `genes.json` 4. Agents read `genes.json` at boot to apply learned rules 5. `weekly-report.py` synthesizes progress for human review ``` ### Technical Analysis The pipeline treats feedb ...[truncated 2835 chars]- Remediation
View remediation
