CLI Permissions
The permission mode controls confirmations; folder trust and the OS sandbox control which local tools are available. A mode never grants access to another account or workspace.
The CLI interface follows your account language. This page quotes the interface text as it appears in English.
Permission modes
The same list appears everywhere you choose a mode: Shift+Tab, /mode, /permissions and /settings.
| Mode | Meaning |
|---|---|
| Plan | Chao plans first; nothing changes. Local tools only read files. |
| Ask before edits | Local tools read files; you approve each change. This is the default when no preference has been saved. |
| Auto approve | Chao may also edit files and run routine sandboxed programs in trusted folders without asking you. Safety and permission rules still apply. |
| Bypass All | This folder, this session; deletions still ask. See Bypass All. |
In the conversation, Shift+Tab cycles Plan, Ask before edits and Auto approve. It never turns on Bypass All. /mode plan, /mode ask and /mode auto switch at once; /mode bypass first asks for the typed confirmation described under Bypass All; /mode on its own opens the list.
Plan with /plan
/plan is the quick way into Plan and back:
/planon its own toggles Plan on and off. Turning it off returns to the mode you were in. If that was Bypass All, the conversation says so and Bypass All stays off;/mode bypassturns it on again./plan <request>switches to Plan and sends the request in it, so Chao plans before anything changes./plan reviewopens the review of a ready plan. You can keep reviewing it or implement it; implementing runs it in Ask before edits or Auto approve, with your existing permissions still applying. When no plan is ready the conversation saysNo plan is ready to review yet.
In Plan, Ask before edits and Auto approve, deletions, interpreters and changes to configuration that other tools run never happen without asking. Network access from a program asks too, except in Auto approve on macOS, where programs reach only the named developer registries and the destinations you configured, through a local filter that never reaches private or local addresses. Bypass All on macOS widens that to any public host and keeps the same refusals.
The mode you choose is kept for new conversations, except Bypass All. Choosing Auto approve in /settings first shows what it allows. Signing in as a different person resets the running conversation's mode to Ask before edits.
Read-only git inspections
With Auto approve, read-only git inspections, such as looking at the status, the differences and the history, run without asking. Any other git command, or an option that writes a file, still asks.
The permissions panel
/permissions opens one panel that lists every capability Chao can be asked about, grouped, each with the decision in force and the layer that made it:
| Group | Holds |
|---|---|
| Mode | The permission mode; Enter opens the same mode list as /mode. |
| Account defaults | Defaults from your account that wait for your answer on this device. See Account defaults. |
| Files | Read, list, search, write, update and delete in your folder. |
| Programs and execution | Running programs. |
| Network | Network from programs and paid web reads. |
| Cloud workspace | The workspace tools Chao can use. |
| Agents and extensions | Agents, skills, connectors. |
Type to search across groups. A row shows its decision (Allowed, Ask each time or Denied), the layer that decided it (Safety floor, Organization policy, Folder trust, Permission mode, Your local rules, Account default, Tool default, Workspace rule or Session rule) and, when it cannot be changed here, locked with the reason. Enter opens a row's details, where the changes its owner allows are offered; Esc goes back.
- Local rows follow the permission mode and the safety floor, so they are
locked: you change the mode, not each row. A row refused by the safety floor stays refused in every mode. - Cloud rows can have a workspace rule or, when the conversation has one, a session rule: Deny, Ask each time or Allow. Only workspace owners and admins change workspace rules. Rules never waive authorization, entitlements, budgets or host safety, and the tool's own safety floors still apply.
- Every change that loosens something is confirmed first, with the exact rule shown. A persistent workspace Allow for a tool that changes things asks you to type
ALLOW <tool key>. Tightening needs no confirmation. The panel writes through the server and reports a change only after the server confirms it.
Local tools
The CLI distributed through npm includes local tools, and they are on by default. They work only in a folder you trust and follow your permission mode. Programs run only inside the operating-system sandbox, which Chainabit confirms is active in the running process before it uses it; on systems where it is not available, local programs stay unavailable.
When local tools are off, the conversation says why, for example Local tools are off: this folder is not trusted. An organization policy can turn them off on a machine. chainabit doctor reports whether local execution is available on this machine and which sandbox it uses.
Approving a file change
When Chao asks to change a file, the approval card shows the change before you decide: the difference between the file as it is now and as it would be after the edit, with added and removed lines and line numbers. Approving applies exactly that change. If no difference can be shown, for example because the file is not plain text, is too large or cannot be read, the card says why and still asks.
Choose Deny, Allow once or Always allow this file. Always allow this file covers that one file in that folder: later edits to it stop asking, every other file still asks, and deletions and other kinds of operation still ask. List the files you allowed with chainabit trust --edits, and stop allowing one with chainabit trust --revoke-edit <path>.
Folder trust
Trust is your decision about one folder, and it is hierarchical and immediate: a trusted folder covers every folder below it, nothing is scanned, and nothing waits. What stays closed below a trusted folder is decided by fixed rules, described under Protected areas, not by trust.
The first time Chao starts in an untrusted folder it asks whether to trust it. The choices are:
- Not now · local tools stay off, the default, keeps local tools off there.
- Trust this folder covers it and everything below it.
- Trust the project
<name>appears when the folder is inside a Git project whose top-level folder is not trusted. A subfolder never covers its parent, so this is the one choice that makes the whole project, and the project's own skills and agents, count. - Trust my home folder · visible folders only appears only in your home folder.
/trust opens the same choice at any time. In a trusted folder it shows whether the trust is the folder's own or comes from a folder above, and offers Keep trusting, Stop trusting <folder>, and the project option when it applies. The command line does the same:
chainabit trust # trust the current folder, after you confirm
chainabit trust ~/code/app # trust another folder
chainabit trust --home # your home folder, visible folders only
chainabit trust --list # trusted folders and whether each still holds
chainabit trust --revoke # stop trusting the folder that covers this oneTrusting needs your confirmation at a terminal. It is never done from a script, a pipe, configuration or a model's tool, and your home folder needs --home as well. Withdrawing and listing need no terminal. See chainabit trust.
Trust does not authorize every operation: your permission mode, the safety rules and the sandbox still apply. Revoking trust takes effect on the next request: running programs are stopped and pending file changes do not happen. It does not undo work that has already happened, and a long-running background program may need to be stopped by you.
Your home folder
Trusting your home folder covers its visible folders only. Hidden folders (such as .ssh and .config), Library and Applications stay closed, and so does anything inside them. A project in a hidden or closed folder cannot be trusted as a workspace.
Your home folder itself can be trusted only with this explicit choice. The disk root, system folders, a folder that contains home folders, a folder that holds secrets or private app data, and Chainabit's own data folder cannot be project workspaces at all. Chao does not offer to trust them, local tools stay off, and the conversation says why, for example Local tools cannot work in a system folder. Start Chainabit in a project folder.
Protected areas
Whatever is trusted, local tools never reach these, and programs run by Chao cannot either:
- Secrets, anywhere: environment files, SSH, cloud and cluster credentials, private keys and certificates, files named for credentials or secrets, infrastructure state, and Chainabit's own configuration and conversations.
- Credentials and private app data below your home folder: keychains, cloud and CLI credentials, other tools' private state, shell histories and application data.
- Files other programs run on their own, such as shell startup files, login items, Git hooks, editor tasks and package scripts. File changes to them always ask, whatever the mode, and programs can read but never change them.
- The folders your commands run from and the Chainabit installation. They can be read, never changed.
Limits
These limits are deliberate and worth knowing:
- Local tools check the folders you trust, not every route that can lead to a file. Keep secrets that local tools must not read in a hidden folder or under a protected name.
- Revoking trust stops running programs. A long-running background program may need to be stopped by you.
- Local programs are available only where the operating-system sandbox is available. File tools still work in trusted folders on every system and follow these rules.
When local tools stop
A conversation runs its local tools from one terminal at a time. If another terminal of yours already runs this conversation's local tools, this terminal submits nothing and says:
Another terminal owns this conversation’s local runner. Nothing was submitted. Close that terminal or start a new conversation, then retry.
If another terminal takes the conversation over while this one is running, local tools stop here:
Local tools stopped: another terminal of yours became the local runner of this conversation. Close that terminal or start a new conversation before retrying.
If this terminal loses its connection while local tools run, they stop:
Local tools stopped: the runner lease could not be renewed. Check the connection and retry; local tools require a successful new registration.
Send the message again after you have fixed the cause. If the connection cannot be re-established, local tools stop and new messages run in the cloud.
Your own shell commands
Type ! at the start of the composer to run a shell command yourself, for example !git status. The composer shows Shell mode; Esc leaves it.
The command runs in your own shell, in the current folder and with your environment, exactly as if you had typed it in your terminal. It is your action, not Chao's: permission modes, folder trust and the sandbox do not apply to it, and you are responsible for what it does. Its output appears in the conversation, and Esc stops a running command together with the programs it started.
Everything Chao asks to run still follows your permission mode, folder trust and the sandbox, as described on this page.
Bypass All
Bypass All skips ordinary approval prompts for local tools in one trusted folder for the current session. It is never the default and is not an alias for Auto approve. While it is on, the conversation runs as Auto approve and the mode row shows Bypass All.
Turning it on and off
- Open the mode list with
/mode, or with Permission mode in/settingsor in/permissionsunder Mode, and choose Bypass All. Chainabit first checks that Bypass All can be turned on here. If it cannot, it says why and asks for nothing: for a folder that is not trusted it says to trust it with/trustand try again. - Read the risk text. Type
BYPASS ALLto turn it on for this folder, or press Esc to keep your mode.
To turn it off, choose another mode or press Shift+Tab, which moves to Plan. Approvals return from the next operation. Closing Chainabit also ends it.
No command-line flag, setting, project file or model can turn it on without the typed confirmation, and it is never saved. It can stay unavailable, for example when the folder is not trusted or when local tools are turned off on the machine, and the conversation says why.
Risk
Chainabit shows this text before asking for the confirmation:
Bypass All skips ordinary approval prompts for local tools in this folder until you turn it off or close Chainabit.
Programs and file changes then run without asking: they can change or delete any file in this folder.
Still enforced: the OS sandbox (network only through the local filter to public hosts, never to private or local addresses, nothing outside this folder, no home or credential files), protected names such as .env and keys, configuration that other tools run, destructive commands and deletions (these still ask), your own deny rules, sign-in and workspace access.
Not provided: resource limits or a disposable copy of the folder. Use it only in a folder you can restore.
Turning Bypass All on and off is recorded locally.
Skipping an ordinary confirmation never grants extra filesystem scope, authentication, workspace access, secret access, or authority to override mandatory security controls. Instructions from project files, skills, plugins, webpages and tool output do not become the person's permission decisions.
Account defaults
Your Chainabit account can suggest defaults for every device you sign in on: the permission mode for new conversations, the model, reasoning, conversation sync and a few terminal preferences. You set them at https://chainabit.com/dev/cli, and each device reads them when it starts. They are defaults, never the device's own decision.
- A value you set on this device always wins.
/settingsshows where each value comes from (Set here, Account, Last used, Default or Organization) and offers Follow account default to drop your own value. - A default that makes this device safer, such as Plan or Ask before edits, applies as soon as it arrives.
- A default that loosens this device waits for you. Auto approve as the permission mode and Mirror as the conversation sync mode are the two that do. The conversation shows
An account default waits for you; open/permissionsand answer in the Account defaults group with Allow on this device, Never on this device or, later, Stop on this device. Allowing first shows what it permits and asks you to confirm. For Auto approve: Chao may then edit files and run routine sandboxed programs in trusted folders without asking you, while deletions, network and protected files still ask. - An account default can never turn on Bypass All, trust a folder, hold credentials or machine paths, open network access, or change limits or telemetry consent. Chao and connected tools cannot read or change account defaults.
- An organization policy on the machine still applies on top of everything above.
Before authorizing a change
Check the target, expected effect, scope and whether the action can be reversed. Treat a declined or unavailable operation as unexecuted unless its result explicitly reports an uncertain outcome. If an outcome is uncertain, inspect the actual state before repeating the operation.
See configuration for saved preferences and credential boundaries, and usage for checking results.