Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions docs/claude-code/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ On Windows, Claude Code uses PowerShell alongside Bash. PowerShell rules follow
}
```

Matching is case-insensitive and common aliases are canonicalized, so `PowerShell(Get-ChildItem *)` also matches `gci`, `ls`, and `dir`.
Matching is case-insensitive and common aliases are canonicalized, so `PowerShell(Get-ChildItem *)` also matches `gci`, `ls`, and `dir`. A bare `PowerShell` or `PowerShell(*)` matches every PowerShell command.

### Built-in read-only commands

Expand All @@ -187,26 +187,6 @@ Unquoted glob patterns are permitted for commands whose every flag is read-only,

A `cd` into a path inside your working directory or an additional directory is also read-only. A compound command like `cd packages/api && ls` runs without a prompt when each part qualifies on its own.

### PowerShell rules

On Windows, Claude Code uses PowerShell alongside Bash. PowerShell rules follow the same syntax as Bash rules, with case-insensitive matching and canonicalized common aliases:

```json
{
"permissions": {
"allow": [
"PowerShell(Get-ChildItem *)",
"PowerShell(git commit *)"
],
"deny": [
"PowerShell(Remove-Item *)"
]
}
}
```

A rule written for a cmdlet name also matches its aliases, so `PowerShell(Get-ChildItem *)` matches `gci`, `ls`, and `dir` as well. A bare `PowerShell` or `PowerShell(*)` matches every PowerShell command.

### MCP tool rules

```text
Expand Down Expand Up @@ -235,14 +215,6 @@ Add these to the `deny` array in your settings or use the `--disallowedTools` CL
}
```

### Agent (subagent) rules

```text
Agent(Explore) # Matches the Explore subagent
Agent(Plan) # Matches the Plan subagent
Agent(my-agent) # Matches a custom subagent
```

## Working directories

By default, Claude has access to files in the directory where it was launched. Extend access with:
Expand Down