Repository navigation
Description
Goal
Show a generated session title during the first active run, without waiting for the chat run to finish. Title generation uses accepted genuine user text prompts, not assistant output. This is batch 2 and is blocked by #2071 (authoritative mecatui session reload).
Intended behavior
- Start bounded, server-owned title work after the effective principal prompt is accepted at ingress, while the chat run continues. Preserve the configured title slot, source limits, no-tool model call, and independent usage attribution.
- Publish an early
session.titleupdate to gRPC live subscribers with a provisional revision; mecatui displays it. The early event is live-only and is not appended to the durable title-event log before the snapshot is saved. A reconnect/reload discards client-derived title state and accepts the authoritativeGetSessionsnapshot, even if its title revision is lower. Loss or regeneration after an exceptional interruption is acceptable. - After the run settles, conditionally persist title/lifecycle/usage and publish the usual durable event. Operator rename and newer session state win; never overwrite the run's conversation. Define how the final persisted revision is ordered relative to the provisional event on a still-connected client.
- Keep concurrency bounded and avoid blocking chat, a coordinator worker, or a run lock for the duration of the other model call. Test reconnect, interruption, failed save, duplicate calls, deferred titles, and out-of-order events.
Contract review
The current title acceptance plan and ADR 0308 require completed-exchange admission, a durable claim before model I/O, and save-before-publish. Amend or supersede those decisions in this issue's own plan/decision record before implementation; do not silently reinterpret the durable event-log contract. No client-driven generation RPC is intended. HTTP per-run SSE remains out of scope for early delivery.
Dependency
Blocked by #2071; batch 1 must establish full server-authoritative reload before this can land.
Activity