Skip to content

agent: Fix tool paths preferring files in subdirectories named after the project root#56230

Merged
bennetbo merged 2 commits into
zed-industries:mainfrom
procr1337:main
May 14, 2026
Merged

agent: Fix tool paths preferring files in subdirectories named after the project root#56230
bennetbo merged 2 commits into
zed-industries:mainfrom
procr1337:main

Conversation

@procr1337

Copy link
Copy Markdown
Contributor

The tool definition is very clearly contradicting the previous behavior. Performance impact is unclear to me, we increase the work in a potentially expensive loop, but it seems necessary to have both the specified behavior from the tool definition, as well as the heuristic/fallback for misbehaving models that seems to be intended.

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #56225

Release Notes:

  • Fixed tool paths preferring files in subdirectories named after the project root

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 8, 2026
@maxdeviant maxdeviant changed the title agent: Fix tool paths preferring files in subdirectories named after the project root. Closes #56225 agent: Fix tool paths preferring files in subdirectories named after the project root May 8, 2026
@ChristopherBiscardi ChristopherBiscardi added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label May 10, 2026
@bennetbo bennetbo self-assigned this May 12, 2026

@bennetbo bennetbo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, looks reasonable. We should get rid of some of the verbose comments (GitHub does not let me push to your branch)

Comment thread crates/agent/src/tools/read_file_tool.rs Outdated
Comment thread crates/project/src/project.rs
@procr1337 procr1337 requested a review from bennetbo May 14, 2026 09:48
@bennetbo bennetbo enabled auto-merge May 14, 2026 10:02
@bennetbo bennetbo added this pull request to the merge queue May 14, 2026
Merged via the queue into zed-industries:main with commit 9fe2931 May 14, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

read_file tool makes some files shadowed in subdirectories impossible to read

4 participants