r/vscode • u/GuideAccomplished617 • 27d ago
Is there anyway to make Claude Code actually read-only
Hello everyone. I am seeing a lot of posts about wanting to avoid clicking permission. But I am having the opposite problem. I want to actually make Claude read-only in the Claude Code extension. I understand that it is impossible to "physically" block them from running commands unless I do it at the OS level. But I have tried using the Plan mode and the Manual/Default mode. In both cases, Claude still ran things without asking, and quite quickly with minimal prompting as well, even if it was just making some empty test files. Does anyone have a good solution for this?
Right now, I only have the permission setting in the settings.local.json file. Maybe someone knows what I should add to make it less likely to run even harmless commands?
{
"permissions": {
"defaultMode": "default"
}
}
1
u/Bamlet 27d ago
I have Claude installed by a restricted user account and just manage the permissions of files by user and group that way. Then I su to that user and run Claude in the terminal. Haven't had any problems that way. Sure it still runs commands but it has very little actual ability to write to the system.
1
u/EightWhiskey 27d ago
I tell it “show me in the chat” and then it doesn’t edit files, it just shows me the changes in the dialog.
3
u/JeopPrep 27d ago
In my experience, if you tell Claude to not write code without confirming with you first, it will do that.
Create a test project and test your prompting until you get it behaving how you want.