Repository navigation
loopguard: count an edit named by a Windows path by its basename - #165
Merged
Aaron Li (aaron-jx-li) merged 1 commit intoNov 8, 2026
Merged
Aaron Li (aaron-jx-li) merged 1 commit into
Aaron Li (aaron-jx-li) merged 1 commit into
Conversation
Claude Code on Windows gives an edit tool's file_path with backslashes, so the guard counted the edit under the whole path: a later shell edit or `git checkout --` of the same file counted as a different file, and the judge's digest carried the full path.
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.
Claude Code on Windows passes an edit tool's
file_pathwith backslashes (C:\repo\pkg\mod.py), andloopguard.state.basenamesplit only on/, so the guard keyed that edit by the whole path. A latersed -iorgit checkout -- pkg/mod.pyof the same file then counted as a different file (inflatingdistinct_edit_files, and dropping the checkout because the turn had "not edited"mod.py), and the judge's digest and the redirect carried the full local path instead of the basename.basenamenow treats\as a separator too. The new test intests/test_live_core.pyfails on main ({'C:\\w\\repo\\pkg\\mod.py': 1, 'mod.py': 1}) and passes with the change;python -m pytest testson Windows otherwise shows the same results as main.