[FEATURE] Open a read-only side chat from a REPL text selection
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 through long-form tasks in Claude Code (writing drafts, exploring code, reviewing tool output), I frequently want to dig deeper on ONE specific chunk of Claude's output without letting that tangent pollute the main conversation. Today, any follow-up question gets appended to the main thread, which:
- Derails outline-level conversations with micro-edits (e.g. writing a book chapter, then 20 turns rephrasing one paragraph)
- Inflates the main session's context with side exploration it doesn't need to "remember"
- Pushes the main session toward its context limit faster than necessary
There is currently no way to branch off a short, focused sub-conversation anchored to a specific piece of Claude's prior output.
Proposed Solution
Let the user select text in the REPL output and open a side chat from that selection.
Trigger. Select text in the REPL (selection + copy-on-select already works today in fullscreen mode), then press a hotkey (e.g. Ctrl+Shift+K) or right-click and pick "Open in side chat".
UI. A side panel (split view) or a modal overlay similar to the Ctrl+O transcript view, containing:
- The selected text pinned at the top as an "anchor"
- A fresh input prompt scoped to that side thread
- A visible indicator that the context is forked and read-only
Context. The side chat inherits the main session's context as read-only:
- Can see prior messages, tool results, CWD, project files
- Write tools (Edit, Write, mutating Bash) off by default; reads and web fetch on; configurable toggle for users who want to let the side chat try a fix in isolation
- Any side-chat messages and tool calls are never appended to the main session
Lifecycle. Closing the side chat discards it, or optionally saves a transcript to .claude/sidechats/ with a timestamp. The main session is untouched either way.
Multiple side chats. Ideally N concurrent side chats, listed in a sidebar. One-at-a-time would be an acceptable v1.
Alternative Solutions
- Second terminal running
claude. Loses all context; I have to manually recreate the shared state and re-read the same files. - Ask inline and accept the pollution. Works, but bloats the main thread and wastes context on one-off tangents.
/resumeafter the fact. Too heavyweight and breaks flow; requires finishing, exiting, resuming, then continuing.- Copy/paste into claude.ai. No tool access, no project context, different auth.
None of these preserve the "right where I am, same context, temporary" shape of the workflow.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
Scenario 1: writing a book.
- I ask Claude to draft Chapter 3 of a book I'm writing.
- Claude produces a 2000-word draft.
- I select paragraph 4 ("The protagonist arrives at the harbor...") and open a side chat anchored to it.
- In the side chat I ask: "Give me three alternative openings for this paragraph with more sensory detail."
- Claude replies with three options. I read them, close the side chat, and manually edit the chosen phrasing into the main draft (or decide none of them work and just close).
- The main conversation has no record of the side exploration. My next main-thread message is still about the overall chapter structure, not buried under paragraph-level nits.
Scenario 2: exploring tool output.
- I ask Claude to grep for all usages of a function across the codebase.
- The tool returns 40 hits.
- I select hit #17 because it "looks weird" and open a side chat on it.
- In the side chat I ask: "Read this file and tell me why this usage looks different from the others."
- I get my answer, close the side chat, and the main planning conversation continues from where it was.
Additional Context
Technical feasibility notes (from an end-user perspective, based on observed behavior):
- Selection detection already exists. In fullscreen / alt-screen mode, Claude Code already tracks mouse-driven text selection and auto-copies to clipboard on mouse-up (iTerm2-style). The selected string is already available client-side, so no new terminal plumbing appears necessary for the trigger.
- IDE selection passthrough already exists. When running alongside VS Code / Cursor / Windsurf, editor selections already flow to the agent. The same mechanism could reasonably trigger a side chat from a REPL selection.
- Prior art for overlay UI. The
Ctrl+Otranscript overlay demonstrates a temporary alt-screen panel that does not clobber the main view. A similar pattern could host the side-chat UI without disrupting the main REPL.
Known constraints the maintainers should know up front:
- Outside fullscreen mode (streaming REPL, scrollback), the native terminal owns text selection. The feature would likely need to be alt-screen-only for the REPL case, or require the IDE extension for the streaming / non-fullscreen case.
- An MVP does not need persistent side-chat history; discard-on-close is fine.
- The "read-only context" model is the important safety property. It is fine for v1 to be strict about this (no write tools at all) and relax later.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗