mirror of
https://github.com/Heretek-AI/ompweb.git
synced 2026-11-09 18:51:28 -10:00
Protocol-v2 `rpc_chunk` framing is an outbound encoding only. omp parses one JSONL object per stdin line and never runs the chunk decoder, so every command above 1 MiB — any prompt carrying a photo, clipboard screenshot, or similar attachment — was answered `Unknown command: rpc_chunk` under an id it could not correlate. The prompt then sat until the 30s ack timeout killed the child and reported `session_unresponsive`. `encodeRpcCommand` always emits one record, however large, with a 32 MiB bound so a pathological command fails fast with a clear error instead of hanging. Reproduced against a real `omp --mode rpc-ui`: the old framing produced five `Unknown command: rpc_chunk` responses for a 1.2 MB `switch_session`, the new framing is parsed and correlated normally. Co-authored-by: Khaled Ahmed <[email protected]>