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.
More from coding & agent
- Claude cut a 2.6-hour video export to 20 minutes — but only after being told to rebuild the server — byhewar · 2026-10-23
- 3 flight-booking rules my AI agent checks that I'd never do by hand — Efistoffeles · 2026-10-23
- OpenJet claims Qwen3.8-27B coding runs 1.9x faster than llama.cpp on one RTX 3090 — JeremyCMorgan · 2026-10-23
- Building an autonomous SEO agent in Hermes with three skills: programmatic pages, Keywords Everywhere, DataForSEO — EXM7777 · 2026-10-23
- Building a sports betting AI agent with onchain execution and human approval by default: architecture and lessons — Dry-Comfortable-2678 · 2026-10-23
- How do you audit AI agent decisions in regulated workflows? A field survey — Ok_Way_1993 · 2026-10-23