v3/docs/adr/ADR-374-dream-cycle-swarm-subagent-permission-delegate.md
Status: Proposed
Authors: claude (dream-cycle agent, 2026-07-24)
Related: Dream Cycle 2026-07-24, arXiv 2606.31174 (ClawArena-Team)
The ClawArena-Team benchmark (arXiv 2606.31174, 2026) evaluated 41 subagent orchestration scenarios across 258 rounds and found:
Ruflo's current swarm init spawns subagents with no formal permission delegation protocol. Each agent inherits the full capability set of the invoking session. This is equivalent to running all swarm workers as root — it violates least-privilege, makes audit trails impossible, and is the exact failure mode ClawArena-Team identifies as the bottleneck.
Add a SubagentPermissionDelegate protocol to swarm init that:
pre-task, pre-edit) before any file system or MCP tool access.swarm/permission-audit.jsonlinterface SubagentCapabilityToken {
agentId: string;
swarmId: string;
role: AgentRole; // 'coder' | 'reviewer' | 'tester' | ...
allowedPaths: string[]; // glob patterns, e.g. ['src/**', 'tests/**']
allowedTools: string[]; // e.g. ['Read', 'Edit', 'Bash']
denyTools: string[]; // e.g. ['git push', 'npm publish']
expiresAt: number; // epoch ms
}
swarm init --with-permissions flag enables the protocol (opt-in initially)@claude-flow/security's InputValidator validates token at hook boundaries@claude-flow/hooks pre-task hook enforces allowedTools checkconfig/swarm-permission-defaults.jsonPositive:
Negative:
--with-permissions becomes default in a future minor releaseNeutral:
isolation: 'worktree' mode already implemented.no ADR classification does NOT apply: this is an architectural protocol change, not a parameter tweak