-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Auto-exit isolation environments by default with --keep-alive option #35
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
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #34
Add new --keep-alive (-k) flag to control isolation environment lifecycle. By default, isolation environments (screen, tmux, docker) exit automatically after the command completes. With --keep-alive, they stay alive for debugging or interactive workflows. Fixes #34 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
All isolation backends (screen, tmux, docker) now automatically exit after command completion by default. This ensures: - Resources are freed immediately - No orphaned sessions/containers remain - Uniform behavior across all backends With --keep-alive option, the isolation environment stays alive after the command completes, useful for debugging or interactive workflows. Fixes #34 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add --keep-alive option to CLI help text and pass the keepAlive option to the isolation runners. Fixes #34 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add comprehensive tests for the new --keep-alive functionality: - args-parser tests for flag parsing and validation - isolation tests for message output verification Fixes #34 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Update REQUIREMENTS.md: - Add --keep-alive option to isolation options section - Add new section 6.5 for auto-exit behavior documentation Add ARCHITECTURE.md: - Document overall system architecture - Describe isolation module design - Explain auto-exit and keep-alive behavior - Include file structure and design decisions Fixes #34 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
New features in this release: - Add --keep-alive option for isolation environments - Ensure uniform auto-exit behavior across all isolation backends - Add ARCHITECTURE.md documentation Fixes #34 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add isDockerRunning() helper to properly check if docker daemon is running - Fix CLAUDE.md missing newline at end of file 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
We should use |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-24T23:20:17.891Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
…r-container option This commit implements the requirements from PR feedback: ## Resource Cleanup Verification Tests - Add comprehensive tests using `screen -ls`, `tmux ls`, and `docker ps -a` to verify that isolation environments release resources after command execution - Verify that screen and tmux sessions auto-exit and disappear from session lists - Verify that Docker containers exit and stop (but preserve filesystem by default) - Add tests for --keep-alive behavior to ensure sessions stay alive when requested ## --auto-remove-docker-container Option - Add new CLI option to automatically remove Docker containers after exit - Disabled by default to preserve container filesystem for re-entry and file retrieval - When enabled, uses Docker's `--rm` flag to remove container after exit - Independent of --keep-alive flag - Only valid with `--isolated docker` ## Documentation Updates - Update REQUIREMENTS.md with new option and Docker filesystem preservation behavior - Explain default behavior (filesystem preserved) vs. auto-remove behavior - Update CLI help text with new option ## Tests - Add new test file `test/docker-autoremove.test.js` for auto-remove functionality - Add resource cleanup verification tests in `test/isolation.test.js` - All tests properly skip when backends are not available 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-25T00:16:38.431Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
|
Checks should pass, also README.md must be updated. |
Split test/isolation.test.js (1027 lines) into two files: - test/isolation.test.js (658 lines) - core isolation tests - test/isolation-cleanup.test.js (377 lines) - resource cleanup tests This change addresses the CI lint failure where the file size check requires JavaScript files to be under 1000 lines. All tests continue to pass and functionality remains unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Double check all our requirements are met, changes in the repository are as best as they can, and also that we really do test all and every possible test cases. |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-25T09:13:06.121Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Update README.md with: - Add --keep-alive and --auto-remove-docker-container to Isolation Options table - Add new "Auto-Exit Behavior" section explaining default behavior - Include usage examples for keep-alive option Also add tests for --auto-remove-docker-container option parsing in args-parser.test.js. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
This PR implements the requirements from issue #34:
Auto-exit by default: All isolation environments (screen, tmux, docker) now automatically exit after the target command completes execution. This ensures resources are freed immediately and provides uniform behavior across all backends.
New --keep-alive option: Added a new
--keep-alive(-k) flag that keeps the isolation environment running after command completion. This is useful for debugging or interactive workflows.Documentation:
Changes
New Features
--keep-alive(-k) option to CLIDocumentation
Tests
--keep-aliveoption parsingTest Plan
Usage Examples
Fixes #34
🤖 Generated with Claude Code