Fixes · Checked on 2026-10-03
rg: os error 123 on Windows
PowerShell hands ripgrep the asterisk as it is, and Windows file names can't contain one.
The error
rg: src/*.rs: IO error for operation on src/*.rs: The filename, directory name, or volume label syntax is incorrect. (os error 123)
Why it happens
On Linux and macOS, the shell expands src/*.rs into a list of files before rg runs. PowerShell and
cmd don't, and neither does a quoted glob in Bash: rg gets the literal src/*.rs and asks Windows to
open it.
Its cousins come from paths that don't exist, often a coding agent's guess at where a file lives:
The system cannot find the file specified. (os error 2) and
The system cannot find the path specified. (os error 3).
The fix
Pass the folder, and let rg filter with its own glob:
rg -n PATTERN src -g '*.rs'
To find a file before searching it, list names instead of guessing a path:
rg --files -g '*config*'
How DMN learned it
It came up, and was fixed, in 2 of our own sessions. DMN kept the fix as one line:
On Windows, rg gets glob paths like src/*.rs unexpanded (os error 123); pass the directory and filter with
-g '*.rs' instead
.
DMN reads your agents' past sessions on your machine. When the same error is fixed the same way in two or more of them, it keeps the fix as a one-line lesson. When the error turns up again, Claude Code is told the fix straight away, and any agent can search what earlier sessions found. How DMN keeps what agents learn.