github thedotmack/claude-mem v12.4.4

latest releases: v12.4.7, v12.4.5
9 hours ago

Bug fix: stop draining the observation queue on /clear

When users typed /clear in Claude Code (or logged out, exited, or hit prompt_input_exit), every still-pending observation in the worker queue was being marked abandoned and never processed. The same shim was wired across Claude Code, Gemini CLI, the transcripts processor, OpenCode plugin, and OpenClaw — five surfaces, all draining the queue on what should be benign session-end signals.

This release removes the SessionEnd → session-complete hook entirely. The worker self-completes via its SDK-agent generator's finally-block, so no external completion call is needed. Pending observations now finish processing naturally instead of being abandoned.

Explicit user-initiated session deletion (via the viewer UI's DELETE /api/sessions/:id) still drains the queue — that's the only path that should.

What changed

  • Removed SessionEnd hook block from plugin/hooks/hooks.json
  • Removed POST /api/sessions/complete route + Zod schema in SessionRoutes.ts
  • Deleted src/cli/handlers/session-complete.ts and its registry entry
  • Removed the call from src/services/transcripts/processor.ts
  • Removed the call from the OpenCode plugin's session.deleted handler
  • Removed the Gemini CLI installer's SessionEnd → session-complete mapping
  • Removed scheduleSessionComplete, pendingCompletionTimers, and completionDelayMs from OpenClaw

Background

This bug had been quietly draining queues since November 7, 2025 (~6 months). The wiring crept in as a "cleanup hook stops the spinner" side effect (#4416), got rationalized as canonical architecture (#6682, #14793), and survived multiple refactors that preserved it instead of questioning it. Full timeline in PR #2136.

Don't miss a new claude-mem release

NewReleases is sending notifications on new releases.