[FEATURE] Toggle between claude code and local terminal session with integrated context
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 working in Claude Code, there's significant friction when I need to share terminal output or ongoing terminal sessions with Claude. Currently, I must:
- Maintain multiple windows open (Claude Code CLI + separate terminal)
- Manually copy-paste terminal output into the chat to give Claude context
- Break my workflow flow to switch between windows
- Lose the conversational momentum when debugging or iterating
While Claude can execute bash commands, it cannot observe an ongoing interactive terminal session (like a running dev server, database REPL, or real-time logs). This creates a disconnect where I'm often saying "let me show you what's happening" but then fumbling with copy-paste instead of just seamlessly sharing context.
Proposed Solution
Add a built-in terminal integration that allows seamless switching between
Claude chat and a terminal session that Claude can observe. Specifically:
- Toggle functionality:
A keyboard shortcut or command (e.g., Ctrl+T or /terminal) to switch between
chat mode and terminal mode
- Context sharing:
Claude has read access to the terminal session history/output
- Seamless flow:
I can naturally say "Claude, check this out" and switch to terminal, then
toggle back to continue our conversation
- Session persistence:
The terminal session stays alive when switching back to chat
The interface could work as:
- Split-pane view (terminal on one side, chat on other), OR
- Full-screen toggle between terminal and chat, OR
- Ability to "share" current terminal state with Claude via a command
Alternative Solutions
Currently I work around this by:
- Running commands through Claude's Bash tool (but this doesn't work for
interactive sessions or long-running processes)
- Copy-pasting terminal output into chat (tedious and breaks flow)
- Using multiple terminal windows and constantly switching contexts
- Taking screenshots and describing what's happening (even more friction)
Other tools that have similar concepts:
- VS Code's integrated terminal with Copilot context
- Cursor IDE's terminal integration
- tmux session sharing (but requires setup and isn't as seamless)
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
Example scenario:
- I'm debugging a Next.js application with Claude's help
- I run npm run dev in my terminal and encounter a runtime error
- Currently: I must copy the error stack trace, switch to Claude Code, paste
it, and describe what I was doing
- With this feature: when use Claude, it already knows what happened in my terminal. I ask it a question about the runtime error, and it fixes it. I then press Ctrl+T, type my own command (say cat a file) and inspect it manually. press Ctrl+T again, and iterate on the next prompt for claude.
- This saves multiple context switches and eliminates copy-paste friction
Another scenario:
- I'm working with a PostgreSQL database and need help with a query
- I have psql running in an interactive session
- With this feature: I can run queries in the terminal while Claude observes,
then toggle back to chat to discuss results
- We iterate quickly: Claude suggests query → I test in terminal → toggle
back → discuss results → repeat
Additional Context
The goal is to eliminate friction and make collaborating with Claude feel like pair programming with a teammate who can see your screen.
This would be particularly valuable for:
- Debugging real-time issues
- Working with interactive REPLs (Python, Node, database shells)
- Monitoring dev servers and build processes
- Sharing command output without disrupting flow
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗