Permission Modes
Craft Agents offers three distinct permission modes. Use SHIFT+TAB to cycle through them:| Mode | Description | Use Case |
|---|---|---|
| Explore | Read-only exploration | Safe research and investigation |
| Ask to Edit | Prompts before edits | Default mode for controlled work |
| Execute | Full autonomous execution | Trusted automation workflows |
Explore Mode (Safe Mode)
Explore mode is a read-only safe mode for research and investigation. The agent can gather information but cannot make any changes. Allowed operations:Read- Reading file contentsGlob- Finding files by patternGrep- Searching file contentsWebSearch,WebFetch- Web search and content fetchingTask,TaskOutput- Sub-agent tasksTodoWrite,SubmitPlan- Planning operationsLSP- Language server queries (hover, definitions, etc.)- Read-only bash commands (see Safe Commands below)
Write- Creating or overwriting filesEdit,MultiEdit- Modifying file contentsNotebookEdit- Modifying Jupyter notebooks- Bash mutations (
rm,mv,mkdir, etc.) - MCP tool mutations (create, update, delete operations)
- API mutations (POST, PUT, DELETE requests)
Ask to Edit Mode (Default)
Ask to Edit is the default mode. It uses a three-tier permission system:| Command Type | Behavior |
|---|---|
| Safe commands | Auto-allowed (same as Explore mode) |
| Regular commands | Prompts for approval, can use “always allow” |
| Dangerous commands | Prompts for approval, “always allow” disabled |
- y (yes) - Allow this specific operation
- n (no) - Deny the request
- a (always) - Allow this command for the rest of the session (disabled for dangerous commands)
Execute Mode (Allow-All Mode)
Execute mode gives the agent full autonomous execution capabilities. Operations run without prompting, enabling fast, uninterrupted workflows.Switching Modes
Press SHIFT+TAB to cycle through permission modes:Dangerous Commands
Dangerous commands are a subset of non-safe commands that require extra caution. The key difference from regular commands:- Regular commands: Can be auto-allowed with “always allow” for the session
- Dangerous commands: Must be approved individually every time (“always allow” is silently ignored)
- curl/wget special case: “Always allow” whitelists the domain, not the command
Safe Commands
Explore mode allows a comprehensive set of read-only commands. These run without prompting in any mode: File exploration:Customizing Explore Mode
Just ask your agent. The easiest way to customize Explore mode is to tell your agent what you need:
- “Allow npm build in Explore mode”
- “Let Linear comments work in safe mode”
- “Add bun run test to allowed commands”
Permission Configuration
Permissions are configured usingpermissions.json files at multiple levels:
Configuration Schema
Pattern Types
allowedBashPatterns - Regex patterns for bash commands:
allowedMcpPatterns - Patterns matching MCP tool names:
permissions.json, write create_comment and it becomes mcp__linear__.*create_comment internally—the .* means the pattern matches anywhere in the tool name suffix.
allowedApiEndpoints - HTTP method + path combinations:
GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS. Path is a regex pattern.
allowedWritePaths - Glob patterns for file paths the agent can write to in Explore mode:
Example: Allow npm Scripts in Explore Mode
Create~/.craft-agent/permissions/default.json:
Example: Allow Linear Comments in Explore Mode
Create~/.craft-agent/workspaces/{id}/sources/linear/permissions.json:
Blocked Shell Constructs
Even allowed commands are blocked if they contain potentially dangerous shell constructs: Command chaining - Could chain to dangerous commands:git status && git log), the system validates each part separately using AST parsing.
Even safe commands become blocked when combined with shell constructs. For example,
ls | grep foo is blocked in Explore mode because the pipe could be used to chain to dangerous commands. Run safe commands separately without pipes or redirects.API and MCP Credentials
Credentials for external services are handled securely:- Stored encrypted in
~/.craft-agent/credentials.enc - Never displayed in plain text after entry
- Scoped to specific workspaces and sources
- You control which services each agent can access
Best Practices
Start in Explore mode
Start in Explore mode
When investigating unfamiliar code or systems, start in Explore mode to safely research before making changes.
Use Ask to Edit for normal work
Use Ask to Edit for normal work
The default Ask to Edit mode provides a good balance of productivity and control for most tasks.
Reserve Execute for trusted workflows
Reserve Execute for trusted workflows
Only use Execute mode for well-understood, repeatable tasks where you trust the agent’s actions.
Customize Explore mode for your workflow
Customize Explore mode for your workflow
Add your common build commands, test runners, and safe MCP operations to permissions.json so they work in Explore mode.
Review before approving
Review before approving
In Ask to Edit mode, take a moment to read what will change before approving, especially for unfamiliar operations.