What
Several of the tools Claude Code uses to work with files now share a guard against device files and process files. Device files are special entries under /dev that stand for hardware or streams rather than ordinary files. Process files are entries under /proc that describe running programs. The guard also catches paths that reach these locations through a link, such as a /proc/self/cwd-style path. When a path is refused, the tool says why in plain words.
- Reading a file: reads of device or process files, and of paths that go through
/procor/devlinks, are refused. The messages say that the path names a device or process file that this tool does not read, or that it goes through a/procor/devlink that this tool does not follow, and ask for the file's own path instead. - Grep (text search): both the check before a search and the search itself refuse paths that lead to
/procor/dev, with the message "search refused by the device guard". Matching results that point at such files are filtered out. - Grep and Glob (file-name search) on Linux: the folder a search starts from is now checked more strictly. Pipes and devices are rejected with "Refusing to search ... : it is a pipe or a device, not a file or a folder." Paths that lead to device or process files are also refused. Before this, the only check was reading the link at
/proc/self/fd. - Opening an attachment: files that lead to a device or process file are rejected with "it leads to a device or process file, which this tool does not send". A second device check now runs after the file is opened. Before this, the only check on Linux and WSL compared the path against
/proc/self/fd.
Why
These tools now refuse device and process files and say why, instead of trying to read them like ordinary files. The sweep agent's view is that this is hardening: it avoids searches hanging on device files and closes ways to reach other locations through /proc links. If a read, search or attachment is refused with one of these messages, give the real path of the file you mean, not a path through /proc or /dev.