Permissions
Control which actions require approval to run.By default, Gammacode allows all operations without requiring explicit approval. You can configure this using the
permission
option in your configuration files.
edit
, bash
, and webfetch
tools.
Permission levels:
"ask"
— Prompt for approval before running the tool"allow"
— Allow all operations without approval"deny"
— Disable the tool
Tools
Currently, the permissions for theedit
, bash
, and webfetch
tools can be configured through the permission
option.
Edit permissions
Use thepermission.edit
key to control whether file editing operations require user approval.
- Creating new files
- Modifying existing files
- Deleting files
- Moving or renaming files
Bash permissions
You can use thepermission.bash
key to control whether bash commands as a whole need user approval.
allow
, ask
, or deny
.
Wildcards
You can use wildcards to manage permissions for specific bash commands.You can use wildcards to manage permissions for specific bash commands using glob patterns.
*
wildcard to manage permissions for all commands. For example, deny all commands except a couple of specific ones:
*
wildcard.
Glob patterns
The wildcard uses simple regex globbing patterns:*
matches zero or more of any character?
matches exactly one character- All other characters match literally
git *
matches any git commandnpm run *
matches any npm run scriptdocker-*
matches docker-compose, docker-build, etc.test?
matches test1, testA, etc.
Webfetch permissions
Use thepermission.webfetch
key to control whether Gammacode can fetch web pages.
- Fetch external web pages
- Access APIs and web services
- Download resources from the internet
Agent-specific permissions
You can configure permissions per agent. Agent-specific config overrides the global config.build
agent overrides the global bash
permission to allow git push
commands.
You can also configure permissions for agents in Markdown:
Configuration locations
Permissions can be configured in several places:Global configuration
- Location:
~/.gammacode/config.json
- Scope: Applies to all projects
Project configuration
- Location:
.gammacode/config.json
- Scope: Applies only to the current project
- Priority: Overrides global configuration
Agent configuration
- Location:
.gammacode/agent/agent-name.md
or~/.gammacode/agent/agent-name.md
- Scope: Applies only when using that specific agent
- Priority: Overrides both global and project configuration
Common permission patterns
Development workflow
For active development work:Code review workflow
For reviewing code without making changes:Security-focused workflow
For maximum security:CI/CD workflow
For automated environments:Best practices
Security considerations
- Start restrictive: Begin with
"ask"
permissions and gradually allow specific operations as needed - Limit destructive commands: Always require approval for commands like
rm -rf
,git push --force
, etc. - Review regularly: Periodically audit your permission settings to ensure they’re still appropriate
Development efficiency
- Allow common operations: Set frequently used, safe commands to
"allow"
to reduce interruptions - Use wildcards wisely: Group related commands with wildcards for easier management
- Agent-specific permissions: Create specialized agents with appropriate permission levels
Team collaboration
- Document permissions: Include permission rationale in your project documentation
- Consistent patterns: Use similar permission patterns across team projects
- Project-specific overrides: Use project config to handle unique security requirements
Troubleshooting
Permission denied errors
If operations are unexpectedly blocked:- Check your global configuration in
~/.gammacode/config.json
- Check project configuration in
.gammacode/config.json
- Check agent-specific permissions in agent markdown files
- Remember that more specific rules override general ones
Commands not working
If bash commands aren’t executing:- Verify the command matches your permission pattern exactly
- Check for typos in command names or glob patterns
- Remember that
*
wildcards are greedy and match everything - Test with
"bash": "ask"
to see all command requests
Agent permission conflicts
If agent permissions aren’t working as expected:- Verify the agent is actually being used (check agent name in UI)
- Confirm agent configuration file syntax is correct
- Remember that agent permissions override global/project permissions
- Check that the agent mode is set correctly (
primary
,subagent
, orall
)
Next steps
Agents
Learn about creating and configuring specialized AI agents with custom permissions
Custom Commands
Create custom commands for repetitive tasks with specific permission requirements
Headless Mode
Learn how to run Gammacode programmatically with permission controls
Development Workflows
Step-by-step guides for common development tasks with security considerations