Files
SuperCharged-Claude-Code-Up…/public
uroma f57b01c82b fix: wait for WebSocket connection before sending command
Make connectTerminal() return a Promise that resolves when the
WebSocket connection is established, ensuring commands are sent
only after the terminal is ready.

Root cause:
- connectTerminal() created WebSocket but returned immediately
- 500ms delay wasn't reliable - WebSocket might not be open yet
- Command was sent before connection was ready, causing it to fail silently

Fix:
- Wrap WebSocket creation in Promise
- Resolve Promise in ws.onopen callback
- Reject on ws.onerror
- Remove unnecessary 500ms delay

Now when "Claude Code CLI" terminal type is selected:
1. WebSocket connection is established
2. We wait for connection to be ready
3. Command is sent immediately
4. claude --dangerously-skip-permissions launches reliably

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
f57b01c82b · 2026-01-19 18:38:14 +00:00
History
..