Skip to content

[codex] Fix web control-plane connection starvation#156

Merged
roackb2 merged 1 commit into
mainfrom
codex/web-submit-timeout-recovery
Jun 2, 2026
Merged

[codex] Fix web control-plane connection starvation#156
roackb2 merged 1 commit into
mainfrom
codex/web-submit-timeout-recovery

Conversation

@roackb2
Copy link
Copy Markdown
Owner

@roackb2 roackb2 commented Jun 2, 2026

Summary

  • Reduce web-v2 session-page EventSource usage to avoid Chrome per-origin connection starvation across multiple Heddle tabs.
  • Keep the selected conversation stream live, but replace sidebar session-list streaming with short query refreshes.
  • Gate heartbeat event streaming to the Tasks surface and add shared tRPC request timeouts so stalled request/response calls recover.

Root cause

Each Heddle web tab opened several long-lived control-plane streams: selected session events, session-list events, and heartbeat events. With multiple Heddle tabs open, Chrome exhausted the HTTP connection slots for localhost:8765. New tabs or first-load queries then stayed pending until another Heddle tab closed and released a connection.

Behavior change

  • Opening another Heddle web tab should load immediately instead of waiting for an existing Heddle tab to close.
  • Session pages still stream conversation updates in real time through controlPlane.sessionEvents.
  • Sidebar sessions refresh through normal short requests instead of a permanent stream.
  • Heartbeat streams are only active while viewing Tasks.
  • Hung request/response calls now abort after 30 seconds instead of leaving the composer stuck indefinitely.

Verification

  • yarn typecheck
  • yarn lint
  • yarn client:build:v2
  • yarn test:browser-integration:v2

@roackb2 roackb2 marked this pull request as ready for review June 2, 2026 11:47
@roackb2 roackb2 merged commit 21fa43f into main Jun 2, 2026
5 checks passed
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