844f5438fe
The official TS SDK's ndJsonStream hangs indefinitely on prompt() for sessions with 20+ messages (solve-issue planner). Root cause appears to be a stream backpressure issue in the SDK's ReadableStream adapter. Switch back to readline-based line parsing which reliably receives all JSON-RPC responses. Also handle session/request_permission inline (auto-approve, yolo mode equivalent). Ref #398