Start Debugging

Daily notes on .NET, C#, EF Core, MAUI, Blazor, and Flutter - for developers who ship.

How to Stop Claude Code From Writing Outside the Repo With permissions.blockWritesOutsideWorkingDirectories

Set permissions.blockWritesOutsideWorkingDirectories to true and Claude Code 2.1.314+ makes Write, Edit and NotebookEdit refuse any path outside the working directories in every permission mode, bypassPermissions included. What it refuses, what stays writable, why allow rules cannot open it, how /add-dir and additionalDirectories do, what it does to worktrees, and how to pair it with the Bash sandbox so shell commands are fenced too.

How to Keep Unattended Claude Code Runs From Stalling on Permission Prompts With permissions.denyInsteadOfPrompting

Set permissions.denyInsteadOfPrompting to true in user, managed or --settings scope and Claude Code 2.1.319+ denies any tool call that would wait on a permission prompt, then keeps the turn going. Where it applies, how it differs from dontAsk mode and --permission-prompts none, what it also switches off, how to approve calls from a PermissionRequest hook, and the two dialogs it cannot skip.
Page 1 of 117 Next ›