Proposed and approved through ADAM's own /reflect harness_edit loop (MOSS §1):
the analyst surfaced 23 tool_error_loop entries across 4 sessions whose context
windows were really redundant re-reads of one file.
retry_loop keys on argsHash of the full tool_input (including offset/limit), so
consecutive Reads of the SAME file at different offsets escaped dedup and leaked
into tool_error_loop fingerprints. The new file_reread signal catches them:
same file Read >=3x in the 10-event window, offset-agnostic (keyed on file
path), guarded by `sameToolArgs < RETRY_THRESHOLD` so byte-identical reads stay
with retry_loop (no double-count).
Fully wired end-to-end (not a half-dead signal):
- adam-observe.mjs: detection + STRUGGLE_TYPES membership (so it carries
context_window + active_skills like other struggle signals).
- adam-window.mjs: 14-day sliding window (task-local, like retry_loop).
- adam-score.mjs: severity divisor 3.
- adam-batch.mjs: file-basename clustering.
- agents/adam.md + README: signal tables, clustering rules, rubric, windows.
Tests: 126 -> 132 (file_reread fires on 3x offset-shifted reads, not on 2x;
byte-identical reads route to retry_loop not file_reread; carries context_window).
- New signal types in hooks/adam-observe.mjs:
- silent_drift: 5 consecutive read-only PostToolUse without an action tool
- error_after_recovery: same error fingerprint returns within 5 events of clean_recovery
- Severity-weighted scoring in adam/scripts/adam-score.mjs:
- SEVERITY_DIVISORS exported per struggle signal type
- Per-session severity_sum + severity_by_type added to JSON output
- Skill-attribution clustering in agents/adam.md:
- Sub-cluster struggle signals on active_skills[0]
- New struggle-driven skill_edit variant (always queues, never auto-applies)
- Rubric updates:
- +1 for cluster severity-sum >= 10, additional +1 for >= 32
- +1 for skill-attributed sub-cluster naming an existing skill
- silent_drift + error_after_recovery added to struggle signal list
- Window: silent_drift 14d, error_after_recovery 30d
- Tests: 94 passing (78-82 new)
Backward compat: entries without count default to severity 1. Existing
win-driven skill_edit gate untouched. No journal migration.