GitHub Copilot has a content exclusion setting for files it should ignore in supported features. When the setting applies, inline suggestions are unavailable in an excluded file. That file’s content does not inform suggestions elsewhere or Copilot responses, and Copilot code review skips it. The feature is available to organizations on Copilot Business or Enterprise plans. GitHub’s overview describes these effects.
Agent mode falls outside the setting
The same overview says content exclusion is currently unsupported in Edit and Agent modes of Copilot Chat in editors. GitHub’s setup guide says Copilot CLI does not support content exclusion. An exclusion saved in repository settings therefore does not establish a file access boundary for those workflows. GitHub’s documentation identifies a support limit; it does not say that every agent task reads an excluded file.
Other limits affect covered workflows
Even where exclusions are supported, an editor can supply semantic information from an excluded file indirectly. GitHub gives type information, symbol hover definitions, and build configuration as examples. Its overview also says exclusions do not currently apply to symbolic links or repositories on remote filesystems. These documented limits matter when deciding whether a file can safely remain within a task’s reach.
What to do
- List the files a coding task must never read, such as files containing credentials or private customer data. Check which Copilot mode the task will use before relying on an exclusion.
- If your organization uses content exclusion, set the relevant paths under the repository’s Settings → Copilot → Content exclusion. GitHub’s examples include
- "/scripts/**"to cover a directory. Follow its path format. - Verify the setting in a supported workflow. GitHub says changes can take up to 30 minutes to reach an editor that has already loaded its settings. In Visual Studio Code, Developer: Reload Window fetches them again. Compare inline suggestions in an ordinary file and an excluded file, as GitHub’s test procedure describes.
- For Agent mode or Copilot CLI, keep files that must remain unreadable outside the task’s accessible workspace, or use access controls that deny the task access. The documented exclusion setting does not cover those modes.

The Campfire
No commentsNobody has pulled up a log by this one yet. Be the first to say what you make of it.
Held for the desk. It appears after a look.