Limit Directory Access
Setting the ClaudeCodeOptions cwd does set the working directory correctly, but does not limit file operations to that directory. For example, parent directories can be read and written to.
Is there a way to limit activity to the CWD and subdirectories within it? If not, are there plans to add this feature?
+1
I have the same issue, I was expecting the SDK to adhere to the Folder access restrictions that are central to the CLI's security policy.
Not sure if this is related to https://github.com/anthropics/claude-code-sdk-python/issues/10 or if that's purely about the directory the app is executed from.
If the built-in protections don't apply to the Python SDK, are there are any existing patterns or best practices for sandboxing it (i.e. example Dockerfiles)?
Any updates here ?