Skip to content

fix(file_tools): use error field instead of content in dedup stub#13210

Open
JiayuuWang wants to merge 1 commit into
NousResearch:mainfrom
JiayuuWang:contribot/fix-dedup-content-pollution
Open

fix(file_tools): use error field instead of content in dedup stub#13210
JiayuuWang wants to merge 1 commit into
NousResearch:mainfrom
JiayuuWang:contribot/fix-dedup-content-pollution

Conversation

@JiayuuWang

Copy link
Copy Markdown
Contributor

Summary

Dedup stub was returning a message in the 'content' field, which pollutes downstream processing that expects line-numbered file content. Now uses the 'error' field to signal a skip without corrupting content.

Changes

  • tools/file_tools.py: Change dedup stub to use 'error' field instead of 'content' to avoid corrupting downstream content processing
  • tests/tools/test_file_read_guards.py: Update test assertion to check 'error' field instead of 'content'

Fixes #13079

Dedup stub was returning a message in the 'content' field, which
pollutes downstream processing that expects line-numbered file content.
Now uses the 'error' field to signal a skip without corrupting content.

Fixes NousResearch#13079
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/file File tools (read, write, patch, search) labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #13098 — same fix: move read_file dedup hint from content field to error field (#13079).

@zjjott

zjjott commented May 21, 2026

Copy link
Copy Markdown

@JiayuuWang This branch has conflicts that must be resolved
should be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium — degraded but workaround exists tool/file File tools (read, write, patch, search) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: read_file tool's dedup mechanism pollutes file content with cache hint text

3 participants