About Tool Permissions
Auggie CLIs tool permission system provides fine-grained control over what actions the agent can perform in your environment. This security layer ensures that Auggie only executes approved operations, protecting your codebase and system from unintended changes. Tool permissions are especially important when:- Running Auggie in production environments
- Working with sensitive codebases
- Enforcing organizational security policies
- Using Auggie in automated workflows
Where Permissions Are Enforced
toolPermissions is honored by the Auggie CLI and by Cosmos cloud agents. Rules are loaded at agent startup from the settings files below and applied to every tool call, so the same configuration behaves identically in either place.
How Permissions Work
When Auggie attempts to use a tool, the permission system:- Checks for matching rules in your configuration
- Applies the first matching rule based on tool name and optional patterns
- Rules are evaluated top-down - first match wins
- Executes or denies the tool call based on the matched rule
Permission Flow
Notes on Unmatched Tools
- Rules are evaluated in order from top to bottom
- The first matching rule determines the permission
- If no rules match, the CLI follows its implicit runtime behavior
- Configure explicit rules for all tools you want to control
Permission Types and Precedence
There are four permission types:Precedence
Rules can come from more than one source — the settings files and the--permission CLI flag each form a policy:
- Within a single policy, the first matching rule wins (top-down).
-
Across policies, the most restrictive matching permission wins, in this order (most to least restrictive):
deny>webhook-policy>script-policy>allow
--permission rule denies it, the tool is denied. This most-restrictive-wins resolution means a stricter policy can never be overridden by a more permissive one.
The --permission CLI Flag
The --permission flag lets you supply rules on the command line. These rules form a separate policy that is combined with the settings-file rules using the most-restrictive-wins resolution above, so a --permission deny always takes effect even if the settings files would allow the tool.
Configuration Files
Tool permissions are configured insettings.json. Both the Auggie CLI and Cosmos cloud agents read from two locations:
Cosmos cloud agents read both files at agent startup. Committing a
.augment/settings.json to your repository is the recommended way to enforce an organizational policy (for example, blocking git merge) on every cloud agent that runs there.
Basic Configuration
Creating Rules
Rules define permissions for specific tools. Each rule can specify:- Tool name - The specific tool to control
- Permission type -
allowordeny - Optional patterns - For shell commands, use regex matching
Basic Rule Structure
Allow List Configuration
Create an explicit allow list by only allowing specific tools:This configuration explicitly allows only the listed tools. Tools not in this list will follow the CLI’s implicit behavior.
Block List Configuration
Create a block list by explicitly denying specific dangerous tools:This configuration blocks specific dangerous operations. Tools not explicitly denied will follow the CLI’s implicit behavior.
Mix and Match Configuration
Combine allow and deny rules for fine-grained control:Available Tools
Shell
The shell is exposed as a single tool,
terminal. One terminal rule gates all shell commands.File Operations
Web
MCP Server Tools
MCP tools follow the pattern{tool-name}_{server-name}:
- Example:
query_database-mcp - Truncated to 64 characters if longer
- Treated like any other tool for permissions
Migrating from legacy tool names
Older configurations may use legacy tool names. They still work — the legacy names are aliased to their current equivalents — but use the current names below.Advanced Rules
Shell Command Filtering
Control which shell commands can be executed using regex patterns:- Allows only safe commands (ls, pwd, echo, cat, grep)
- Denies all other shell commands
- Rules are evaluated in order - first match wins
Blocking a Specific Command (e.g. git merge)
To hard-block a single command such as git merge — a common enterprise policy for Cosmos cloud agents — deny it on the terminal tool with a shellInputRegex:
.augment/settings.json in the repository to enforce it on every Cosmos cloud agent that runs there. The trailing (\s|$) ensures only the git merge subcommand is matched and not related subcommands like git merge-base: a plain \bgit\s+merge\b would still match git merge-base, because - is a non-word character and \b is satisfied at the merge/- boundary. Requiring whitespace or end-of-input after merge blocks git merge and git merge main while leaving git merge-base allowed.
Event-Based Permissions
Control when permission checks occur:tool-call(default) - Check before tool executiontool-response- Check after execution but before returning results to agent
Common Configurations
Read-Only Mode
Allow only read operations, perfect for code review and analysis:Development Mode
Deny potentially dangerous operations while allowing the rest:CI/CD Pipeline
Restrictive settings for automated workflows:Custom Policies
Webhook Validation
Use external services to validate tool requests:tool-name: The name of the tool being invokedevent-type: Either"tool-call"(before execution) or"tool-response"(after execution)details: Tool-specific data (fortool-call) or response data (fortool-response)timestamp: ISO 8601 timestamp of the request
tool-call event type (varies by tool):
Details for
tool-response event type:
Script Validation
Use local scripts for complex validation logic:- Exit code 0: Allow the tool execution
- Non-zero exit code: Deny the tool execution
- stdout/stderr: Optional message included in the agent response
Best Practices
- Be Explicit: Define clear rules for all tools you want to control
- Test Configurations: Verify permissions work as expected before automation
- Log Decisions: Monitor which tools are being allowed/denied for audit trails
- Regular Reviews: Periodically review and update permission rules
- Order Matters: Remember that rules are evaluated top-down, first match wins
Troubleshooting
MCP Tools Not Recognized:- Ensure MCP server name follows
{tool}_{server}pattern - Check for 64-character truncation on long names
- Verify MCP server is properly configured and running
Security Considerations
- Never commit sensitive webhook URLs to version control
- Use
.augment/settings.local.jsonfor personal security overrides - Regularly audit tool usage in production environments
- Implement defense in depth with multiple permission layers
- Test permission changes in isolated environments first
Related Features
- Authentication - Secure access to Auggie
- Custom Rules - Project-specific guidelines
- MCP Integrations - External tool configuration
- Automation - Using permissions in CI/CD