Move resolveScopedChatManager() before res.flushHeaders() in the POST /messages route so that failures (e.g. project DB cannot be opened) produce a proper HTTP error instead of silently closing the SSE connection. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>