revert: remove foreign-OS path rejection from filesystem tool - #4222
Merged
Conversation
…ath resolution" This reverts commit cec4ba4. Assisted-By: Claude
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
docker-agent to retry.
Assisted-By: docker-agent
gtardif
approved these changes
Sep 10, 2026
pull Bot
pushed a commit
to TheTechOddBug/cagent
that referenced
this pull request
Sep 11, 2026
…om filesystem tool PR docker#4222 reverted the foreign-OS absolute-path rejection and the resolved-path error hint that were added by an earlier filesystem change. The filesystem tool docs still described both behaviors as current, which is no longer accurate: - Absolute paths are once again used as-is instead of being validated against the host OS and rejected when they look foreign. - "Not found" errors no longer include the resolved absolute path. Source PR: docker#4222
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous commit introduced logic to detect and reject file paths intended for a different operating system (e.g., Windows-style paths on Linux), along with working-directory instructions and path resolution hints surfaced to the agent. After further consideration, this approach adds unnecessary complexity and makes the filesystem tool more brittle without a clear benefit — legitimate paths can match the heuristics, and the agent already handles working-directory context through other means.
This reverts commit cec4ba4. The filesystem tool is restored to its prior behavior: it accepts any path without OS-validation gates. The related test cases covering foreign-path rejection are removed, and the test cassettes are updated to reflect the simpler tool output format.
No behavior changes outside the reverted feature. Builds, tests, and linter all pass.