fix(tools): resolve MSYS paths in file tools on Windows - #50488
Closed
lEWFkRAD wants to merge 2 commits into
Closed
Conversation
…rtifacts Detect write_file/patch tool calls targeting .html files and automatically open them in the right rail preview pane with a "building" indicator (pulsing green dot). When the agent turn completes, the indicator settles to a dim dot to signal the artifact is done. Changes: - store/preview.ts: add artifactStatus and lastEditedAt to FilePreviewTab, export ARTIFACT_BUILD_TIMEOUT_MS, add openArtifactTab/touchArtifactTab/ finishAllBuildingArtifactTabs/decayArtifactStatus helpers - use-preview-routing.ts: detect artifact tool events (tool.start/complete) for .html writes, open in preview mode via openArtifactTab - right-rail/preview.tsx: render pulsing green dot for building artifacts, dim dot for done artifacts, decay timer to auto-settle stale builds
…#40138) On Windows with Git Bash, the agent passes file paths like /c/Users/OnyxB/project/file.py to read_file/write_file/search_files. Python on native Windows cannot resolve these MSYS-style paths - Path("/c/Users/x") becomes \c\Users\x under the cwd instead of C:\Users\x, producing "file not found" errors or edits landing in the wrong directory. Fix: - Add _msys_to_windows_path() (ported from local.py) to translate /c/Users/x to C:\Users\x before Path() resolution - Call it in _resolve_path_for_task() so all file tools benefit - No change on non-Windows or for non-MSYS paths Closes NousResearch#40138
lEWFkRAD
force-pushed
the
fix/windows-file-tools-msys-paths
branch
from
July 2, 2026 12:04
08bb5d7 to
5833203
Compare
3 tasks
Collaborator
|
Superseded by #61915. That salvage keeps the MSYS→native file-tool fix, rebased onto current
You're credited via |
Collaborator
|
Closing in favor of #61915 (clean salvage on current main). |
OutThisLife
added a commit
that referenced
this pull request
Jul 10, 2026
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages #50488 (drops unrelated desktop artifact commit); tests adapted from #46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
OutThisLife
added a commit
that referenced
this pull request
Jul 10, 2026
fix(tools): resolve MSYS paths in file tools on Windows (supersedes #50488)
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…488-msys-paths fix(tools): resolve MSYS paths in file tools on Windows (supersedes NousResearch#50488)
justemu
pushed a commit
to justemu/hermes-agent
that referenced
this pull request
Jul 18, 2026
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…488-msys-paths fix(tools): resolve MSYS paths in file tools on Windows (supersedes NousResearch#50488)
This was referenced Aug 3, 2026
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…488-msys-paths fix(tools): resolve MSYS paths in file tools on Windows (supersedes NousResearch#50488)
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
…488-msys-paths fix(tools): resolve MSYS paths in file tools on Windows (supersedes NousResearch#50488)
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.
What does this PR do?
On Windows with Git Bash, the agent passes file paths like
/c/Users/OnyxB/project/file.pytoread_file,write_file, andsearch_files.Python on native Windows cannot resolve these MSYS-style paths —
Path("/c/Users/x")resolves as\c\Users\xunder the cwd (nonexistent) instead ofC:\Users\x. This produces "file not found" errors or edits landing in the wrong directory.Fix
_msys_to_windows_path()helper (ported fromlocal.py) to translate/c/Users/project/file.pytoC:\Users\project\file.pybeforePath.resolve()._resolve_path_for_task()so ALL file tools (read, write, search) benefit.Technical details
tools/file_tools.py_resolve_path_for_taskSession
Windows 11 native, Git Bash shell. The function is conditional (
if _IS_WINDOWS) so Linux/macOS are untouched.