Summary
A restricted coordinator can launch an explicitly authorized worker with exec, but launching another worker from a verified completion continuation records the coordinator’s local execution denials in the new worker’s delegated deny floor. The second worker cannot execute.
Please confirm whether this is an intended limitation or a defect, and whether there is an officially supported continuation pattern or existing fix. We do not want to remove inherited/sender restrictions or enable execution on the coordinator.
Environment
- Official source commit:
6f88c26dcf823a6d5c99a6053316829edc1a6512 - macOS arm64, Node 24.22.1
- Source-built installation, Gateway on the same machine
- Gateway-native local subagents; OpenAI-compatible fallback execution
- Explicit
allowAgentsanddelegateToolsTogrants remain configured.
Observed behavior
- Ordinary coordinator request launches worker. Worker’s persisted
delegatedToolPolicy.denyexcludes coordinator-localexec/process/editdenies. Real execution succeeds. - Coordinator calls
sessions_yieldand receives completion. - Coordinator launches a new authorized worker. Its persisted
delegatedToolPolicy.denynow includes the coordinator-local denies. - New worker cannot discover
exec; subsequent attempts report execution outside the completion requester’s authority. Switching worker or language does not resolve it.
Offline reproduction
This uses existing fixtures in src/agents/delegated-tool-policy.test.ts at the commit above. Append this diagnostic in that file (no live account, model, channel, or production state required):
it("compares ordinary and completion successor delegation floors", () => {
const cfg = config();
const ordinary = prepareFloor(profile(cfg));
const wake = profile(cfg, {
sessionId: "parent-id",
modelProvider: "test",
modelId: "model",
preparedSessionCapabilityStore: { [child]: entry() },
inputProvenance: {
kind: "inter_session",
sourceSessionKey: child,
sourceTool: "subagent_announce",
},
trustedInternalHandoff: {
kind: "subagent-completion",
sourceSessionKey: child,
targetSessionKey: requester,
targetSessionId: "parent-id",
provider: "test",
model: "model",
},
});
expect(wake.policy.requesterPolicySource).toBe("completion-handoff");
const resumed = prepareFloor(wake);
expect(ordinary?.deny).not.toContain("exec");
expect(resumed?.deny).toContain("exec");
});
The 23 existing assertions and this diagnostic passed in isolation. Diagnostic output:
{
"ordinary": {"policyAgentId":"front","deny":[]},
"resumed": {"policyAgentId":"front","deny":["exec","write","edit","apply_patch"]}
}
This demonstrates the difference, not a successful repair. The live workflow used an actual yield; the synthetic diagnostic above uses the existing trusted-completion fixture and does not independently exercise the full settle-batch lifecycle.
Suspected path, not a maintainer-confirmed root cause
requester-tool-policy.ts restores requesterDeny on completion. prepareDelegatedToolDenyFloor subsequently includes inheritedToolPolicyForSpawn, so replayed coordinator-local restrictions become nonlocal restrictions for the next handoff.
Expected constraints
- Coordinator remains unable to execute.
- Current explicit target grant can support subsequent authorized handoffs.
- Genuine global/provider/sender/sandbox/ancestor restrictions remain enforced.
- Existing child envelopes must not be cleared or silently widened.
- Grant revocation remains effective.
Related documentation and changes
- Sub-agent tool policy - OpenClaw
- Subagent yield handoff - OpenClaw
- Merged fix: restricted intake agents cannot delegate coding work by roboclaw-bot · Pull Request #168085 · openclaw/openclaw · GitHub establishes the explicit delegation contract.
- Blocked, unmerged fix: let cross-agent coding sessions use their own tools by steipete · Pull Request #168613 · openclaw/openclaw · GitHub is not being used as a workaround.
- Related catalog-stability commit fix(agents): keep tool catalogs stable across completion wake turns (… · openclaw/openclaw@e4d101a · GitHub documents preserved execution/descendant restrictions; we have not established that it fixes this case.
No credentials, account identifiers, group identifiers, business documents, or production transcripts are included.