Skip to content

Clarify and consolidate documentation for content exclusions for the different GitHub Copilot modes #42617

Open

Description

@Nils-W

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/copilot/how-tos/configure-content-exclusion/exclude-content-from-copilot#configuring-content-exclusion-for-your-repository (accessed on 29th January 2026)
https://docs.github.com/en/copilot/concepts/context/content-exclusion#availability-of-content-exclusion (accessed on 29th January 2026)

What part(s) of the article would you like to see updated?

Problem Description

The current documentation around GitHub Copilot content exclusion appears to be inconsistent and, in some cases, contradictory across different official sources. This makes it difficult to understand which Copilot tools and modes actually respect content exclusion rules.

Conflicting Documentation

Configure content exclusion (GitHub Docs)

https://docs.github.com/en/copilot/how-tos/configure-content-exclusion/exclude-content-from-copilot#configuring-content-exclusion-for-your-repository

This page states that GitHub Copilot CLI, Copilot coding agent, and Agent mode in Copilot Chat in IDEs do not support content exclusion, and refers to additional documentation for clarification.

Content exclusion concepts and availability (GitHub Docs)

https://docs.github.com/en/copilot/concepts/context/content-exclusion#availability-of-content-exclusion

This page indicates that content exclusion is available in Copilot Chat for Visual Studio Code, but includes the following note:

  • Content exclusion is in public preview on the GitHub website and GitHub Mobile.
  • Content exclusion is currently not supported in Edit and Agent modes of Copilot Chat in Visual Studio Code and other editors.

Copilot Agent Mode (Microsoft Learn)

https://learn.microsoft.com/en-us/visualstudio/ide/copilot-agent-mode?view=visualstudio#frequently-asked-questions

This documentation states that Agent mode cannot access files and directories excluded through file exclusion, which suggests that content exclusion is respected by Agent mode, at least in Visual Studio.

Observed Behavior

When testing a simple scenario, content exclusion appeared to work across all Copilot modes, including those documented as unsupported. This may indicate:

  • Partial or implicit support depending on the tool or environment
  • Differences between file exclusion and content exclusion
  • Outdated or incomplete documentation

For the testing scenario we added an GitLab Repository for the content exclusion in the GitHub Copilot Business content exclusion setting and tested for the ask, edit and agent mode in the VS Code Chat if the file can be explained. For all the modes the response said that no context was attached even when i manually drag and dropped the file into the chat window.

Requested Improvement

The documentation should be updated to clearly and explicitly describe:

  • Which Copilot tools and modes support content exclusion
  • Which modes do not support it, and in what way
  • Whether behavior differs between:
    • Chat, Edit, and Agent modes
    • IDEs (VS Code, Visual Studio) and the GitHub website
  • Any known limitations, caveats, or indirect behaviors that may cause content exclusion to appear to work even when it is not fully supported

A concise support matrix or table outlining Copilot mode vs. content exclusion behavior would greatly improve clarity and help users avoid incorrect assumptions.

Clear and accurate documentation is particularly important for business and enterprise users, as content exclusion is often a critical compliance and data-protection requirement. Organizations need to clearly understand which Copilot modes and tools can be safely used while content exclusion is enabled, and which modes may bypass or partially ignore these rules. Without this clarity, there is a risk of unintentional exposure of sensitive or proprietary information and uncertainty about whether Copilot usage complies with internal policies and regulatory obligations.

Related Issues and Pull Requests

Additional information

No response

Activity

  1. added
    contentThis issue or pull request belongs to the Docs Content team
    on Jan 29, 2026
  2. welcome commented on Jan 29, 2026

    @welcome

    Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

  3. added
    triageDo not begin working on this issue until triaged by the team
    on Jan 29, 2026
  4. Nils-W commented on Jan 30, 2026

    @Nils-W
    Author

    Example: Observed behavior of content exclusion in Agent mode

    To illustrate the current ambiguity, I would like to provide a concrete example based on a small stress test of content exclusion.

    I used the GitHub Copilot extension for Visual Studio Code and configured content exclusion on the server side to exclude the file upload_files.py.

    I then issued the following prompt while using Copilot Chat in Agent mode:

    Image

    The response indicated that the excluded file was not directly accessible, suggesting that Agent mode appears to respect content exclusion at least partially:

    Image

    However, when using Agent tools, the content exclusion can be bypassed. For example, the agent suggested or executed a tool-based action:

    Image

    After explicitly asking the agent to proceed with this approach, the previously excluded file could be read without restriction:

    Image

    It would be very helpful if the documentation provided a clear overview of these caveats, for example:

    • A compatibility matrix showing which Copilot modes and tools fully, partially, or do not support content exclusion
    • Explicit notes describing scenarios where content exclusion can be bypassed indirectly (e.g., via agent tools or terminal access)

    Such clarification would significantly improve transparency and help users - especially enterprise and compliance-focused teams -make informed decisions about which Copilot features can be safely enabled in their environments.

  5. added
    copilotContent related to GitHub Copilot
    and removed
    triageDo not begin working on this issue until triaged by the team
    on Feb 5, 2026
  6. Sharra-writes commented on Feb 5, 2026

    @Sharra-writes
    Contributor

    @Nils-W Thanks for letting us know this is unclear and/or not working correctly. I will take this to the Copilot team to find out how it's supposed to work, whether there are bugs, and figure out how to update the documentation.

  7. Nils-W commented on Feb 6, 2026

    @Nils-W
    Author

    @Sharra-writes Thanks for looking into this and escalating it to the Copilot team. Let me know if you need any additional details from my side.

  8. github-actions commented on Mar 16, 2026

    @github-actions
    Contributor

    A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.

  9. added
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Mar 16, 2026
  10. removed
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Mar 17, 2026
  11. github-actions commented on May 4, 2026

    @github-actions
    Contributor

    A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.

  12. added
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on May 4, 2026
  13. Nils-W commented on May 5, 2026

    @Nils-W
    Author

    I think this is still not resolved and therefore should stay open.

  14. removed
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on May 11, 2026
  15. added
    needs SMEThis proposal needs review from a subject matter expert
    on Jul 31, 2026
  16. github-actions commented on Jul 31, 2026

    @github-actions
    Contributor

    Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀

  17. github-actions commented on Aug 31, 2026

    @github-actions
    Contributor

    This is a gentle reminder for the Technical Content team that this issue is waiting for technical review by a subject matter expert (SME).

  18. github-actions commented on Oct 5, 2026

    @github-actions
    Contributor

    A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.

  19. added
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Oct 5, 2026
  20. MonicaG commented on Oct 5, 2026

    @MonicaG

    Still an issue

  21. added and removed
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Oct 6, 2026
  22. removed
    Waiting on SME reviewThe request for a technical review by a subject matter expert has stalled.
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    builder personacontentThis issue or pull request belongs to the Docs Content teamcopilotContent related to GitHub Copilotneeds SMEThis proposal needs review from a subject matter expert

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions