v12.4.4

datalab-to/suryav12.4.4Apr 26, 2026by thedotmack

AI Summary

Bug fix that stops draining the observation queue on session end events like /clear, fixing a 6-month-old bug where pending observations were being marked abandoned instead of processed naturally.

Key Highlights

  • Removed SessionEnd hook that was incorrectly draining observation queue
  • Pending observations now finish processing naturally
  • Explicit user-initiated session deletion still drains the queue (correct behavior)
  • Fixes bug present since November 7, 2025 (~6 months)

New Features

  • Removed SessionEnd hook from plugin/hooks/hooks.json
  • Removed POST /api/sessions/complete route
  • Deleted session-complete.ts handler and registry entry
  • Removed calls from transcripts processor and OpenCode plugin

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.