Files
openclaw/extensions
Tarun Sukhani 1e4ffdcec8 memory-neo4j: implement mid-session core memory refresh
Add `coreMemory.refreshAtContextPercent` config option to re-inject
core memories when context usage exceeds a threshold. This counters
the "lost in the middle" phenomenon documented by Liu et al. (2023).

Implementation:
- Extend before_agent_start hook event with context usage info
- Pass contextWindowTokens and estimatedUsedTokens to hooks
- Track mid-session refresh per session to prevent over-refreshing
- Clear refresh tracking on compaction
- Add comprehensive tests

Based on research: Liu et al., "Lost in the Middle: How Language
Models Use Long Contexts" (Stanford, 2023)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 17:56:38 +08:00
..
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00
2026-02-16 06:08:47 +01:00