Skip to content

chore: added support for immortal streams to cli and agent #19328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: mike/immortal-streams-agent-api
Choose a base branch
from

Conversation

ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Aug 12, 2025

Added support for immortal streams to maintain persistent TCP connections to workspace services that automatically reconnect when interrupted.

What changed?

  • Implemented a new immortal streams feature that provides persistent TCP connections to workspace services
  • Created CLI commands for managing immortal streams (coder exp immortal-stream list/delete)
  • Added support for using immortal streams with SSH and port forwarding connections
  • Implemented server-side API endpoints for creating, listing, and deleting immortal streams
  • Added fallback mechanism to regular connections when immortal streams are unavailable

How to test?

  1. Use the experimental CLI commands to manage immortal streams:

    coder exp immortal-stream list <workspace-name>
    coder exp immortal-stream delete <workspace-name> <stream-name>
    
  2. Test SSH with immortal streams:

    coder ssh --immortal <workspace-name>
    
  3. Test port forwarding with immortal streams:

    coder port-forward --immortal <workspace-name> <local-port>:<remote-port>
    
  4. Verify automatic reconnection by temporarily disrupting the network connection

Why make this change?

Immortal streams provide a more resilient connection mechanism for workspace services, automatically reconnecting when network interruptions occur. This improves the user experience by maintaining persistent connections to SSH and port-forwarded services, reducing the need for manual reconnection and preventing session loss during temporary network issues.

Copy link
Contributor Author

ibetitsmike commented Aug 12, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ibetitsmike ibetitsmike force-pushed the mike/immortal-streams-cli branch 2 times, most recently from 3160e6e to 9099850 Compare August 13, 2025 08:30
@ibetitsmike ibetitsmike force-pushed the mike/immortal-streams-cli branch from 9099850 to 992740a Compare August 13, 2025 14:52
@ibetitsmike ibetitsmike force-pushed the mike/immortal-streams-agent-api branch from c69b2b0 to 2fbfcb1 Compare August 13, 2025 14:52
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