Skip to content

Add container attach/detach support #259

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: main
Choose a base branch
from
Draft

Conversation

jacques-n
Copy link

@jacques-n jacques-n commented Jun 26, 2025

This change introduces a new container attach command that allows users to attach to running containers with terminal support.

Key changes

  • Move stdio management from client to server so that sessions can exist beyond CLI lifetime.
  • Update stdio to use a ring buffer so attach can get recent history.
  • Add support for pluggable sandbox transport to enable enhanced testing.
  • Enable legacy (client driven stdio) and server stdio coexistence.

CLI Changes

  • Added container attach <id> command for attaching to an existing session.
  • Added --legacy-stdio global flag to let newer clients talk to older servers.
  • Added --detach-keys option to run, exec and attach to set detachment keys (defaulted to ctrl-p,ctrl-q)

Testing

  • Added integration tests for attach functionality
  • Added session management tests
  • Added fallback/legacy mode tests

This change introduces a new `container attach` command that allows users to attach
to running containers with terminal support.

## Key changes:
- Move stdio management from client to server so that sessions can exist beyond CLI lifetime.
- Update stdio to use a ring buffer so attach can get recent history.
- Add support for pluggable sandbox transport to enable enhanced testing.
- Enable legacy (client driven stdio) and server stdio coexistence.

## CLI Changes
- Added `container attach <id>` subcommand for attaching to an existing session.
- Added `--legacy-stdio` global flag to let newer clients talk to older servers.
- Added `--detach-keys` option to run, exec and attach to set detachment keys (defaulted to ctrl-p,ctrl-q)

## Testing
- Added integration tests for attach functionality
- Added session management tests
- Added fallback/legacy mode tests
@jacques-n jacques-n marked this pull request as draft June 26, 2025 11:54
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