I have done the following
Steps to reproduce
https://github.com/emarc/claude-contained implements a containerized version of Claude Code (and other AI tools). It works by sharing the current folder with Claude Code running in a container.
Run that on any folder with many files (tried with https://github.com/vaadin/flow) and ask Claude to do just about anything related to files (e.g. "What files are there").
Current behavior
It will start consuming file descriptors as it iterates through files. Quite quickly you will have tens or hundreds of thousands of file descriptors in use when the project contains e.g. a node_modules folder. Then you will quite quickly reach the Mac OS file system limit and applications inside or outside the container will start crashing.
Expected behavior
It closes file descriptors after they have been used
Environment
- OS: macOS Tahoe 26.2 (25C56)
- Xcode:
- Container: container CLI version 0.8.0 (build: release, commit: a18df81)
Relevant log output
Code of Conduct