claude-code
claude-code copied to clipboard
[Feature Request] Allow a user to specify an arbitrary command prepended to every bash command.
It would be useful to me to be able to sandbox every command that's run so that I can, in a custom manner, ensure that Claude only runs things that I care about, in a way that I care about. Concretely I'm working in rust. I want to disallow editing of files outside tests/, examples/, orsrc/, and generally run a sandbox (e.g. docker, a linux container, or just using ptrace to shut down any exec that's not a binary under target/.
I envision this working by allowing a single configuration parameter called CLAUDE_WRAPPER that gets shlex'd to create an array of strings. Prepend said array to the execve call to make it always invoke the wrapper.