3e66c7a5db
Replaced the per-thread findFirst inside Promise.all (N parallel queries) with a single Postgres DISTINCT ON query. A caller with many threads no longer fans out and exhausts the connection pool (the conversation.list 500 under accumulated data). message.spec 16/16 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>