Files
box/bin
operator-main 8d4bfa7053 Fix transient NO_SWITCHER / CDP race in box-chat-cdp.py
Three fixes for flaky main-chat reads (pip/opm):
1. ENSURE: retry chat-switcher lookup 4x with 2s waits instead of
   immediate NO_SWITCHER (React may still be rendering).
2. ev(): drain CDP events until matching command id arrives;
   previously the first recv() could grab a browser event instead
   of our evaluate response, returning None.
3. main(): reconnect fresh websocket on each retry (3 attempts);
   reusing a stale ws after page navigation gave dead JS contexts.

Verified: 7/8 reads succeed across all 4 agents; the 1 failure
was THREAD_NOT_FOUND while opm was actively in a side chat,
self-healed on next attempt.

Session: sidechat/chromebox-ops
2026-10-04 19:02:17 +00:00
..