You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Terminal WebSocket auto-reconnect with session resumption #442
When connected through cloud Codev, terminal connections frequently disconnect. Currently the only recovery is a full page reload. The dashboard has no automatic reconnection logic — when the WebSocket closes, it displays [Terminal disconnected] and stops.
Current State
Server-side: Ring buffer (1000 lines), x-session-resume header support, attachResume() method — all ready
Client-side: Zero reconnection logic in Terminal.tsx. Connection drops are treated as permanent.
Desired Behavior
Detect connection loss (already done via ws.onclose)
Show visual indicator (e.g., yellow banner or terminal overlay)
Automatically reconnect with exponential backoff (1s, 2s, 4s, 8s... cap at 30s)
Use x-session-resume header with last known sequence number to resume session
On successful reconnect, replay missed output from ring buffer
If session is gone (e.g., builder terminated), show permanent disconnect message
Activity
waleedkadous commentedon Feb 19, 2026
On it! Working on a fix now.
[Bugfix #442] Fix: Add WebSocket auto-reconnect with session resumption
[Bugfix #442] Test: Add reconnection regression tests
Merge pull request #445 from cluesmith/builder/bugfix-442-terminal-we…