Tool permissions
Out of the box, every well-formed tool call in work you started runs without asking, attended or not.
Modes
| Mode | Never needs a decision | Other calls | Tools that change things |
|---|---|---|---|
| Bypass permissions (default) | Runs | Runs | Runs |
| Auto | Runs | Model reviews | Model reviews |
| Manual | Runs | Asks you | Asks you |
| Plan | Runs | Asks you | Refused |
Never needs a decision: safe read tools and a few calls that only look at state.
| Topic | Detail |
|---|---|
| Pick | Web, App: bottom of the message box. Terminal: /permissions; Shift+Tab cycles the four in this order. |
| Which applies | The current branch's own mode, else its project's default (project settings), else Bypass permissions. Every turn uses it, attended or not. |
| Bypass permissions | Stored as bypass, the word --permission and project settings files use. Does not override explicit deny or ask rules, held messages, plugin restrictions or identity limits. |
| Auto | A review that cannot run refuses the call. |
| Manual | App access is asked on first touch and can be allowed for the conversation. |
| Plan | Changing tools are also hidden from the model; allow and ask rules do not reach them. Approving exit_plan_mode returns to the mode selected before. |
| Accept edits | Older mode. A conversation stored with it keeps it, shown as a fifth row only while current. |
How a call is decided
- Who is speaking. Anyone but the owner is limited, whatever the mode. Never fires for you.
- Your rules. Empty by default. Global, project and conversation rules merge;
denybeatsaskbeatsallow. Deny applies in every mode. Plan is checked after deny and before ask and allow. - The mode.
A call that would ask with no one to answer (a schedule, a sub-agent, an always-on turn) is refused, and the refusal says how to allow it. That happens only under Manual, Plan, an Auto fallback or an ask rule.
What identity limits
| Who | Gets |
|---|---|
| Owner: App, Web, terminal; bound contacts in direct messages; in group chats those contacts and anyone with full access; work you started | Everything above. An account with sender_access set to paired removes owner status from everyone on it. |
| Chat-only access in a group | Replies and memory; no commands, files or screen. Group chats |
| Not listed for a group | No reaction at all |
| External MCP client | Only the tools the MCP server exposes |
| Work someone else started | No commands, no worktree changes, no writes outside its working directories. Page scripts run only in work you started. |
Approvals and questions
| Control | Behaviour |
|---|---|
| Tool approval card | Shows the current operation only, no before/after history. Allow once and Deny submit directly. |
| Deny with a note | Note button beside Deny; send with Ctrl+Enter. The model receives your note and follows it. |
| Deny | The task continues: the refusal is the tool's result, the operation does not run, and the model is told to stop and ask you. |
| Question card | Each question sits above its control. Multiple questions and form fields submit together with Submit answers; answers stay paired with their questions. Skipping tells the model it went unanswered. |
| Discuss | What you write goes to the model in place of an answer, and it responds in the same turn. The card keeps your text. |
| Message box | Stays available for ordinary messages. |
| Allow this conversation | Saves the rule in this session only. Offered today for computer_use; the rule names the application, the whole screen or your Chrome or Edge and covers everything done there, page scripts included. An application name containing *, ? or [, or ending in :*, is only ever allowed once. A machine you set up is operated without asking; a target that cannot be found when the call is decided goes through the mode instead. |
| Always allow | When offered, saves the exact supported operation rule in the current project. One-shot requests offer no persistent approval. |
Delivery, waiting and file freshness
- An answer closes only after server confirmation; an unconfirmed one can retry the same decision. The card shows submitted answer, delivery progress and confirmation or retry. Confirmed receipts stay until reload; pending requests return on reconnect. A confirmed approval leaves the conversation and the tool row shows what happened.
- Human approvals have no default time limit. Waiting saves progress and releases the active execution attempt; reopening the App restores the request.
- Resuming uses the context saved for that turn, so later memory or date updates do not invalidate the approval. Tool, permission and working-directory checks still apply. If execution cannot resume, the conversation says the operation did not run. Cancelling the task withdraws its approval. Expired older requests are not reactivated.
edit,writeandapply_patchrecord the target files' state at approval and check it before executing and again before writing. A deleted target is not recreated; a changed file must be read again first. Arbitrary shell commands do not declare their targets, so this does not cover their side effects.- Allow once and Deny answer only the current request and create no project rule.
Messages an Agent sends for you
Off by default. Turn on Hold what it sends for my approval at the end of the Agent's Always-on tab; it works whether or not always-on is enabled. Without it, an Agent sends under its ordinary mode.
| Aspect | With the hold on |
|---|---|
| Asks | In every mode, Bypass permissions included, even when an allow rule names the tool. Each message on its own; never becomes an allow rule. |
| Card | Full message. Allow once sends it. Deny with a note returns your changes and the Agent drafts again. |
| Background run | Nobody to ask, so it cannot send. |
| Counts as sending | A connected-service tool whose name starts with or contains send, reply, post, publish, forward, invite, share or comment, or that creates a message, email, comment or post, unless the server marks it read-only. Examples: send_email, chat.postMessage, create_comment. |
| Does not ask | Reads (list_messages, get_posts) and drafts (create_draft) |
Change permissions during a task
A change applies to the running task without stopping it; once the server confirms Bypass permissions, later tools in the same response no longer ask.
What a live change touches
- The selection is sent at once when the interface knows the confirmed session version, and shown as effective only after confirmation. The change holds even while the model reasons, streams or generates arguments.
- The new mode enters later model requests; text being generated is not rewritten. A tool already authorized keeps its authorization. Switching into Plan stops pending writes from being authorized.
- An ordinary approval no longer required resolves through the execution's durable wait and the task continues. Explicit ask rules, questions, forms and Sandbox escalation are not answered by a mode change. Repeated answers, cancellation, timeout and recovery cannot run a completed call again.
- Branch-specific. Other windows on that branch receive the confirmed mode; stale branch or version updates are rejected. A failed or disconnected update stays unconfirmed: reconnect, review the mode, then retry. An unsent draft stores its mode locally and sends it with the first message.
| Work | Mode it uses |
|---|---|
| Sub-agent of an authenticated owner Agent | Inherits the parent's effective mode and explicit rules at creation, so Manual means Manual all the way down. Keeps its own identity and non-interactive restrictions; explicit ask rules still stop operations needing an approver. Later changes do not rewrite admitted sub-agents. |
| Owner work with no parent turn | Default mode |
| Scheduled task | Its conversation's mode and Sandbox setting, read when it fires. A call that would ask is refused, so a task that must act alone needs Bypass permissions or allow rules. |
| Bound chat contact, or a group member with full access | The chat session's own mode and rules; approvals arrive in the chat, answered with /answer. Chat channels |
Project rules
History → Projects → project → Settings → Permission Rules holds Deny, Ask and Allow lists. Add ToolName or ToolName(pattern); remove to revoke; replace by removing and adding. An empty list does not rule out session or global rules.
Saving and timing
- A submitted rule clears only after a project-specific server confirmation. Failed or unconfirmed saves keep the input and show a status. Success updates other open views of that project.
- The next operation in an authenticated interactive owner session reads current rules, including changes made mid-turn. Authorized operations keep their authorization; approval waits still need an answer; admitted sub-agents keep their captured policy.
- Removing a rule affects future authorization, not what already ran.
- Windows paths: forward slashes avoid escaping ambiguity, as in
read(C:/Users/me/project/**). Ordinary backslashes in drive paths are preserved. The syntax escapes its own characters with\\,\(and\). JSON configuration adds JSON's own backslash escaping. - A path rule matches however the same file is written: either slash, a short name, a link to the folder. Deny and Ask rules ignore letter case and also catch a relative path from the working directory; Allow rules compare the full path in the case stored on disk. A network share is written
//server/share/**, or pasted with backslashes throughout. - When commands run in PowerShell, a command containing
{,}or,matches an Allow rule only by its exact text, as Always allow saves it. Deny and Ask rules read it as usual.
Refusals
[blocked by <layer>] <what> did not run: <why>. To change this: <change>.
| Part | Meaning |
|---|---|
<layer> | identity, rule, mode, sandbox, hook or setting |
| Tool result | Also carries denied, reason_code, layer, rule, mode, and outcome set to not_started |
AUTHORITY_TIER_MISSING | The request lacks an authenticated authority tier. Bypass permissions does not solve it. Resubmit older admitted executions through an authenticated interface; new chat submissions carry identity. |
Missing or malformed arguments are not a refusal: they return to the model as an ordinary tool error.
Sandbox
Off by default; turned on per branch in the composer Plus menu. Changes affect later turns.
| Setting or case | Effect |
|---|---|
sandbox.mode | auto: on wherever its backend is available. workspace-write: required. |
| Network | None unless sandbox.network is on |
| Writes | The workspace only; with no project folder, the workspace is your home folder |
| Always read-only | Shell startup files, .git/hooks, .git/config, editor task folders, OpenProgram's state folder; so ~/.zshrc, ~/.ssh and login agents stay out of reach |
Needs more (git push, gh, package install, write outside) | The Agent calls bash with sandbox_permissions="require_escalated" and a one-sentence justification. A card shows command and reason. |
| Allow | Once outside the sandbox; credential filtering still applies |
| Allow this conversation | The same command may leave again here without asking |
| Blocked after running, including a failed name lookup | The explanation returns to the Agent so it asks this way instead of retrying |
| Under Bypass permissions | Leaves without a card. In other modes an ordinary approval never authorizes it. |
Restrict commands to public network domains
macOS: set sandbox.network to true and sandbox.network_domains to a map.
{"example.com":"allow","*.example.org":"allow","blocked.example.org":"deny"}
- Exact hosts and
*.example.org(subdomains at any depth, excluding the root). Deny wins. An empty map blocks every destination;nullkeeps the existing network switch. - Private, local, multicast and reserved IPs stay blocked even when a hostname is allowed. All DNS answers are checked and the connection uses a checked address.
- Each command gets an authenticated local proxy; the sandbox prevents direct connections, including clients ignoring proxy settings. HTTP on 80 and HTTPS CONNECT on 443; clients need ordinary HTTP proxy settings.
- Rules authorize destinations, not encrypted HTTPS methods or contents. No TLS interception, SOCKS/UDP, arbitrary ports, local network or upstream proxy chaining. No chunked HTTP uploads or plain HTTP Upgrade; HTTPS tunnels carry HTTPS and WSS.
- Proxy and connections close when the command ends or is cancelled.
- Linux and Windows/WSL reject a configured domain policy rather than run unrestricted. A missing sandbox also rejects it, even with the unavailable policy at
warn. Turning Sandbox off disables its restrictions. - Affects sandboxed commands, not the host's model-provider requests or other tool transports.
Auto review
| Rule | Value |
|---|---|
| Input | The complete operation, shell commands included, up to 64 KiB. Oversized input or an unavailable classifier refuses rather than approving a truncated prefix. |
| Timeout | 30 seconds per model candidate |
| Invalidated by | Changed arguments or live permission policy. Explicit deny rules keep precedence. |
| Repeated risk refusals | Three consecutive or twenty cumulative offer an authenticated interactive owner approval of that exact operation: one operation, original arguments, working directory, permission version and file preconditions. Deny rules and hard restrictions still apply. |
| Counts | Per session and permission version. An allowed or approved operation resets consecutive; approval after the cumulative threshold also resets the total. Classifier outages, invalid responses and cancellation do not count. Durable identities prevent double counting after resume; concurrent updates use the execution database transaction. |
| Non-interactive task | Receives the refusal and may continue other allowed work |
| Failure limit | Risk refusals do not consume the repeated execution-failure limit. Outcomes recorded by the host survive checkpoint recovery. |
Interrupted operations
| Control or case | Behaviour |
|---|---|
| Stop | Interrupts pending model and asynchronous tool work. Once the producer exits the turn is stopped, even with an unknown external outcome, which stays visible in Activity. |
| Pause | Waits for the current operation to reach a resumable boundary and reports the pending request |
| New owner turn, Bypass permissions or Auto | Inherits no approval requirement from an interrupted turn. Old effects stay recorded as unknown and are not replayed. Explicit deny and ask rules still apply. |
| Unknown earlier step | The next non-inspection tool result starts with a notice naming it, once per execution. Nothing is held back; the model decides what to check. |
| Resuming the same execution | Still needs reconciliation or exact approval |
| Screen step | An interrupted computer_use step tells the agent its outcome is unknown; it looks and goes on, and the step stays in Activity. A step that never reached the app (element hidden or gone, or stopped while it waited for another agent to finish) counts as not started. |
None of this changes macOS access or makes a read-only volume writable.
System access
macOS permissions are separate from modes: a mode cannot grant them. One registry covers screen recording, Accessibility, Automation, Calendar, Reminders, file read and write, microphone and camera. Settings, the CLI/TUI doctor, GUI preflight, durable system-access waits and the HTTP endpoint read it. Each row has status, identity checked, the operation needing it and whether the platform can request it.
| Status | Meaning |
|---|---|
granted | Fresh check by the current named executor |
not_granted | Confirmed missing |
unknown | The host could not prove the state; not a denial |
unavailable | Native dependency missing; not a denial |
unsupported | That backend has no implementation |
| Action | Effect |
|---|---|
GET /api/system/access | Non-prompting checks only |
| Settings → Devices → This computer | Lists the permissions that can be switched on, each On or Turn on; it needs the local owner's click. Screen recording and Accessibility open their System Settings page with a small window to drag OpenProgram into the list; it closes once the switch is on. |
| Never prompts | Reconnects, polling, history replay, model output, startup checks, ordinary retries |
| Missing capability | Pauses only the operation that declares it; browser, other machines, headless and ordinary chat do not inherit it |
macOS asks for access again after an update
- App and named backend are signed applications that macOS can record separately. A similarly named entry (
python3,node, a cached app) proves nothing: installed products check and request through the signed runtime bundleai.openprogram.runtime; the outer App is not a second executor. - Automation is per target app, file access per selected path. Calendar, Reminders, microphone and camera can each need consent. Unselected apps or paths cannot be pre-authorized.
- App refresh, local packages and conversational self-update reuse a private identity in
~/Library/Application Support/OpenProgram/local-signing. Keep it when cleaning: it holds the signing keychain. Missing or damaged state stops the build rather than creating a replacement. - The first move from an old ad hoc build may need consent again; an old toggle can look on while macOS rejects the new signature. Use Request authorization. Accessibility and previously denied permissions may need System Settings.
- When a recorded grant belongs to an older verified identity, explicit setup renews that one capability once. Startup and ordinary checks never reset TCC records, accept dialogs or modify other applications.
- Local signing is for this computer's development builds; public apps need Developer ID signing and notarization.
Test rules
openprogram permissions check --rules rules.json --tool bash --args '{"command":"git status"}' --expect allow
openprogram permissions test --rules rules.json --cases cases.json
{"allow":["bash(git:*)"],"ask":[],"deny":["bash(rm:*)"]}
[{"tool":"bash","args":{"command":"git status"},"expected":"allow"}]
Rule file, then cases file.
| Aspect | Detail |
|---|---|
| Output | JSON lists matching rules in enforcement order: deny, ask, allow. unmatched: no supplied rule applies. |
| Exit status | 0 match, 1 mismatch, 2 invalid input. check without --expect returns 0 for any valid decision. |
| Scope | Only the supplied rules. No live configuration, risk classifier, approval, or bypass of hard restrictions and the OS sandbox. Nothing is executed. |
Tools · Web · Terminal · Sandbox architecture