Skip to content

Feature Request: Add ability to remove individual file references from context #2339

@YupuLu

Description

@YupuLu

Describe the feature or problem you'd like to solve

Currently, when files are opened/selected in VS Code, they automatically appear as context in Copilot CLI (shown as @filename). However, there's no way to remove individual files from context

Proposed solution

Requested feature:

  • Add a close/remove button (X) next to each @filename tag in CLI
  • OR add a command like /remove-context or /deselect
  • OR add ability to click the @filename tag to toggle it off

Use case:
When working on a project, I may accidentally select unrelated files in
VS Code, which then consume context memory unnecessarily. I want to remove
these without losing my entire conversation history.

This would provide feature parity with the VS Code extension and give users
better control over their context window usage.

Example prompts or workflows

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:context-memoryContext window, memory, compaction, checkpoints, and instruction loading
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions