Updated on 2026-07-27 GMT+08:00

Permissions

You can configure the permission file to control the execution permissions of CodeArts Agent CLI. Supported permission actions include automatic execution, approval required, and execution denied.

Configuration Path

Configuration path of the permission file: ~/.codeartsdoer/cli-data/storage/permission/global.json

Configuration Format

Permission configuration format:

[
  {
    "permission": "Permission name",
    "pattern": "*",
    "action": "Permission policy"
  }
]

For details about permission names, see Table 1. For details about permission policies, see Table 2.

Permission Policy Configuration Parameters

Table 1 Permission names

Permission

Description

edit

Modify all files. This permission is triggered when the AI creates files, edits existing ones, or performs bulk code changes.

write

Write data to files.

deleteFile

Delete files.

bash

Run shell commands and match the fully parsed commands. For example, this permission is triggered when the AI executes commands such as git status, npm install, and python manage.py runserver.

Bash command permissions must be used together with bash_mode, indicating the whitelisted commands in sandbox mode. bash_mode also needs to be configured in the ~\.codeartsdoer\cli-data\storage\permission\config.json file. For details about the configuration modes supported by bash_mode, see Table 3.

webfetch

Obtain URLs. This permission is triggered when the AI accesses external APIs, downloads files, or obtains web page content.

external_directory_read

Read paths outside the project directory. This permission is triggered when the AI reads files such as /etc/hosts and ~/.ssh/id_rsa that are not in the project working directory, .

external_directory_write

Modify paths outside the project directory. This permission is triggered when the AI writes data to or modifies system or user configuration files such as /etc or ~/.bashrc.

dotfile

Modify dotfiles (configuration files starting with a dot). This permission is triggered when the AI modifies hidden configuration files such as .gitignore, .env, .vscode, or settings.json.

doom_loop

Loop protection for tool calls. This permission is triggered when the same tool (for example, read) is called three consecutive times with the same input to prevent infinite loops.

Table 2 Permission policies

Action

Description

allow

Direct execution.

ask

Approval required. When you configure ask, the following options are displayed:

  • Allow once: Only the current execution is allowed. The same command will prompt for approval again the next time.
  • Allow always: For the current session, commands of this type will run without further prompts for approval.
  • Reject: The command is not executed and the session continues. This is suitable for actions that you consider risky or unnecessary.

deny

Execution denied

  • In TUI development mode, the sandbox mode is used by default. The options Allow once, Allow always, and Reject are returned.
  • In CLI development mode, the execution is automatically denied. To enable the execution, set the action to allow.
Table 3 Modes supported by bash_mode

Mode

Description

sandbox

Execution in sandbox (default, most secure)

always_ask

Approval required for all commands

always_allow

Direct execution for all commands

Whitelist Configuration Example

Example:

[
  {
    "permission": "bash",
    "pattern": "git *",
    "action": "allow"
  },
  {
    "permission": "bash",
    "pattern": "npm *",
    "action": "allow"
  },
  {
    "permission": "bash",
    "pattern": "ls *",
    "action": "allow"
  }
]

This example contains three JSON objects and supports automatic execution of all commands starting with git, npm, and ls.