Skip to content

Document agents.contextFilters and the coding agent step check - #2088

Merged
bahrmichael merged 5 commits into
mainfrom
michael/cpl-1149-agents-context-filters
Oct 16, 2026
Merged

bahrmichael merged 5 commits into
mainfrom
michael/cpl-1149-agents-context-filters

Conversation

@bahrmichael

@bahrmichael bahrmichael commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes the documentation half of CPL-1149.

experimentalFeatures.agents.contextFilters shipped with Agentic Batch Changes, and this PR updates the according docs.

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Oct 16, 2026 9:04am UTC

Request Review

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Direct preview links to pages changed in this PR:

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ The Vercel build that failed on an earlier revision of this PR passes

bahrmichael and others added 4 commits October 12, 2026 17:51
The context filters page covered only deepSearch.contextFilters. It now
documents experimentalFeatures.agents.contextFilters, how the two keys
are combined, what Agentic Batch Changes does with the rules, and why a
coding agent step refuses to run in a repository that a rule excludes or
that contains an excluded file.

It also corrects the pattern syntax section: only repository names match
case-insensitively; file paths are compiled verbatim.

Linear: CPL-1149
Amp-Thread-ID: https://ampcode.com/threads/T-997c1649-6531-44c9-ac14-6c14eae06179
Co-authored-by: Amp <amp@ampcode.com>
Filters apply to the agent's repository tools, not to executor checkouts:
a run step can read excluded files. Only repository-only rules drop
agent-managed workspaces, a blocked execution never starts its run
steps, exclude needs at least one rule, and the verification recipe
uses a files-only rule since a repository-only rule drops the workspace
before anything executes.

Amp-Thread-ID: https://ampcode.com/threads/T-997c1649-6531-44c9-ac14-6c14eae06179
Co-authored-by: Amp <amp@ampcode.com>

@danielmarquespt danielmarquespt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to provide a bit more detail on how to configure from the ABC side of the docs, but other than that looks good


### Context filters

Administrators can exclude repositories and files from the agent's Sourcegraph tools with [context filters](/context-filters), configured under `experimentalFeatures.agents.contextFilters`. Excluded content is invisible to the agent's research and to the Sourcegraph MCP tools in its coding agent steps, and a repository excluded as a whole is dropped from the agent's workspaces. Because a coding agent step works on a full checkout, it [does not run at all](/context-filters#coding-agent-steps) in a repository that a rule excludes or that contains an excluded file. Filters do not remove files from the checkout that `run` steps execute on.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configured under experimentalFeatures.agents.contextFilters``

Where is this? Site config json?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to the ## Configuring context filters section of contex-filters

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link behind context filters brings you to this page. I feel like that's everything I'd need to configure it. Is there anything you're missing?

Screenshot 2026-10-13 at 16 00 31

@bahrmichael
bahrmichael removed the request for review from julialeex October 16, 2026 09:03
@bahrmichael
bahrmichael enabled auto-merge (squash) October 16, 2026 09:03
@bahrmichael
bahrmichael merged commit cd210c3 into main Oct 16, 2026
8 checks passed
@bahrmichael
bahrmichael deleted the michael/cpl-1149-agents-context-filters branch October 16, 2026 09:05

This branch was successfully deployed

1 active deployment
Preview — c5cc6f1e Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants