Skip to main content
Permission flags control what the AI can do with your system - reading files, writing changes, running commands, and more. These are critical for secure automation.
Security Notice: Permission shortcuts like --skip and --bypass give the AI full system access. Only use them with trusted scripts in trusted directories. For production automation, use granular controls like --allowedTools.

Permission Shortcuts

These are AI Runner-specific shortcuts that expand to Claude Code’s native permission flags.
flag
Skip all permission prompts - Shortcut for --dangerously-skip-permissions
What it does:
  • Disables all permission prompts
  • AI can read, write, execute without asking
  • Fastest for automation and CI/CD
Use for:
  • Trusted scripts in trusted directories
  • CI/CD pipelines
  • Development automation
Warning: Gives AI full system access. Only run trusted code.Shebang example:
flag
Smart auto-approve — the recommended mode for most automationClaude Code uses an AI classifier to review each action. Safe actions proceed; risky ones (force-push, curl | bash, mass deletion) are blocked. Codex CLI uses sandboxed execution with network blocked.Short form for:
  • Claude Code: --permission-mode auto
  • Codex CLI: --full-auto (workspace-write sandbox)
Claude Code’s auto mode requires Sonnet 5 or Opus 5 and a direct Anthropic plan (Pro/Max/Teams). Not available through Bedrock, Vertex, or Foundry.
flag
Bypass permission UI but show actions - Shortcut for --permission-mode bypassPermissions
What it does:
  • Skips permission prompts
  • Shows what actions are being taken
  • AI can proceed without waiting for approval
Use for:
  • Scripts where you want visibility
  • Semi-automated workflows
  • Monitoring what AI does
Shebang example:

Native Permission Flags

These are Claude Code’s native flags, passed through by AI Runner.
flag
Claude Code native: Skip all permission prompts (same as --skip)
Most users should use --skip instead for brevity.
flag
Claude Code native: Set permission behavior mode
Values:
  • bypassPermissions - Same as --bypass (skip prompts, show actions)
  • requirePermissions - Default (prompt for each action)
  • allowedTools - Restrict to specific tools (use with --allowedTools)
Examples:
flag
Claude Code native: Restrict AI to specific tools and commands
Syntax:
  • 'ToolName' - Allow entire tool (e.g., 'Read', 'Bash')
  • 'ToolName(pattern)' - Allow tool with specific pattern
  • Multiple tools space-separated
Common tools:
  • Read - Read files
  • Write - Create/modify files
  • Bash - Run shell commands
  • Edit - Edit existing files
  • Grep - Search file contents
  • Glob - Search file paths
Pattern examples:
Shebang example:

Precedence Rules

When multiple permission flags are specified:
  1. Explicit --permission-mode or --dangerously-skip-permissions takes precedence
  2. Shortcuts (--skip, --bypass) are ignored if explicit flags are present
  3. CLI flags override shebang flags
  4. Shebang flags override defaults
Example:
Warning message:

Permission Modes Compared

Examples

Script Automation (Trusted)

Granular Control (Production)

Visibility Without Prompts

Interactive (Default)

CI/CD Pipeline

Override Script Permissions

Read-Only Mode

Restrict AI to read and search operations only:

Test Execution Mode

Allow running tests but nothing else:

Documentation Mode

Allow updating documentation files only:

Security Best Practices

Only use --skip or --bypass with:
  • Scripts you wrote yourself
  • Trusted repositories
  • Known-safe directories
Never run scripts from the internet with --skip:
For production automation, explicitly list allowed operations:
This prevents unexpected operations while still being automated.
Before adding --skip to a shebang:
  1. Run without --skip first
  2. Review what operations it performs
  3. Verify it only touches expected files
  4. Add --skip only if you trust it completely
CI/CD pipelines can’t respond to prompts. Use --skip for speed or --bypass for visibility:

Troubleshooting

Add --skip or --bypass to prevent permission prompts:
Check if script uses explicit --permission-mode:
CLI flags override shebang:
Make sure you’re using the correct syntax:

Scripting Guide

Full scripting and automation guide

Output Flags

Control output format and streaming