{"version":"2.1.332","anchor":"plugin-host-adds-fsstat-fsexists-and-fslist-capabilities","canonical_anchor":"plugin-host-adds-fsstat-fsexists-and-fslist-capabilities","heading":"Plugin host gains fs.stat, fs.exists and fs.list, and checks files through held parent folders","tier":"internal","area":"Plugins","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332\/e\/plugin-host-adds-fsstat-fsexists-and-fslist-capabilities","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332","markdown":"### Plugin host gains fs.stat, fs.exists and fs.list, and checks files through held parent folders\n\nPlugins can now ask Claude Code to check file details and whether a file exists, and those checks resolve paths through held parent folders\n\n**Unclear.** Whether plugin modules can actually use these operations, or whether anything else limits them, is not confirmed.\n\n**What**\n\nPlugins (also called mods) are add-ons that run inside Claude Code and ask it to do things for them, such as reading or writing files. Claude Code keeps lists of the operations a plugin may ask for, called capabilities. Those lists have grown, and the new file checks work in a safer way:\n\n- `fs.stat` and `fs.exists` now appear in the capability lists. `fs.stat` looks up a file's details and `fs.exists` checks whether a file is there. Before, the list held `fs.read`, `fs.list`, `fs.write`, `process.run` and `process.spawn`.\n\n- `fs.list`, for listing a folder, was added to another of these lists.\n\n- The `$.fs` handler that carries out these requests now finds a file through a handle it keeps open on the file's parent folder, for both stat and exists. Before, it looked the path up directly with a plain `lstat`. When it cannot hold the folder, it reports that \"its folder was not held\".\n\n- `fs.exists` now also passes along whether the request has been judged (`o.judged`).\n\n**Why**\n\nPlugins can do more with files than before, so it is worth knowing which plugins you have installed. Holding the parent folder open while checking a file makes it harder for a file or link to be swapped out between the check and the use, a kind of attack known as a symlink race.\n\n- Area: Plugins\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}