Shared shell mode - Claude's commands should affect the active terminal session
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When Claude runs bash commands (e.g. source ~/.bashrc, export VAR=value), they run in a subprocess. Changes don't persist to the user's actual shell. This forces constant terminal switching for simple things like sourcing env vars.
Proposed Solution
Add a "shared shell mode" where Claude Code attaches to the user's active terminal session instead of spawning subprocesses. This would make source, export, and cd work as expected from the user's perspective.
Alternatively, a "Run in my terminal" button that pushes a command to the user's terminal pane and executes it there without copy-pasting.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
Other
Use Case Example
Claude writes credentials to ~/.bashrc but user still has to manually source ~/.bashrc themselves — defeating the seamless automation experience.
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗