Automatic title generation captured the chat title when it was
scheduled, ran the model call, then wrote the generated title with an
unconditional UPDATE. A rename that landed while the model call ran
was silently overwritten.
Add UpdateChatTitleByIDIfTitle, a compare-and-set variant that only
writes when the stored title still equals the title generation started
from. When it matches no rows, generation keeps the current title and
skips recording and publishing the generated one.
---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_