I've captured the logs showing the exact error sequence. The failure happens at the /api/v2/sessions/[session-id]/streamMessage endpoint which returns a 500 error. The v1 endpoints like /continuChat are working fine. The request to the failing endpoint has a content-length of 2 bytes, which seems unusually small. Could this be related to how the streaming request is being formatted?
The ENCRYPTION_SECRET values in docker-compose.yml were different between builder and viewer services. Matching these values and restarting the services resolved the error.
This was caused by AES cipher failures due to encryption key mismatch, preventing proper data encryption/decryption between services.