You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: Fixed #2327: memmy-agent second-message "session not found" error.
Root cause: apps/memos-local-plugin/core/pipeline/memory-core.ts::closeSession threw MemosError("session_not_found") when the session was no longer in the orchestrator's in-memory live map. After the first message, the adapter's on_session_end hook calls session.close which evicts the session from the live map. Any subsequent duplicate close (lifecycle race, adapter retry, memmy-agent bridge re-firing) hit the null branch and threw, surfacing to the user on the second message.
Fix: Made closeSession idempotent — unknown session ids are a silent no-op with a debug log, matching the existing semantics of closeEpisode/discardEmptyEpisode. Added 4 regression tests in tests/unit/pipeline/regression-2327-second-message.test.ts. All 176 session + pipeline unit tests pass.
Activity
Memtensor-AI commentedon Sep 2, 2026
🤖 AutoDev has picked up this issue and started working on it.
Task ID:
1d452ba963e2f9cbWorking branch:
bugfix/autodev-2327-20260902070028337Target branch:
latest dev* branchWorkflow: opsp (analysis → coding → testing → PR)
I will post the PR link here once done. If I need more information, I will ask in the comments.
fix(plugin): make closeSession idempotent to fix second-message sessi…
Memtensor-AI commentedon Sep 2, 2026
✅ AutoDev task
1d452ba963e2f9cbcompleted.Summary: Fixed #2327: memmy-agent second-message "session not found" error.
Root cause:
apps/memos-local-plugin/core/pipeline/memory-core.ts::closeSessionthrewMemosError("session_not_found")when the session was no longer in the orchestrator's in-memory live map. After the first message, the adapter's on_session_end hook calls session.close which evicts the session from the live map. Any subsequent duplicate close (lifecycle race, adapter retry, memmy-agent bridge re-firing) hit the null branch and threw, surfacing to the user on the second message.Fix: Made closeSession idempotent — unknown session ids are a silent no-op with a debug log, matching the existing semantics of closeEpisode/discardEmptyEpisode. Added 4 regression tests in tests/unit/pipeline/regression-2327-second-message.test.ts. All 176 session + pipeline unit tests pass.
Changed files: core/pipeline/memory-core.ts (fix), core/pipeline/README.md + ALGORITHMS.md (doc update), tests/unit/pipeline/regression-2327-second-message.test.ts (new regression tests).
Base branch:
mainBranch:
bugfix/autodev-2327-20260902070028337Commit:
3cb77e5PR: #2328
Assigned to: @whipser030
Reviewers: @whipser030, @hijzy
github-actions commentedon Oct 4, 2026
This issue has been automatically marked as stale due to inactivity.
github-actions commentedon Oct 15, 2026
This issue has been automatically closed due to inactivity.