Claude Code bug: Read tool fails on images in PID namespaces via /proc/pid/fd re-open

mleungdev · ghdev · 2026-10-17

Issue #102816 on anthropics/claude-code reports that since the hardened file-read path landed (seen in 2.1.284, still in 2.1.301), the Read tool returns "File does not exist" for every image and PDF when Claude Code runs inside a PID namespace whose /proc isn't that namespace's own procfs — common in rootless runc/bubblewrap sandboxes bind-mounting the parent's /proc, e.g. under Kubernetes-masked /proc. Text files read fine.

Root cause: the hardened read re-opens fds via /proc/${process.pid}/fd/${fd} using the namespace-local pid; in a foreign /proc, that path doesn't exist and re-open fails with ENOENT. The adjacent symlink-check helper already uses /proc/self/fd/${fd}, which works in every namespace — switching to it or reading from the open fd directly would fix it.

The reporter includes a minimal Linux repro (generate a tiny PNG, run claude -p with --allowedTools Read); version 2.1.181 worked in the same sandbox.

Original post →

More from coding & agent

coding & agent channel →