Covers the full persistence flow:
- User messages are persisted via ConversationsRepo.addMessage with correct role/content
- Assistant responses are persisted with model, provider, tokens, and toolCalls metadata
- Session resume maps DB messages to ConversationHistoryMessage for context injection
- buildHistoryPromptSection formats history into system prompt (full and summarized paths)
- GET /api/conversations/search returns matching messages via ConversationsController
- End-to-end simulation: create conversation → persist messages → load history on resume
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>