4 ms·
I haven't really done anything serious with Claude Code, but today I tested starting claude in ~/claude/test, and told it to list my home dir, which it then did
by qwertox 1y ago
I haven't really done anything serious with Claude Code, but today I tested starting claude in ~/claude/test, and told it to list my home dir, which it then did.
Is there a way to tell tools like Claude Code that it must never leave ~/claude/test, and don't event think about using absolute paths, or relative paths which contain `..`?
- bavell 1y agoChroot jail?
- anuramat 1y agoit's already read only outside of project directories (except for Bash tool); your only further option is to wrap it in a sandbox, `bwrap` is perfect for this "don't even think" is in the default system prompt, but it's inherently indeterministic and can be overridden with a direct instruction as you have seen
- qwertox 1y agoWow! Thank you for bringing bubblewrap to my attention. What an amazing tool! This opens so many doors.
- thrown-0825 1y agorun it in a vm, running an agent directly on your machine is madness