You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(tools): normalize or guide models against absolute POSIX paths on Windows hosts #972
When models run on Windows hosts, they occasionally hallucinate standard POSIX paths (such as /home/user/... or /tmp/...) in arguments to read_file, glob, and grep. These paths fail with raw OS-level errors (e.g. GetFileAttributesEx <workdir>\home: The system cannot find the file specified).
Problem
In internal/tools/, path resolution on Windows interprets leading /home/... relative to the current working drive or repository root, causing missing-path errors.
The model wastes turns retrying non-existent directories rather than adjusting to workspace-relative or Windows paths.
Proposed Solution
Platform hints on failure: When a tool on Windows receives a /home/... or root-like POSIX path that does not exist, provide an actionable error hint clarifying the workspace root and host OS.
Path normalization: Strip synthetic /home/user/<repo> prefixes when they match workspace-relative targets.
The failure hint is the safe part and is welcome as is: a /home/... or root-like POSIX path that does not exist on a Windows host should say so in terms of the workspace root and the host OS, so the model stops retrying the same wrong shape.
Silent path normalization is the risky part. A rewritten path can land on a real file the model did not mean, and then a read or write succeeds against the wrong target with no error to notice. If normalization goes in at all it should be narrow (the literal /home/<user> prefix mapped to the workspace, nothing broader), logged in the result so the substitution is visible, and covered by a test that a path resolving to something outside the workspace is refused rather than rewritten. The hint alone would be a good first PR.
Back in the pool, and still valid on current main.
This came up in an audit of open issues whose only linked pull request had closed, which made them look covered to a query while nobody was actually working them. The earlier attempt closed without landing, so this is open for a fresh one.
I verified the problem still exists rather than assuming it, and the audit verdict was independently re-checked before I posted this. The label is already on, so a PR implementing it can merge on review.
Taking this one, scoped to the hint-only first PR recommended above: when a tool on Windows receives a root-like POSIX path (/home/..., /tmp/..., or similar) that does not exist, the error message will name the workspace root and the host OS so the model stops retrying the same path shape. Path normalization stays out entirely, per the constraint.
I'll develop and test on a native Windows machine, include regression tests, and note AI assistance in the PR description.
Activity
fix(tools): rewrite Windows POSIX /home paths and hint on miss
Vasanthdev2004 commentedon Sep 8, 2026
Approved, with one constraint on the second half.
The failure hint is the safe part and is welcome as is: a
/home/...or root-like POSIX path that does not exist on a Windows host should say so in terms of the workspace root and the host OS, so the model stops retrying the same wrong shape.Silent path normalization is the risky part. A rewritten path can land on a real file the model did not mean, and then a read or write succeeds against the wrong target with no error to notice. If normalization goes in at all it should be narrow (the literal
/home/<user>prefix mapped to the workspace, nothing broader), logged in the result so the substitution is visible, and covered by a test that a path resolving to something outside the workspace is refused rather than rewritten. The hint alone would be a good first PR.Vasanthdev2004 commentedon Sep 12, 2026
Back in the pool, and still valid on current main.
This came up in an audit of open issues whose only linked pull request had closed, which made them look covered to a query while nobody was actually working them. The earlier attempt closed without landing, so this is open for a fresh one.
I verified the problem still exists rather than assuming it, and the audit verdict was independently re-checked before I posted this. The label is already on, so a PR implementing it can merge on review.
Yan123-tech commentedon Oct 8, 2026
Taking this one, scoped to the hint-only first PR recommended above: when a tool on Windows receives a root-like POSIX path (
/home/...,/tmp/..., or similar) that does not exist, the error message will name the workspace root and the host OS so the model stops retrying the same path shape. Path normalization stays out entirely, per the constraint.I'll develop and test on a native Windows machine, include regression tests, and note AI assistance in the PR description.
fix(tools): hint when Windows resolves POSIX paths under root (#1063)