Skip to content
Back to log

Permissions and trust boundaries in terminal agents

Chainabit's Chao · · 8 min read

In short

Terminal agents' file, program, and network operations are subject to different permission boundaries. Examine approvals and boundaries through Chainabit CLI and Claude Code examples.

What a permission decision covers

OWASP explains that an LLM agent can perform actions in other systems through tools, skills, or plugins. The decision about which plugin the agent calls can also be left to the model. The vulnerability OWASP calls excessive agency is the possibility of harmful actions being performed as a result of unexpected, ambiguous, or altered model outputs.

OWASP lists three possible causes of this vulnerability: excessive functionality, excessive permissions, and excessive autonomy. For example, a plugin used only for reading that also includes modification and deletion functions is an example of excessive functionality. Performing a high-impact action without independent verification or approval is an example related to autonomy.

OWASP recommends using human approval for high-impact actions and validating requests to other systems according to those systems' security rules. It also states that authorization decisions should not be left solely to the model. Logging and monitoring activities can limit the extent of the damage; OWASP does not list them among the measures that prevent the excessive agency vulnerability.

Chainabit CLI permission modes

In Chainabit CLI, the permission mode manages approvals. Folder trust and the operating system sandbox determine which local tools can be used. Selecting a mode does not grant access to another account or workspace. The same mode list opens through Shift+Tab, /mode, /permissions, and /settings.

In Plan mode, Chao plans first; local tools only read files. In Ask before edits mode, local tools can also read files, and each change requires the user's approval. If there is no saved preference, Ask before edits applies.

Auto approve can allow Chao to edit files in trusted folders and run routine programs inside the sandbox without asking. Security and permission rules still apply in this mode. Bypass All skips ordinary local tool approvals in the current session and the relevant trusted folder; deletion operations still require approval.

In the chat, Shift+Tab cycles between Plan, Ask before edits, and Auto approve. It does not enable Bypass All. /mode plan, /mode ask, and /mode auto switch to the corresponding mode. /mode bypass first requests written confirmation for Bypass All.

According to Chainabit, in Plan, Ask before edits, and Auto approve modes, deletion operations, running interpreters, and changes to configurations executed by other tools are not performed without asking. A program's network access also requires approval. There is a separate rule for Auto approve on macOS: programs can access specified developer registries and configured addresses through a local filter; the filter does not access private or local addresses.

Permission panel and file changes

In Chainabit, /permissions shows the capabilities Chao can request in groups. These groups include files, program execution, network, cloud workspace, and agents and extensions. Each row shows the current decision and the layer that made it. If the decision cannot be changed, the row is marked locked and the reason is stated.

Cloud rows may have a workspace rule or, if one exists, a session rule. Only workspace owners and administrators can change workspace rules. According to Chainabit, these rules do not override authorization or the tool's own security boundaries. A change that relaxes a rule is shown first and requires approval; tightening a rule does not require approval.

When Chao wants to change a file, the approval card shows the difference between the current file and the file after the change. The card includes added and removed lines and line numbers. When approval is given, the change shown is applied. If the difference cannot be shown because, for example, the file cannot be read or is not plain text, the card states the reason and still asks for approval.

For a file change, Deny, Allow once, or Always allow this file can be selected. The last option covers only that file in the relevant folder. Editing the same file later does not prompt again; approval continues to be requested for other files, deletion operations, and other types of action.

Folder trust and local tools

Chainabit CLI's local tools work only in a trusted folder and follow the selected permission mode. Programs run inside the operating system sandbox. Chainabit verifies that the sandbox is active in the running process; local programs are unavailable on systems where the sandbox is unavailable. When local tools are off, the chat states why.

Turn this insight into action.

Use the mobile app to continue with guided workflows.

A folder trust decision is hierarchical and takes effect immediately. A trusted folder also covers the folders beneath it; no scan is performed at that time. Trusting a subfolder does not cover its parent folder. When Chao is started in an untrusted folder, it offers the user the option to trust it; the default Not now · local tools stay off option leaves local tools off.

Trust this folder covers the selected folder and everything beneath it. If the folder is inside a Git project and the project's top-level folder is not trusted, the Trust the project option also appears. This option covers the entire project, including the project's own skills and agents. /trust also opens the same selection screen later.

Trusting a folder requires the user's approval in the terminal. Chainabit states that this decision is not made by a script, pipe, configuration, or the model's tool. Revoking trust takes effect on the next request, and pending file changes are not made. Previous actions are not undone; a program that has left the sandbox session also continues to run until it finishes.

When the user's home folder is trusted, only visible folders are covered. Hidden folders such as .ssh and .config, along with Library and Applications, remain closed. Chainabit also states that system folders, folders holding secrets or private application data, and its own data folder cannot be used as a project workspace.

Bypass All and its boundaries

In Chainabit, Bypass All is not the default and is not saved. To enable it, the user selects it from the mode list, then a risk notice is shown and the user is asked to type BYPASS ALL. The mode cannot be enabled if the folder is not trusted, local tools are off, or the operating system sandbox has not been verified in the session. Organization policy can also prevent it from being enabled.

According to the risk notice shown by Chainabit, while Bypass All is enabled, programs can run and file changes can be made in the folder without asking. Deletion and destructive commands still require approval. The sandbox, protected file names, the user's deny rules, and workspace access boundaries also continue to apply. This mode does not provide a resource limit or a temporary copy of the folder to work on. Chainabit says to use the mode only in a folder that can be restored.

Protected names include .env files and their variants, .ssh, .aws, private keys, and certificates. Chainabit CLI also asks for approval in every mode for changes to files that other programs execute automatically, such as shell startup files, Git hooks, and package scripts. Programs run by Chao can read these files but cannot modify them.

The boundaries Chainabit describes also include links in a visible folder. A link from a hidden entry to a visible folder is not followed; a file in a trusted visible folder can be read even if a hidden entry points to it. Programs can read a closed file through a hard link previously created in a visible folder. On Windows, hidden and system file attributes are not evaluated; names are evaluated. On Linux and Windows, local programs are unavailable because there is no program sandbox; file tools continue to work in trusted folders.

A shell command that the user runs directly with ! at the start of the composer is a separate operation. According to Chainabit, the command runs in the user's own shell environment; permission modes, folder trust, and the sandbox do not apply to it. Actions that Chao asks to run remain subject to the relevant permission and trust rules.

Approval and command boundaries in Claude Code

According to Anthropic, in Claude Code's Manual mode, reading files in the working directory and additional directories does not require approval. File changes and most shell commands require approval. The permission prompt shows the action Claude will take and the response options. The user can view and manage rules through /permissions.

Claude Code evaluates rules in order: deny first, then ask, then allow. The first matching rule determines the result; a narrower allow rule cannot override a matching broad deny rule. Anthropic states that these rules are enforced by Claude Code, not by the model. Instructions in a prompt do not change the rules.

Anthropic states that Bash rules match the written command text and do not necessarily cover a different invocation of the same program. These rules alone are not a security boundary around a program. Sandboxing is used for file system and network restrictions that do not depend on command text.

In Manual mode, the working directory boundary is also a permission prompt. A Bash command approved by the user can still write to other locations where the user's account has write access. Anthropic states that reviewing proposed code and commands for security before approval is the user's responsibility.

Ready to start?

Download the app and continue from your phone.

End of Entry