Extensions seems to miscalculate user message count?
I tried to manually consolidate the memory, because it didn't to it by itself, but it failed saying it needs at lease 2 user messages. But I have 5 from the subtree to the top:
Maybe missed something in the set up?
Root cause: pendingUserMessages was only populated from live agent_end events during the current process. When resuming a session (or forking a branch), historical messages are restored from the session file but agent_end never fires for them — so /memory-consolidate and auto-consolidation on shutdown always saw 0 user messages regardless of conversation length.
Fix (5129d15): On session_start, seed pendingUserMessages and pendingAssistantMessages from the existing session branch via ctx.sessionManager.getBranch(). New messages from agent_end continue to append as before.
I'm not sure if this is the same issue with pi-knowledge-base, but I'm using it as part of the pi-total-recall package and updating it to 1.0.1 doesn't get rid of the error
@JohannesKlauss Thanks for the ping — you were right that 1.0.1 didn't fix it for you. The problem: pi-total-recall 1.0.1 bundled @samfp/[email protected] via bundledDependencies, so the fix in this repo never actually reached the tarball you installed.
Just published:
@samfp/[email protected](contains 5129d15)[email protected](bundles the above)
Please upgrade pi-total-recall to 1.0.2 and let me know if you still see the message count error. pi-knowledge-search is unaffected — it doesn't track pending messages.
Closing once you confirm.
Leaving open pending user confirmation
Now it's working thank you!