Files
Khaled AhmedandKhaled Ahmed b4c29e26b9 fix(rpc): write commands to omp's stdin as single unchunked lines (#105) (#107)
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]>
2026-09-15 23:44:14 +03:00
..
2026-08-10 16:19:20 +03:00