Repository navigation
Python: return actionable file-access write path errors - #8710
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits intoSep 28, 2026
Conversation
lakers-abing
temporarily deployed
to
github-app-auth
September 24, 2026 08:05 — with
GitHub Actions
Inactive
lakers-abing
had a problem deploying
to
github-app-auth
September 24, 2026 08:05 — with
GitHub Actions
Error
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Filesystem-backed collisions can still be misclassified as overwriteable existing files.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds actionable file-write collision errors, complementing PR #8687’s in-memory path validation.
Changes:
- Distinguishes parent-file and target-directory collisions.
- Adds regression tests while preserving exclusive-create guidance.
| File | Description |
|---|---|
python/packages/core/agent_framework/_harness/_file_access.py |
Adds collision-specific write responses. |
python/packages/core/tests/core/test_harness_file_access.py |
Tests collision and overwrite guidance. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
lakers-abing
temporarily deployed
to
github-app-auth
September 24, 2026 08:43 — with
GitHub Actions
Inactive
Author
|
@microsoft-github-policy-service agree |
lakers-abing
marked this pull request as ready for review
September 24, 2026 09:38
lakers-abing
temporarily deployed
to
github-app-auth
September 24, 2026 09:39 — with
GitHub Actions
Inactive
lakers-abing
temporarily deployed
to
github-app-auth
September 24, 2026 10:41 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Sep 28, 2026
This branch was previously deployed
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.

Motivation & Context
When a write hits a file/directory path collision, the file-access tool should tell the agent how to recover. The current generic OS error does not distinguish whether the parent path is a file or the target is a directory. The existing
FileExistsErrorresponse is specific to exclusive create and should continue recommendingoverwrite=trueonly for that case.Description & Review Guide
NotADirectoryErrorandIsADirectoryError, and add tool-level regression tests for both cases plus the existing exclusive-create response.overwrite=falseretains its existing behavior.Related Issue
Fixes #8567. This is complementary to open PR #8687: that PR adds the in-memory store path checks; this change handles the tool response and does not repeat those checks.
Contribution Checklist