Skip to content

feat(memory): add turn-based distillation trigger alongside idle timeout - #463

Merged
Aaronontheweb merged 2 commits into
devfrom
claude-wt-memory-distill
Mar 27, 2026
Merged

feat(memory): add turn-based distillation trigger alongside idle timeout#463
Aaronontheweb merged 2 commits into
devfrom
claude-wt-memory-distill

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

Closes #442

  • Adds MemoryDistillationTurnInterval tuning property (default 5) to trigger memory distillation every N completed turns, regardless of idle state
  • Busy sessions with long tool loops (e.g., 25-turn scanner iterations) now form memories during active use instead of waiting for 90s of silence
  • The idle timeout (MemoryObserverIdleSeconds) remains as a fallback for partial-turn content
  • Set to 0 to disable turn-based triggering

Test plan

  • All existing observer, distillation, watchdog, and config tests pass (128 tests)
  • Build succeeds with zero warnings
  • Manual: run a multi-turn tool loop session and verify distillation fires mid-session (check logs for session_observer_turn_trigger)
  • Manual: verify idle-timeout distillation still fires when session goes quiet between turn triggers

…out (#442)

The memory observer only triggered distillation on ReceiveTimeout (90s idle).
Busy sessions with long tool loops could run 10+ minutes without forming
memories. Add a configurable turn-based trigger (default every 5 turns) so
memories form during active sessions. The idle timeout remains as a fallback
for partial-turn content.
@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) March 27, 2026 03:54
@Aaronontheweb
Aaronontheweb merged commit 3003f17 into dev Mar 27, 2026
3 checks passed
@Aaronontheweb
Aaronontheweb deleted the claude-wt-memory-distill branch March 27, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(memory): add turn-based distillation trigger alongside idle timeout

1 participant