refactor(claude-isolated-test): Docker improvements and tmux enhancements - #235
Merged
Conversation
…h_container_claude Rename function from attach_container_tmux to attach_container_claude to better reflect its purpose of attaching to a Claude Code session via tmux. Add clarifying comment about tmux session behavior. The function uses tmux with -A flag to attach to existing "claude" session or create a new one if it doesn't exist. Co-Authored-By: Claude <noreply@anthropic.com>
…ckerfile - Add TMUX_TMPDIR=/tmux environment variable - Create /tmux directory with claude:claude ownership - Enables tmux socket persistence via volume mount This works together with the volume mount in shell.sh to ensure tmux sockets persist across container restarts. Co-Authored-By: Claude <noreply@anthropic.com>
Add tmux socket persistence volume mount and environment variable:
- Volume: ${container_name}-tmux:/tmux for socket persistence
- Environment: TMUX_TMPDIR=/tmux to configure socket location
This works with Task 8 (Dockerfile TMUX_TMPDIR addition) to enable
proper tmux socket management in the Docker container.
Co-Authored-By: Claude <noreply@anthropic.com>
Add -l|--list-sessions option that lists all active tmux sessions in the container without attaching. This allows users to see what sessions are available before deciding which one to attach to. Implementation: - Add list_sessions() function that runs tmux list-sessions - Handle case where no sessions exist with friendly error message - Exit after listing (don't attach to container) Co-Authored-By: Claude <noreply@anthropic.com>
Add -S|--session-name NAME option that allows connecting to a specific tmux session by name instead of always using the default "claude" session. Changes: - Add SESSION_NAME variable with default value "claude" - Add -S|--session-name option to argument parser - Modify attach_container_claude to accept session name as second parameter - Update usage help text to document the new option Co-Authored-By: Claude <noreply@anthropic.com>
Add support for ANTHROPIC_API_KEY as primary authentication method. New authentication priority order: 1. ANTHROPIC_API_KEY (standard API key) 2. CLAUDE_CODE_OAUTH_TOKEN (OAuth) 3. ANTHROPIC_AUTH_TOKEN (OAuth alternative) 4. Keychain (fallback) When using ANTHROPIC_API_KEY, the token is passed to the container as ANTHROPIC_API_KEY environment variable instead of CLAUDE_CODE_OAUTH_TOKEN. Co-Authored-By: Claude <noreply@anthropic.com>
…atures Add documentation for: - tmux integration behavior and session persistence - New options: --list-sessions, --session-name, --kill-session - Authentication methods and priority (ANTHROPIC_API_KEY, OAuth, Keychain) - Volume mounts for tmux socket persistence (/tmux) - Usage examples for multi-session workflows Co-Authored-By: Claude <noreply@anthropic.com>
Rename claude-isolated-test skill to isolated-test-guide for better naming clarity. Co-Authored-By: Claude <noreply@anthropic.com>
baleen37
enabled auto-merge
January 31, 2026 05:28
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR enhances the isolated test skill with tmux session management capabilities, expanded documentation, and refactored authentication handling supporting multiple token sources (OAuth, API key, Keychain) within a Docker container environment. Changes
Sequence DiagramsequenceDiagram
participant User
participant CLI as shell.sh
participant Auth as Auth Handler
participant Docker as Docker Container
participant Tmux as Tmux Session
User->>CLI: Call with token/flags
CLI->>Auth: Determine token source (OAuth/API-Key/Keychain)
Auth->>Auth: Resolve auth token & type
Auth-->>CLI: Return token + auth_type
CLI->>Docker: Create container with auth_type + tmux dir
Docker->>Docker: Mount tmux socket directory
Docker->>Tmux: Initialize tmux session
CLI->>Tmux: Attach/Create session with name
Tmux-->>User: Interactive session established
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.