feat(hooks): make session-memory message count configurable#2732
feat(hooks): make session-memory message count configurable#2732obviyus merged 4 commits intoopenclaw:mainfrom
Conversation
9595e34 to
4914556
Compare
CI Failures - Upstream IssueThe CI failures are not related to this PR's changes. They're caused by a lockfile mismatch on This was introduced by commit To fix: Someone with write access needs to run Happy to rebase once that's fixed! 🦞 |
…#2681) Adds `messages` config option to session-memory hook (default: 15). Fixes filter order bug - now filters user/assistant messages first, then slices to get exactly N messages. Previously sliced first which could result in fewer messages when non-message entries were present. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4914556 to
e9590eb
Compare
|
This PR includes a fix for Windows path handling in The previous approach ( CI Status: The Windows test failure is pre-existing and unrelated to this change — it's in |
|
Thanks for merging @obviyus ! |
Summary
Fixes #2681
Adds
messagesconfig option to session-memory hook (default: 15).Changes
messagesconfig option, fixed filter order bug (now filters user/assistant messages FIRST, then slices)Testing
Config Example
{ "hooks": { "internal": { "entries": { "session-memory": { "enabled": true, "messages": 100 } } } } }AI-assisted: Built with Claude Code (Opus 4.5). Fully tested locally.