Stage F: make FILE_NOT_FOUND self-correcting with a sibling listing#8
Closed
Anmolnoor wants to merge 1 commit into
Closed
Stage F: make FILE_NOT_FOUND self-correcting with a sibling listing#8Anmolnoor wants to merge 1 commit into
Anmolnoor wants to merge 1 commit into
Conversation
A wrong-filename guess dead-ended: file.read returned a bare "File does not exist.", so the model had nothing to correct with and repeated the same bad path until the no-progress detector stopped it. Now FILE_NOT_FOUND (read, read_chunk, edit, apply_diff) reports the missing path plus the entries in its parent directory and a suggestion to discover paths via foundation.files. The model can self-correct on the next iteration instead of guessing again — same "make failures legible" spirit as Stage A. Tests: read of a missing file names the real sibling in the error; an orchestrator turn that reads the wrong name surfaces the real filename into the next iteration's context and the corrected read succeeds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
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.
Context
Live testing turned up a dead-end: asking the agent to read a file by description, it guessed a filename (
res/anmolnoor-report.md), got a bare "File does not exist.", and — with nothing to correct from — repeated the same wrong path until the no-progress detector stopped the turn. The real file wasres/anmolnoor-github-report.md.The agent should discover, not require exact hand-fed paths. A good not-found error makes that automatic.
What changed
FILE_NOT_FOUND(acrossread,read_chunk,edit,apply_diff) now reports:foundation.files.So instead of
File does not exist., the model sees:— and self-corrects on the next iteration. Same "make failures legible" spirit as Stage A's truncation work. The listing only covers the already-resolved (in-scope / granted) parent, so it adds no new access.
Tests
2 new (403 total, ruff clean): a missing-file read names the real sibling in the error + sets a suggestion; an orchestrator turn that reads the wrong name surfaces the real filename into the next iteration's planning context and the corrected read executes.
🤖 Generated with Claude Code