| ask | auto | plan | full |
|---|---|---|---|
| asked | asked | refused | allowed |
The tools
| Tool | When |
|---|---|
bash | Always — one command, or a list of them. |
terminal | Only { action: "kill" }. Listing and reading output are read. |
Why auto does not open it
Every other category has a boundary the engine imposes: a path cannot leave the workspace, a storage is one you passed, an address is checked. A command has none — it runs with whatever the account on that machine can do, including everything outside the workspace. It is the one tool whose reach is the machine's, not the agent's.
What exactly is approved
| Call | The key |
|---|---|
bash { command: "npm test" } | that command, exactly |
bash { commands: ["npm ci", "npm run build"] } | the whole sequence, joined — approving it does not approve either one alone |
terminal { action: "kill" } | the tool, for the session |
The user saw three commands and said yes to those three in that order. Letting any one of them run alone later would be approving something they never read.
Where « always » goes
| Case | Remembered |
|---|---|
| A single command on a real computer | In ~/.iagenify/permissions.json — across sessions and applications |
| A sequence of commands | For the session only |
| A shell supplied by your application | For the session only |
terminal kill | For the session only |
Only the first is durable, and deliberately so: a one-off sequence, and a shell that is not this machine's, have no business in a permanent list on this computer.
A narrow allow list
const SAFE = /^(npm (ci|test|run (build|lint))|git (status|diff|log)( .*)?)$/;
onPermission: async ({ category, args }) => {
if (category !== "exec") return "once";
const command = args.commands ? args.commands.join(" && ") : args.command;
return SAFE.test(command) ? "once" : "deny";
}import re
SAFE = re.compile(r"^(npm (ci|test|run (build|lint))|git (status|diff|log)( .*)?)$")
def on_permission(request):
if request["category"] != "exec":
return "once"
return "once" if SAFE.match(request["args"].get("command", "")) else "deny"Return once rather than always when you are matching on the arguments: always on a command writes that command to disk, which is fine, but the pattern above is what keeps the decision in your code.