[FEATURE] Settings to Control Automatic Context Inclusion (Highlighted Text & Open Tabs)
Resolved 💬 3 comments Opened Oct 1, 2025 by josedacosta Closed Jan 7, 2026
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
Currently, Claude Code automatically sends:
- Highlighted/selected text in the IDE
- 2. Content from open tabs in the IDE
This creates several problems:
- Unintentional context sharing: When I'm editing code and have text highlighted, that work-in-progress code gets automatically sent to Claude even though it's not relevant to my prompt
- Lack of control: I have no way to disable this automatic behavior or control what context is shared
- Privacy concerns: I may be working with sensitive code that shouldn't always be included in the context
- Confusing behavior: The highlighted text might not be related to my actual question, leading to irrelevant responses
I need explicit control over when and how my IDE's current state (selected text and open files) is shared with Claude.
Proposed Solution
Add configuration options in Claude Code settings (CLI, JetBrains, VS Code) to control automatic context inclusion:
Settings Options:
claudeCode.autoIncludeHighlightedText(default: true) - Toggle automatic inclusion of selected/highlighted text- 2.
claudeCode.autoIncludeOpenTabs(default: true) - Toggle automatic inclusion of open tabs content
Keyboard Shortcuts:
When these settings are disabled, provide keyboard shortcuts to manually trigger context inclusion:
Ctrl/Cmd + Shift + H- Manually include currently highlighted textCtrl/Cmd + Shift + T- Manually include open tabs
User Experience:
- When disabled, users have full control over what context is shared
- When enabled, behavior remains as it is today (backward compatible)
- Clear indicators in the UI showing what context will be included
- Status bar or notification showing "Highlighted text included" when manually triggered
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
Scenario: Debugging a Production Issue
- I'm debugging a production issue and have my working implementation open
- 2. I'm also working on some experimental changes in another section (highlighted)
- 3. I want to ask Claude: "What's the best way to handle rate limiting in this API?"
- 4. I specifically want Claude to focus on my production code, NOT my experimental work-in-progress
With Current Behavior:
- My experimental code gets automatically sent because it's highlighted
- Claude's response includes suggestions based on my WIP code
- This confuses the conversation and wastes time
With Proposed Feature:
- I disable autoIncludeHighlightedText in settings
- My highlighted experimental code is NOT sent automatically
- Claude only sees my explicit question and production context
- I get a focused, relevant answer
- If I later want to share my experimental code, I use Ctrl+Shift+H
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗