Skip to content

agent: Clarify include_pattern parameter usage for grep tool#41225

Merged
rtfeldman merged 1 commit intozed-industries:mainfrom
procr1337:main
Nov 28, 2025
Merged

agent: Clarify include_pattern parameter usage for grep tool#41225
rtfeldman merged 1 commit intozed-industries:mainfrom
procr1337:main

Conversation

@procr1337
Copy link
Contributor

@procr1337 procr1337 commented Oct 26, 2025

Adds clarifying examples and information about the include_pattern parameter for the grep tool, analogous to the path parameter of the read and list tools and others.

The lack of clarity led to unexpected agent behavior described in #41189. This change is confirmed to improve the precision of Claude Sonnet 4.5 when searching for code in an empty conversation (without it, it leaves out the root directory in the query).

Closes #41189.

Release Notes:

- Clarify grep tool description to improve agent precision when using it with the `include_pattern` parameter

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 26, 2025
@SomeoneToIgnore SomeoneToIgnore added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Oct 26, 2025
@rtfeldman rtfeldman enabled auto-merge (squash) November 12, 2025 15:05
Copy link
Contributor

@rtfeldman rtfeldman left a comment

Choose a reason for hiding this comment

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

Thanks @procr1337!

@procr1337
Copy link
Contributor Author

@rtfeldman what happens next, do I need to update the release notes like the bot suggests?

auto-merge was automatically disabled November 21, 2025 09:08

Head branch was pushed to by a user without write access

@procr1337
Copy link
Contributor Author

procr1337 commented Nov 21, 2025

@rtfeldman I rebased it to main to force checks to be actually run now and added Release notes section to the PR. I still encounter this bug daily.

@rtfeldman rtfeldman merged commit d4c0b87 into zed-industries:main Nov 28, 2025
24 checks passed
11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
…ndustries#41225)

Adds clarifying examples and information about the `include_pattern`
parameter for the grep tool, analogous to the `path` parameter of the
read and list tools and others.

The lack of clarity led to unexpected agent behavior described in
zed-industries#41189. This change is confirmed to improve the precision of Claude
Sonnet 4.5 when searching for code in an empty conversation (without it,
it leaves out the root directory in the query).

Closes zed-industries#41189.

```
Release Notes:

- Clarify grep tool description to improve agent precision when using it with the `include_pattern` parameter
```
@franciskafyi franciskafyi moved this from Community PRs to Done in Quality Week – December 2025 Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

Development

Successfully merging this pull request may close these issues.

AI: grep tool call returns no matches with include_pattern

3 participants