T02 · Agent Memory Poisoning
- Location
scripts/analyze-patterns.py:77- Finding
Untrusted Feedback Can Be Promoted into Persistent Agent Rules
- Content
View full analysis
" in hint: parts = hint.replace("->", "→").split("→", 1) condition = parts[0].strip() action = parts[1].strip() elif ev_type == "positive": condition = f"When doing: {signal}" action = f"Continue doing: {hint}" else: condition = f"When: {signal}" action = f"Instead: {hint}" return { "condition": condition[:200], "action": action[:200], "context": f"Observed {group['count']}x across agents: {sorted(group['agents'])}", } ``` `scripts/analyze-patterns.py:178-225` automatically promotes a repeated pattern into persistent `genes.json` state: ```python def promote_rules(neg_groups, genes_data): """Promote negative patterns that hit threshold and pass delta test.""" promoted = [] stagnated = [] for g in neg_groups: if g["count"] < PROMOTION_THRESHOLD: continue # Check if already promoted existing = next( (r for r in genes_data.get("rules", []) ...[truncated 4165 chars]- Remediation
View remediation
