Skip to content

Fix host operator error messages and RPC client WS size limit#33

Merged
DorianZheng merged 1 commit intomainfrom
fix/host-operator-errors-and-ws-limit
Mar 20, 2026
Merged

Fix host operator error messages and RPC client WS size limit#33
DorianZheng merged 1 commit intomainfrom
fix/host-operator-errors-and-ws-limit

Conversation

@DorianZheng
Copy link
Copy Markdown
Collaborator

Summary

  • Swap response.code || response.error to response.error || response.code in invokeHelper so agents see specific errors (e.g. bundle_id_not_running) instead of the generic host_operator_helper_failed
  • Set max_size=None on the Python websockets async client fallback in rpc.py — the default 1 MB limit was rejecting large responses like screenshot base64 payloads

Test plan

  • Run host operator perceive with an invalid bundle ID, verify the error message is bundle_id_not_running not host_operator_helper_failed
  • Run host operator screenshot on a running app, verify the full base64 response is received without WS close 1009

- Prefer helper's error field over generic code so agents see useful
  messages like "bundle_id_not_running" instead of "host_operator_helper_failed"
- Remove 1 MB max_size on the Python websockets client so large responses
  (e.g. screenshot base64) are not rejected by the agent RPC script
@DorianZheng DorianZheng merged commit 509de70 into main Mar 20, 2026
1 check failed
@DorianZheng DorianZheng deleted the fix/host-operator-errors-and-ws-limit branch March 20, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant