[BUG] Pixi Shell Command Timeout Issue
Bug Report: Pixi Shell Command Timeout Issue
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.64 (Claude Code)
- Operating System: Linux 6.14.0-27-generic (Ubuntu-based)
- Terminal: bash
Bug Description
The pixi shell -e runtime command times out after 2 minutes when executed through Claude Code's Bash tool, preventing users from entering pixi virtual environments interactively. This appears to be a limitation with how Claude Code handles interactive shell sessions that don't automatically exit.
Steps to Reproduce
- Open Claude Code in a project that uses pixi for dependency management
- Request Claude to run
pixi shell -e runtime(or any pixi shell command) - Claude executes the command using the Bash tool
- Wait for 2 minutes
Expected Behavior
The command should either:
- Successfully enter the pixi shell environment and allow further commands
- Provide a graceful way to handle interactive shell sessions
- Offer guidance on alternative approaches for pixi environment usage
Actual Behavior
Command timed out after 2m 0.0s
The command fails with a timeout error, making it impossible to use pixi shell environments interactively through Claude Code.
Additional Context
Pixi Shell Background
pixi shellis designed to start an interactive shell session within a pixi-managed virtual environment- The command doesn't exit automatically - it waits for user input/interaction
- This is standard behavior for environment activation commands (similar to
conda activate)
Workaround Available
Claude correctly suggests alternative approaches:
pixi run -e runtime <command>for running specific commandspixi list -e runtimefor checking environment contents- Manual execution in user's terminal
Impact
- Severity: Medium - Workarounds exist but user experience is impacted
- Frequency: Likely affects all users trying to use pixi shell environments
- Scope: Affects any interactive command that doesn't auto-exit
Suggested Solutions
Option 1: Interactive Shell Handling
Implement support for interactive shell sessions with:
- User confirmation before starting long-running/interactive commands
- Ability to send additional commands to active shell sessions
- Graceful handling of shell environment activation
Option 2: Enhanced Guidance
Improve Claude's response when detecting interactive shell commands:
- Proactively suggest
pixi runalternatives - Provide specific examples for the user's context
- Explain pixi environment usage patterns
Option 3: Timeout Configuration
Allow users to configure timeout behavior for interactive commands:
- Shorter timeouts with better error messages
- Option to disable timeouts for specific command patterns
- Clear indication when commands are running interactively
Environment Details
Working directory: /home/uge/mfc-project
Is directory a git repo: Yes
Platform: linux
OS Version: Linux 6.14.0-27-generic
Pixi project: Yes (pixi.toml present with multiple environments)
Related Commands That Work
pixi run -e runtime python --version✅pixi list -e runtime✅pixi info✅
Related Commands That Likely Have Same Issue
conda activate <env>(interactive shell activation)poetry shell(poetry virtual environment)- Any command that starts interactive sessions
Request
This issue kindly requests advice or implementation of a fix to improve pixi shell integration in Claude Code. The current behavior, while technically correct (timing out non-terminating commands), creates friction for users working with pixi-managed Python projects.
Thank you for your consideration and the excellent work on Claude Code! 🙏
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗