How to Check AI Agent Permissions in Multi-Agent Workflows

How do AI agent permissions change in a multi-agent workflow?
A read-only role does not describe everything an agent can reach in a multi-agent workflow. Once your planner agent can hand tasks to a coding agent, it can get code written and tests run, even though it has no write tool of its own. Permissions add up across handoffs. II Agent Runtime works this out before anything runs: it maps which agent can wake which, and warns you about everything an agent can reach through the others.
In our live run, the runtime flagged that a read-only planner could reach the coder's write access before either agent started. The run then took exactly that path: the planner handed off, and the coder wrote with its own access.
Key takeaways:
- Permissions add up across handoffs. A planner with no write tool can still get files written and tests run by handing work to a coder.
- II Agent Runtime maps it before anything runs. It reads how your agents are wired, follows every chain of handoffs, and warns you what each agent can reach through the others.
- The map is the real wiring. The declaration the analysis reads is the same one that routes the handoff, so the warning describes what actually runs. In our live run, the handoff took exactly the path the warning named.
- It warns, and you decide. The analysis leaves your runs as they are and tells you what each handoff really grants, including tools whose effects you haven't declared.
- Each agent gets its own gateway. Your OpenAI key stays out of both agents, and each one has its own request and spend limit.
Clone it yourself
We have a tool that does exactly this. You need Node 22.16 or later, Git, and an OpenAI API key.
git clone https://github.com/intelligent-iterations/ii-agent-runtime.git
cd ii-agent-runtime
npm ci
cd example/subagent-handoff
npm ci
export OPENAI_API_KEY=...
npm run demo
The demo runs a planner and a coder on a small sample project with a failing test. It prints the runtime's warning first, then every tool call the agents make.
How do permissions add up across agents?
Splitting work between agents is a common way to keep each one small. A planner reads the code and decides what to change, a coder makes the change, and later a reviewer or a deployer might take over. Each agent gets only the tools for its job, so each one looks safe on its own.
But agents wake each other up. The planner's handoff tool creates a task, and that task starts the coder with the coder's own tools. Whatever the coder can do, the planner can now cause. If the coder could hand off to a deployer, the planner could reach deployments too, two steps away.
Agent 1
Planner
- Granted
- Read files, run the tests
- Not granted
- Writing anything
- Can call
handoff-to-coder
Agent 2
Coder
- Granted
- Write files, run the tests
- Woken up by
- The planner's handoff
Indirectly
What the planner can cause
- Write files
- Through the coder
- Run the tests
- Itself, and through the coder
What does II Agent Runtime show you?
Before any agent starts, the runtime's invocation analysis reads how your agents are declared. Each tool says what it triggers: the planner's handoff tool creates a task. Each agent says what wakes it up: the coder starts on that task. The runtime matches the two, follows every chain, and reports what each agent can reach without being granted it:
Based on declarations, planner can potentially activate coder via handoff-to-coder; write-file is indirectly reachable (declared).
The same declaration routes the real handoff, so the warning describes the wiring that actually runs. Each finding is marked declared, conditional or unknown. It's conditional when you've declared a condition on the way, such as human approval, and unknown when the declarations can't settle whether a handoff would match. A tool whose effects aren't declared at all is flagged too, because the analysis can't tell what it triggers.
It warns, and you decide. The analysis leaves your runs and grants exactly as you set them, and tells you what each handoff really grants.
Planner on its own
- Read filesgranted
- Run the testsgranted
- Hand off to the codergranted
- Write filesnot granted
What you'd think the planner can do.
Planner, counting the coder
- Read filesgranted
- Run the testsgranted
- Hand off to the codergranted
- Write filesvia coder
What the runtime reports it can reach.
Did the warning match what actually ran?
Yes. We ran the demo on November 4, 2026, with gpt-5.6-terra. The runtime printed the warning above before either agent started. Then the run followed the same wiring: the planner called handoff-to-coder, that woke the coder, and the coder wrote the change with its own write access. The warning described the run before it happened.
Live run · Nov 4, 2026
Setup
- Command:
npm run demoon the tool's bundled sample, from a self-hosted macOS runner - Model:
gpt-5.6-terrathrough the runtime's model gateway, one gateway per agent run - Cost: OpenAI reported 24 requests and 1,126 output tokens across the demo's four agent runs
Warned
Before either agent starts.
- planner wakes coderdeclared
- write-filereachable
- agents started0
From the declarations alone.
1 path found
Ran
What the agents actually did.
- planner hands off200
- coder wokenyes
- coder writes200
Along the path the warning named.
✓ same path as warned
Supervisor
Keep the key and the bill in check.
- key in agentsnever
- per agent run16 req, $1
- whole demo24 req
Each agent talks only to its own gateway.
$0.07 total model cost
What doesn't it cover?
The warning sees the handoffs you declare, so declare every way your agents can wake each other.
The gateway is the only enforced boundary. In this tool, both agents are ordinary local Node processes with no filesystem or network isolation, so anything else running as your user is outside its control. For isolation, run agents in the runtime's isolated containers, as the Cloud Logging tool does.
Frequently asked questions
What if I want the planner to hand off anyway?
Keep it. If a person should approve each handoff, declare approval as a condition: the warning then reports the path as conditional, and your application enforces the approval.
Can I check my own agents without running them?
Yes. The analysis works offline from your declarations alone: your agents, the tools they can call, what each tool triggers and what wakes each agent. It starts nothing and resolves no credentials.
Can either agent see my OpenAI key?
No. The key stays in the supervisor process, and each agent talks only to its own gateway, which caps it at 16 model requests and $1.
Built on II Agent Runtime
This is II Agent Runtime's invocation analysis and its per-agent gateways. Try it yourself: