-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
After extended use or a large amount of terminal output, the shellper terminal in the browser becomes unresponsive — it stops updating the display and stops accepting input.
Suspected Root Cause
There may be a buffer limit, memory ceiling, or timeout in the shellper pipeline (shellper process → WebSocket → xterm.js) that causes it to silently stop processing after hitting a threshold. Possible areas:
- Replay buffer size —
shellper-replay-buffer.tsmay have a cap that causes issues when exceeded - WebSocket backpressure — large output may overwhelm the WS connection, causing it to stall
- xterm.js write buffer — the browser-side terminal may stop processing writes after too much data
- PTY buffer limits — the underlying PTY may fill its buffer and block
- Shellper process memory — the shellper child process may accumulate memory until it stops responding
Steps to Reproduce
- Open a builder terminal in the dashboard
- Run commands that produce large output (e.g.,
npm test,npm run build, long AI sessions) - After some time or volume of output, the terminal freezes — no display updates, no input accepted
Expected
Terminal remains responsive regardless of session duration or output volume.
Key Files
packages/codev/src/terminal/shellper-replay-buffer.tspackages/codev/src/terminal/shellper-process.tspackages/codev/src/terminal/shellper-client.tspackages/codev/src/terminal/pty-manager.tspackages/codev/src/terminal/session-manager.tspackages/codev/dashboard/src/components/Terminal.tsxpackages/codev/src/agent-farm/servers/tower-server.ts(WebSocket handler)
Investigation Needed
- Check all buffer sizes, caps, and limits in the shellper pipeline
- Check for any TTL or timeout on shellper sessions
- Check WebSocket flow control / backpressure handling
- Check xterm.js addon configuration (fit, write buffer)
- Add diagnostic logging if needed to identify exactly where the pipeline stalls
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working