Permission Model
Operations are categorized by risk level:| Category | Approval Required | Examples |
|---|---|---|
| Read operations | No | Searching documents, reading files, listing tasks |
| Write operations | No* | Adding content, updating blocks, creating tasks |
| Dangerous commands | Yes | Shell commands, file deletion, system changes |
| Destructive actions | Yes | Deleting documents, removing collection items |
Dangerous Commands
When the agent needs to run a shell command that could modify your system, you’ll see a permission prompt showing the command and asking for approval. Your options:- y (yes) - Allow this specific execution
- n (no) - Deny the request
- a (always) - Allow this command for the rest of the session
Commands Requiring Approval
These command patterns always require permission:Safe Commands
These commands run without prompting:Session-Wide Permissions
When you select “always” for a command, it’s whitelisted for the current session. Future uses of that command won’t prompt again. This whitelist resets when you restart Craft Agents.File Access
The agent can read and write files on your local machine:Reading Files
Reading files generally doesn’t require approval:Writing Files
Creating or modifying files shows you what will change and asks for confirmation before proceeding.Craft Document Operations
Operations on your Craft documents follow the standard permission model:| Operation | Requires Approval |
|---|---|
| Reading documents | No |
| Searching content | No |
| Adding content | No* |
| Updating content | No* |
| Deleting blocks | Yes (confirmation) |
| Deleting documents | Yes (confirmation) |
Safe Mode for Document Protection
For additional control over document modifications, enable Safe Mode:Ctrl+S
When Safe Mode is active:
- All document write operations require confirmation
- You see exactly what will be changed before it happens
- Each operation can be approved or denied individually
- Testing new agents or complex prompts
- Working with critical documents
- Learning how the agent operates
- Running batch operations on multiple documents
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 agents
- You control which services each agent can access
Best Practices
Review before approving
Review before approving
Take a moment to read what command will run before approving, especially for unfamiliar operations.
Use 'always' judiciously
Use 'always' judiciously
Only whitelist commands you trust and understand. Common development commands like
npm install are usually safe to whitelist.Be careful with wildcards
Be careful with wildcards
Commands like
rm -rf * are particularly dangerous. The agent tries to be specific, but always verify.Check the working directory
Check the working directory
Before approving file operations, make sure you know what directory you’re in. Use
/debug to see current paths.