Harness Notes

Permissions

Updated 2026-11-25,

On this page

How to stop an agent doing something, and what each harness gives you to control it. Permission rules decide what the agent may do; a sandbox limits what a command can reach even when it is allowed.

Block a command, for example git push

pi
How

An extension that blocks the tool call

Only with an extension

File.pi/extensions/block-git-push.ts
Example
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
import { isToolCallEventType } from "@earendil-works/pi-coding-agent";

export default function (pi: ExtensionAPI) {
  pi.on("tool_call", async (event) => {
    if (isToolCallEventType("bash", event) && /(^|[;&|]\s*)git\s+push\b/.test(event.input.command)) {
      return { block: true, reason: "git push is blocked by policy" };
    }
  });
}
How it matches

extension-defined string matching over bash tool input

What wins

no native policy precedence; extension ordering and later input mutation matter

Watch out for

Stock pi has no declarative deny rule or built-in sandbox.

The extension owns shell parsing and must explicitly cover wrappers, interpreters, aliases, and scripts.

Project extensions load only after project trust.

What you can control

pi
Decisions

None built in

Permission rules

Not supported

Stock pi has no built-in tool permission model; extensions run with the user's authority.

Docs
Sandbox

Not supported

No built-in execution sandbox is claimed.

Approval prompts

Not supported

An extension must implement its own approval UI and policy.

Skills granting tools

Not supported

Hooks that decide

Only with an extension

tool_call, tool_result

An extension can implement a permission gate, but it must emit its own evidence.

Docs
Where rules liveNo permission settings

Sources

pi