EngineeringSecurity

Agent tool permissions: reads, writes and approval

July 29, 2026 · Oyren AI Team

A coding agent can read a repository, change files, run commands and call external services. Those actions carry different risks. A useful permission policy names the action, the resource it can reach and the point where a person must approve it.

Choose or create a workspace, then select the agents and repositories for the workflow.

One decision for each capability

Start with the operations a task actually needs. A documentation edit may need file reads, a write to one directory and a test command. It does not need a deployment credential or permission to push a branch.

CapabilityBoundary to checkApproval point
CapabilityRead filesBoundary to checkWhich paths, including secrets, can the tool open?Approval pointBefore access to sensitive paths
CapabilityEdit filesBoundary to checkWhich paths can change, and who owns them?Approval pointBefore a write outside the approved scope
CapabilityRun commandsBoundary to checkWhich subprocesses and services can run?Approval pointBefore a command that expands access
CapabilityCall an APIBoundary to checkWhich destination and account can be used?Approval pointBefore a new service or credential is added
CapabilityPublishBoundary to checkCan the agent push, deploy or merge?Approval pointBefore the external change

The table is a planning checklist, not an Oyren configuration schema. The effective policy comes from the selected agent and the environment where it runs.

Scope at the tool boundary

An instruction such as "edit only this folder" describes the task. The tool executor still needs to enforce the path boundary. A relative path, symlink or subprocess can reach outside the intended folder if the executor accepts it without checking the resolved target. A workspace name in a prompt does not restrict operating-system access.

For a shared repository, separate the agent's working directory from credentials and other users' files. Give the task only the credentials and network destinations it needs. A later request for broader access becomes a visible decision, with a reason attached to the run.

Approval and the activity record

Approval should identify the operation waiting to run. "Allow file edits in this directory" is narrower than "allow all tools," and a push or deployment deserves its own decision. Record the command or tool call, the target, the decision and the result. That record lets a reviewer distinguish a denied attempt from a successful change.

Revocation matters during long sessions. If a policy can change while an agent is running, the executor must check the current policy on each affected call. A one-time check at login cannot enforce a later revocation.

A small trial before unattended work

Use a disposable repository to test an allowed read and edit, a denied write outside the approved directory and a denied publishing action. Keep the observed results with the starting commit and final diff. The trial shows what the configured tools actually enforce on that host.

An Oyren Codespace provides a Linux terminal and browser VS Code. The agent launched there has its own permission settings, and the host has its own filesystem and network controls. The sandbox permissions guide gives a fuller inventory for unattended runs.

Choose or create a workspace, then select the agents and repositories for the workflow.

Open Codespace setup

Supervised agent loops with human checkpoints