ECC/skills/continuous-learning-v2
Affaan Mustafa f9e8287346
fix: observer memory explosion with throttling, re-entrancy guard, and tail sampling (#536)
Three fixes for the positive feedback loop causing runaway memory usage:

1. SIGUSR1 throttling in observe.sh: Signal observer only every 20
   observations (configurable via ECC_OBSERVER_SIGNAL_EVERY_N) instead
   of on every tool call. Uses a counter file to track invocations.

2. Re-entrancy guard in observer-loop.sh on_usr1(): ANALYZING flag
   prevents parallel Claude analysis processes from spawning when
   signals arrive while analysis is already running.

3. Cooldown + tail-based sampling in observer-loop.sh:
   - 60s cooldown between analyses (ECC_OBSERVER_ANALYSIS_COOLDOWN)
   - Only last 500 lines sent to LLM (ECC_OBSERVER_MAX_ANALYSIS_LINES)
     instead of the entire observations file

Closes #521
2026-03-16 13:47:25 -07:00
..
agents fix: observer memory explosion with throttling, re-entrancy guard, and tail sampling (#536) 2026-03-16 13:47:25 -07:00
hooks fix: observer memory explosion with throttling, re-entrancy guard, and tail sampling (#536) 2026-03-16 13:47:25 -07:00
scripts fix: harden observer prompt guard handling 2026-03-12 23:59:01 -07:00
config.json feat: project-scoped instinct isolation 2026-03-01 12:07:13 -08:00
SKILL.md fix: repair opencode config and project metadata 2026-03-11 01:52:10 -07:00