v12.4.4

thedotmack/claude-memv12.4.4Apr 26, 2026by thedotmack

AI Summary

Fixes a 6-month-old bug where pending observations were incorrectly abandoned when users typed /clear or ended sessions. The release removes the SessionEnd hook entirely, allowing pending observations to finish processing naturally instead of being marked abandoned.

Key Highlights

  • Removed SessionEnd → session-complete hook entirely
  • Pending observations now finish processing naturally
  • Only explicit user-initiated session deletion drains the queue
  • Removed from 5 surfaces: Claude Code, Gemini CLI, transcripts processor, OpenCode plugin, OpenClaw

Full Release Notes

## 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.