Mohamed Boudra 219411d3ee Add E2E test for long-running Claude agent streaming integrity
Investigated server-side streaming for Claude agents to determine if
chunks are being lost during transmission. Created a new E2E test that:

1. Creates a Claude agent with bypassPermissions mode
2. Sends 3 back-and-forth messages to simulate long-running agent
3. On the 3rd message, captures all streaming chunks
4. Verifies chunks are complete, coherent, and contain expected content
5. Checks for UTF-8 corruption and abnormal word concatenation

RESULT: Test passes. Server correctly forwards all text_delta chunks
from Claude SDK. No chunks are dropped or corrupted.

CONCLUSION: The original bug report (REPORT-garbled-text-bug.md) observed
missing chunks at the client level, but server-side code is NOT the cause.
The issue must be elsewhere (possibly React Native WebSocket differences
or a transient network issue).

Files:
- packages/server/src/server/daemon.e2e.test.ts:1883-2028 - New test

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 20:17:45 +07:00
2025-12-25 11:31:56 +07:00
Description
Languages
TypeScript 98.1%
JavaScript 1.3%
Shell 0.1%
Swift 0.1%