Skip to content

[Bug] sessions_spawn zeroes target agent tools by intersecting requester's effective deny (2026.6.5 regression) #92189

Closed as not planned

Description

@rhomat27

Summary: Spawning a subagent via sessions_spawn fails because the requester's effective tool deny is intersected with the target agent's allowlist, leaving the child with no callable tools.

Version: OpenClaw 2026.6.5. This worked correctly in 2026.5.7.

Config: The official delegate-architecture pattern — the requester agent has web_search, web_fetch, and browser in tools.deny; the target web agent has those same tools in tools.allow; and the requester carries subagents.allowAgents: ["web"].

Symptom: The spawn fails at precheck with "No callable tools remain after resolving effective tool allowlist". The web agent never starts.

What was tried: Adding tools.alsoAllow at the root layer — this was reverted and is not the blocker.

Hypothesis: The GHSA final-policy pass appears to intersect the requester's effective toolset with the target agent's allowlist, which zeroes out the child's tools whenever the requester intentionally denies what the target is meant to allow.

Likely related: #85030 (MCP tools not injected into subagent sessions) and #84811 (stale allowlist/spawn validation).

Activity

  1. clawsweeper commented on Jun 11, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

    Close as a duplicate: current main still enforces non-escalating inherited tool policy, and the remaining requested behavior is already tracked by the open delegate-only/self-deny design issue rather than needing a separate bug thread.

    Canonical path: Keep #44253 as the canonical place to design an explicit delegate-only/self-deny policy that preserves deny-wins semantics.

    So I’m closing this here and keeping the remaining discussion on #44253 and #89658.

    Review details

    Best possible solution:

    Keep #44253 as the canonical place to design an explicit delegate-only/self-deny policy that preserves deny-wins semantics.

    Do we have a high-confidence way to reproduce the issue?

    Yes. Source inspection shows the requester's filtered effective allowlist is stored on the child and later read as inherited tool policy; a requester deny for the target-only tools can therefore leave the target allowlist with no callable matches.

    Is this the best way to solve the issue?

    No, not as a standalone bug fix that lets target allowlists override requester denies. The safer solution is the already-open delegate-only/self-deny design discussion, because changing inherited tool semantics is a security-sensitive product decision.

    Security review:

    Security review needs attention: The issue is security-sensitive because any fix must not let target allowlists silently launder tools denied to the requester.

    • [medium] Preserve deny-wins semantics — src/agents/subagent-spawn.ts:1337
      A fix should make delegate-only/self-deny explicit and audited instead of allowing a target agent allowlist to override the requester's normal deny policy.
      Confidence: 0.87

    AGENTS.md: found and applied where relevant.

    What I checked:

    Likely related people:

    • vincentkoc: Public PR review/history for the inherited allowlist boundary traces the child-session inherited allow/deny policy to commit 984c3de. (role: recent area contributor; confidence: medium; commits: 984c3ded9a34; files: src/agents/subagent-spawn.ts, src/agents/agent-tools.policy.ts, src/agents/embedded-agent-runner/effective-tool-policy.ts)
    • steipete: Recent GitHub path history shows repeated agent tool assembly, subagent spawn, and policy documentation work, and he reviewed the canonical delegate-only issue. (role: adjacent owner and reviewer; confidence: high; commits: 523537a627a8, 3894fe11caa0, 60e0d2a7b910; files: src/agents/agent-tools.ts, src/agents/subagent-spawn.ts, src/agents/agent-tools.policy.ts)
    • lanzhi-lee: Recent subagent-spawn history includes in-process spawn dispatch work on the same launch path that any delegate-only fix must preserve. (role: recent area contributor; confidence: medium; commits: 58bab0c2761e; files: src/agents/subagent-spawn.ts)

    Codex review notes: model internal, reasoning high; reviewed against af091174dbaf.

  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    on Jun 14, 2026
  3. locked as resolved and limited conversation to collaborators on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions