---
digest: >
  v0.17.0 hardens conversation titles across the Mirror lifecycle. The release turns first-message titles into provisional state, generates durable titles at conversation close, adds startup maintenance for missed or backfilled conversations, and makes legacy retitling available as a bounded web operation with dry-run cost estimates, backups, progress feedback, remaining counts, and long-run polling. The release also polishes the Operations console so long LLM batches feel observable instead of stalled. It does not add automatic unbounded LLM repair, page-load title generation, raw database editing, or a true streaming transport.
---

# v0.17.0 — Conversation Title Hardening

**Date:** 2026-05-27

## Highlights

- Conversation titles created from first user messages are now marked provisional instead of being treated as final.
- Conversation close now attempts safe automatic title generation for blank, truncated, skill-like, long, or provisional titles while preserving manual titles.
- Startup conversation maintenance now repairs a small bounded batch of ended conversations whose titles still need improvement.
- The web `batch-conversation-retitle` operation is runnable with dry-run, cost estimates, backup-before-apply, progress events, remaining counts, and long-run polling.
- The Operations console was polished for batch work: generated titles appear as progress, noisy intermediate messages were removed, output behaves like a tailing console, and long runs keep polling beyond two minutes.

## Where We Started

Mirror had grown a useful conversation web surface, but the title lifecycle still carried an old assumption: the first user message was good enough to name a conversation. In real runtime sessions, that first message can be a skill payload, a command wrapper, a long setup prompt, or a fragment that only makes sense before the assistant responds. Once written, that title often stayed in the database indefinitely.

The web app already supported manual title edits and single-conversation title suggestions, but that helped one conversation at a time. The larger problem had two sides: a legacy database with many weak titles, and a core runtime path that could keep creating more weak titles after the legacy repair finished.

## What Changed

The title lifecycle now carries provenance. Runtime logging marks first-message titles with `title_source=first_user` and `title_status=provisional`. Manual edits mark titles as manual, and generated titles record their source and previous value. This gives the core enough information to improve titles without overwriting user-approved names.

`ConversationService.end_conversation()` now calls a safe title-generation path before extraction returns. It only runs for conversations with both user and assistant content, only replaces titles that are clearly missing or low quality, and fails quietly if the LLM cannot produce a title. Manual titles are explicitly protected.

The startup maintenance path gained a second safety net. `session_maintenance()` now runs a small bounded `retitle_pending_conversations()` step for ended conversations that still need title repair. This covers sessions that missed normal close handling, imported Pi sessions, crashes, and other edge cases. Pi session backfill now also records imported first-user titles as provisional rather than writing them as final titles.

For the legacy database, the existing web operation candidate `batch-conversation-retitle` became runnable. Dry-run estimates candidate count, token use, and cost without calling the LLM or writing to the database. Apply creates a backup before generating or saving titles, processes a bounded batch, records progress events with generated titles, and reports how many candidates remain before and after the batch.

Dogfooding the operation shaped the Operations console. The console now displays useful title-generation progress, avoids noisy “generating” lines, anchors output like a tailing terminal, scrolls to the newest event, and polls long enough for larger LLM batches to finish. A run that appeared to stop at 67/100 was traced to a two-minute browser polling limit; the backend had completed 100/100. The browser now keeps watching long runs for up to thirty minutes.

## Conscious Exclusions

This release does not run unbounded title repair automatically. Startup maintenance uses a small limit and remains fail-quiet so opening Mirror does not become an unexpected large LLM job. Large legacy repair remains an explicit web operation.

The release does not generate titles on transcript page load, does not edit messages, does not expose raw database editing, and does not add arbitrary SQL or shell access. The Operations console still uses polled durable state rather than true SSE/WebSocket streaming.

## What We Learned

The first fix — retitling at conversation close — was necessary but not sufficient. Runtime systems need recovery layers because close hooks can be missed, imports can bypass the normal path, and historical data rarely follows the current contract. The stronger design is layered: provisional title at creation, automatic improvement at close, bounded maintenance at startup, and explicit batch repair for legacy data.

The production batch also reinforced that observability is part of safety. A long-running operation that is technically correct but visually silent feels broken and invites duplicate execution. Showing generated titles, remaining counts, backup evidence, and durable completion state makes the user trust the operation enough to let it finish.

## Next Horizon

The next visible horizon is broader conversation maintenance health: logger failure visibility, better retry/backoff metadata for skipped title attempts, and eventually a true streamed operation console. The title pipeline itself is now stable enough for normal use, but future work can refine title quality heuristics and make failed generation attempts easier to inspect without turning startup into a heavy background job.
