mirror of
https://github.com/lukaszraczylo/claude-adam.git
synced 2026-06-09 23:19:12 +00:00
3a54d7d3e1
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).