Skip to content

fix: rotate terminal PTY session when shell exits to avoid reconnect loop - #26

Merged
RogutKuba merged 1 commit into
mainfrom
RogutKuba/terminal-cat-cannot-exit
Jul 13, 2026
Merged

fix: rotate terminal PTY session when shell exits to avoid reconnect loop#26
RogutKuba merged 1 commit into
mainfrom
RogutKuba/terminal-cat-cannot-exit

Conversation

@RogutKuba

Copy link
Copy Markdown
Member

The room terminal was pinned to a single hardcoded default PTY session, so when the backing shell exited (e.g. Ctrl-D at the prompt) that session died and the client's auto-reconnect looped forever re-attaching to the dead session. The /terminal route now accepts a client-supplied sessionId, and Terminal.tsx rotates to a fresh session id when the addon reports the shell exited, remounting the effect and spawning a new shell. Normal network blips still resume the same shell since the session id is stable within a mount.

🤖 Generated with Claude Code

…loop

The terminal was pinned to a single hardcoded 'default' PTY session. When
the backing shell exited (e.g. Ctrl-D at the prompt), that session died and
the auto-reconnect looped forever re-attaching to it. The client now sends a
sessionId and rotates to a fresh one on shell exit, spawning a new shell.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
coderscreen-marketing Ready Ready Preview, Comment Jul 13, 2026 3:08am

Request Review

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
coderscreen-api 2795ab7 Jul 13 2026, 03:08 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
coderscreen-web 2795ab7 Jul 13 2026, 03:09 AM

@RogutKuba
RogutKuba merged commit 729667b into main Jul 13, 2026
5 checks passed
@RogutKuba
RogutKuba deleted the RogutKuba/terminal-cat-cannot-exit branch July 13, 2026 03:13
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