Skip to content

fix: restricted intake agents cannot delegate coding work - #168085

Merged
roboclaw-bot merged 7 commits into
mainfrom
openclaw/diagnose-and-fix-split-teams-failure
Oct 10, 2026
Merged

roboclaw-bot merged 7 commits into
mainfrom
openclaw/diagnose-and-fix-split-teams-failure

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: a restricted intake agent can start a coding session, but its local command/file denials leave that coding session unable to implement the requested change.

User Impact

Operators can explicitly authorize native handoffs to exact coding agents with agents.entries.<intake>.subagents.delegateToolsTo, alongside allowAgents, without enabling those tools on the intake agent. Existing configurations and previously created children keep their original restrictions.

The initial handoff requires a deny-only Gateway-native requester and local placement. Restrictive allowlists, sender restrictions, sandbox boundaries, and target policy remain enforced. ACP is unchanged. Unsupported mediated/cloud handoffs and worker execution of an active grant refuse rather than silently start an unusable or insufficiently guarded run. No live deployment or configuration change is included.

Why This Change Was Made

Keep an explicit target grant separate from the original requester snapshot. Only the requesting agent's local deny layer can be waived; nonlocal denials survive even when they name the same tool. Same-grantee helpers retain the root-bound grant, completions retain their per-edge requester snapshot, and grant removal restores the fallback. Retained tools recheck live authority before effects, including after preparation and file-I/O waits. Already-started effects are not rolled back.

The config baseline grows by two schema nodes for this opt-in array and its item. This is intentional: changing allowAgents alone would silently widen existing delegation authority. There is no database schema/version change or inferred upgrade of legacy session rows.

Evidence

Current repair head: 7e2c4a2. The merge conflict against main bc8f693 is resolved, retaining the reviewed abort-aware catalog-renewal fixture. The independently landed upstream fallback projection repair (#168078) supersedes our temporary workaround, which is removed rather than retained as a second owner. Historical checks below remain labeled with their tested inputs; final-head hosted CI/review remain separate gates.

  • Original visible-spawn regression failed with the intake's exec, write, edit, and apply_patch denials retained (8.21s wrapper time).
  • Integrated focused suite: 96 tests passed across policy, persisted completion, visible spawning, CLI projection, and worker topology (131.81s wrapper time).
  • Final authority repairs: 62 tests passed, including plugin/family denial expansion, a paused real host write, existing-session worker refusal, and initial worker refusal/replay (114.07s wrapper time).
  • Production and all 27 core-test typecheck graphs passed; affected graphs were rechecked after the authority repairs. Changed-file lint passed with zero warnings/errors. Native schema, database-first, import-cycle, media/sidecar, webhook/auth, docs config examples, and docs link guards passed.
  • Independent source review and autoreview findings were repaired. Autoreview's final index-only finding is resolved by staging the integration together before commit.
  • The isolated X composition test passed: real ingress, admission, tool assembly, sessions.create/SQLite, child file write and command execution, anonymous HTTP read, guest denial, and separate deferred delegation/publication revocation. Assertions: 8.195s; Vitest including compilation: 84.17s; isolated QA build: 288.5s. HTTPS/model boundaries are deterministic, not live X credentials. The fixture remains release-only (0 added ordinary unit-CI seconds); hosted CI timings are not yet available.

Integration at 5aa6d54bb80db8ba29efcd670ab9c4b90c1c4029 resolves the two generated config-baseline conflicts against main 4ac1a8028b3. The owning generator refreshed them; the upstream memory-flush restriction is preserved. All 132 selected regressions passed (136.51s), including the memory-flush sibling, and the unchanged full X composition passed again on the integrated source (7.921s assertions, 66.03s Vitest). Core typecheck, config baseline validation, and affected lint passed.

Original-base validation observations: the broad dead-export scan reports untouched isTelegramReadOnlyControlLaneText and the unused model-selection.ts re-export of resolveContextTokens. One isolated QA build also produced an unparseable bundled TypeBox FromCyclic declaration; identical production inputs built successfully in adjacent runs. This is recorded as an unresolved build-tool failure, not claimed fixed by a passing replay.

Final conflict-resolution head also passes core typechecking and the complete isolated X production-owner composition: 8.806s assertions / 86.90s Vitest, QA runtime build successful, outer exit 0 and container absence confirmed. This re-exercises the updated public entry path, actual child command/file effects, guest denial, and independent delegation/publication revocation on the merged source. Deterministic transport/model boundaries remain as disclosed.

CLI/plugin mediated final effects

The new src/agents/harness/mediated-delegation-effects.test.ts runs both the production CLI authenticated loopback-HTTP path and generic plugin-harness dispatch against real command/file owners. The grant-dependent tools launch a real command and write a file; sender-restricted calls launch nothing; revocation during command preparation or after descriptor opening prevents the final effect. Reconstructed tools restore the deny fallback while retaining read access.

Eight tests pass on 5aa6d54 plus the behavior-preserving import-cycle repair and regenerated prompt snapshots: pnpm test src/agents/harness/mediated-delegation-effects.test.ts --maxWorkers=1, 21.73s wall / 17.67s Vitest / 4.229s test cases. The owning test-type graph, scoped lint, formatting and whitespace checks pass. Hosted CI seconds are not yet available for this addition. Test-file SHA-256: 9838af1ba7457c396722cb9a10f0cb7f6c661e369aa2ae461797919de853f045.

This is real mediated-boundary/final-effect proof, not a vendor CLI subprocess, live model-provider or Codex CLI run. Exec policy is full/off: revocation is tested during preparation and final file I/O, not an interactive approval queue. The sender-source fixture tests the persisted policy boundary; existing X composition tests cover actual ingress and spawn creation.

Sanitized traces emitted by the passing run
{"route":"cli-loopback","trace":["native=[]","supervisor:spawn-requested","supervisor:launched","exec:completed","mcp-client:exec:ok","write:completed","mcp-client:write:ok"],"launches":1,"finalFile":"write-effect","resumed":{"exec":false,"write":false,"read":true}}
{"route":"cli-loopback","stage":"sender-denied","trace":["native=[]","mcp-client:exec:error","mcp-client:write:error"],"launches":0,"finalFile":"original"}
{"route":"cli-loopback","stage":"command-preparation","trace":["native=[]","command-preparation:waiting","delegation:revoked","command-preparation:released","exec:failed","mcp-client:exec:error"],"launches":0,"finalFile":"original","denied":"tool invocation authority is no longer active"}
{"route":"cli-loopback","stage":"file-open","trace":["native=[]","file-open:waiting-before-mutation","delegation:revoked","file-open:released","write:failed","mcp-client:write:error"],"finalFile":"original","denied":"tool invocation authority is no longer active"}
{"route":"plugin-harness","trace":["supervisor:spawn-requested","supervisor:launched","exec:completed","write:completed"],"launches":1,"finalFile":"write-effect","resumed":{"exec":false,"write":false,"read":true}}
{"route":"plugin-harness","stage":"sender-denied","trace":["exec:failed","write:failed"],"launches":0,"finalFile":"original"}
{"route":"plugin-harness","stage":"command-preparation","trace":["command-preparation:waiting","delegation:revoked","command-preparation:released","exec:failed"],"launches":0,"finalFile":"original","denied":"Error: tool invocation authority is no longer active"}
{"route":"plugin-harness","stage":"file-open","trace":["file-open:waiting-before-mutation","delegation:revoked","file-open:released","write:failed"],"finalFile":"original","denied":"Error: tool invocation authority is no longer active"}

Latest-stable produced-data compatibility

A secretless, network-disabled rootless container used the actual published 2026.9.9 package (bcfc88812a35243893585dbeca87ca41b48272ca, npm latest live-resolved and rechecked) to produce config, SQLite sessions and two native child rows. Candidate 5aa6d54bb80db8ba29efcd670ab9c4b90c1c4029 built successfully with pnpm build (235.9s), then its real Doctor migrated copied stores: state 19→20, both agent databases 24→25. All three candidate CLI preflights returned exact, integrity ok.

Both child rows remained byte-identical, including inherited allow/deny lists, creation attribution, parent/completion links, IDs and revisions. After adding an explicit candidate grant and cold-loading in another container, neither old child acquired delegatedToolPolicy, both resolved from persisted-child, and exec remained excluded. All preexisting settings values stayed unchanged; the whole config file is not byte-identical because Doctor added its webhook migration stamp, four wizard metadata fields, and 31 disabled-unavailable-skill entries.

Scope: real stable-produced state → candidate Doctor/admission/read/policy owners. Not a published updater-installation/service-replacement/Gateway-readiness/inference test. Stable's private native-child persistence function was exposed through an export-only loader adapter; its body and installed package bytes were unchanged. Stable does not stamp the present-day sender-source flags, so this does not prove retention of an already-present sender flag. An auxiliary parent's hand-supplied legacy webchat origin normalized under the existing migration; it is not external-sender-provenance proof.

Compatibility commands and exact row results

Pinned image: sha256:2c1f4e0fd6450f43ddb46d60c2a6df30855a8588e165b1f2559fb0eda8d7ff35; Node 24.20.0; read-only rootfs, no network, capabilities dropped, no operator state or credentials mounted. All task containers were removed.

published stable config writer + createInitialSubagentSession → original SQLite
candidate database preflight → migration-required (expected)
candidate doctor --fix --non-interactive → migrations complete
candidate database preflight / preflight-agent → exact; integrity=ok (all 3 stores)
candidate read + policy projection, after migration → pass
candidate read + policy projection, after explicit grant → pass
candidate cold-container read + policy projection → pass

Deny-only row SHA-256 before = after:
318223fac82e9aabcd9730ddc237f28437016379a3b26588089e0801be699414
  deny=[exec,write,edit,apply_patch]
  projected=[read,browser,sessions_spawn]; delegatedToolPolicy absent
Allow+deny row SHA-256 before = after:
37ee405fb3fa946a10f7147e24e66cb13b69a0ff4b6eb6395f9bc0ea9c055df4
  allow=[read,sessions_spawn,exec]; deny=[exec,browser]
  projected=[read,sessions_spawn]; delegatedToolPolicy absent

The schema migrations are existing base changes, not delegation-specific schema additions. Doctor could not perform an optional btrfs NOCOW rewrite because the image lacked GNU mv options; those stores stayed in place and the schema/integrity/retention checks above still passed.

CI repairs and retained failures

The static import cycle is removed by relocating the unchanged deny-floor projection and sharing its narrow context contract. Both cycle guards pass. The five changed prompt snapshots were regenerated through their owner and the snapshot check passes. The catalog-renewal fixture no longer starts an extra explicit refresh while trying to join expiry renewal; this repairs the stale test contract introduced with #168050 without changing production refresh semantics.

The earlier CI run 38016450576 exposed a preexisting command-RPC fallback defect: the backup was selected, then retry decoration tried to recapture the immutable user prompt after provider dispatch. A temporary attempt-owner repair reproduced red-to-green behavior (116 tests at the earlier baseline), but main independently repaired the canonical prompt-state owner in #168078 / 22bca7d. This branch now uses that upstream owner unchanged and removes its temporary repair and representation-specific assertions.

Post-cutover validation on exact Node 24.19.0 passed all 71 cases across six files: 13 Gateway fallback cases, 11 durable projection cases, 31 requester/retained-authority cases, 8 mediated effects, and 8 visible-spawn cases. The projection tests require the canonical original plus an internal retry, exactly one persisted user row, and unchanged plain/enriched projections. Independent cutover review found no actionable issue. Vitest completed five shards in 261.68s; the outer wrapper subsequently timed out during its post-run container inspection (30s), so this is test success, not a clean wrapper exit. The task container was confirmed absent afterward. No tests were rerun merely to conceal that infrastructure failure.

Before the cutover, merged-head worker/topology/catalog proof had 73 passing cases and one assertion failure: our temporary test compared the last user-role item, which now intentionally represents the upstream internal retry. Restoring the three fallback files exactly to main removes the superseded workaround; it does not weaken the canonical projection guard or delegation authority.

Activation’s original CI early-settlement failure remains an investigated, unreproduced observation: complete baseline and candidate files pass on host Node 24.19.0, while a broader baseline host replay hit unrelated HTTP fixture failures and is not passing proof. Candidate container activation failed earlier at bind/auth admission, not the CI boundary. No activation fix is claimed from these passing replays. The integrated catalog/activation run passed 10/10 (111.75s wrapper); after the catalog listener-cleanup correction its five cases passed again (11.28s wrapper), with its owning type graph passing.

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 10, 2026 01:58
Preserve the full requester fallback while supporting explicit exact-target native delegation of agent-local deny policy. Keep completion snapshots and live effect authority; refuse unsupported worker and mediated handoffs.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 5064aef4-092a-4170-b0bf-331fbaef7511
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: XL labels Oct 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR lets operators authorize selected coding agents to use tools denied locally to their intake agent.

Example: The intake agent denies exec and write but grants delegateToolsTo: ["coder"] alongside allowAgents: ["coder"].

  • Before: The coding child inherits those denials and cannot implement the requested change.
  • After: A newly created local coding child can execute commands and write files while the intake remains restricted.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful and source-consistent with substantive authority and upgrade evidence; proof remains bounded to production-owner harnesses rather than a live full-runtime handoff.
Proof confidence 🦐 gold shrimp (3/6) Sufficient (logs): Inspected production-owner composition and sanitized CLI/plugin traces cover allowed child command/file effects, forbidden sender calls, deferred grant revocation before creation, and revocation before process launch or file mutation; model and external transport boundaries are deterministic, with no vendor CLI or live-provider claim.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: A deliberately restricted intake agent cannot hand implementation to a separately capable coding agent.
Reason: The maintainer-authored PR supplies direction for an explicit permission rather than weakening inherited restrictions by default.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a useful, maintainer-sponsored delegation capability absent from main, and no actionable introduced defect was found.

Priority: P2
Reviewed head: 7e2c4a2a73603717e0695aa683d0878569e0738c

Before merge

None.

Findings

None.

Agent review details

How this fits together

Agent policy assembly combines operator configuration and persisted session lineage into child tool availability and authority checks before command or file effects.

flowchart TD
  A[Operator configuration] --> B[Intake policy assembly]
  B --> C[Native spawn admission]
  C --> D[Persisted child policy]
  D --> E[Coding tool assembly]
  A --> F[Live grant check]
  E --> F
  F --> G[Command and file effects]
Loading

Technical review

Best possible solution:

Retain the explicit target grant, existing restriction fallback, and live effect checks through the normal landing gates.

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

Main preserves the intake's inherited deny ceiling, explaining the reported limitation; the supplied pre-fix regression corroborates it, and no target code was executed during this review.

Is this the best way to solve the issue?

The explicit operator grant is appropriate because changing allowAgents alone would weaken the established inheritance contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against bc524d890300.

Provenance checked

  • Inherited requester ceiling changes intended behavior with a stated reason (6c918ca: Prevent delegated sessions from obtaining a broader tool surface than their caller.)
  • Sender and completion policy keeps the original intent (3372088: Preserve trusted requester snapshots without reconstructing sender identity or lending authority to external requests.)
  • Restricted sender spawn boundary keeps the original intent (9698a5b: Prevent restricted senders from creating steerable visible sessions or crossing into another agent's workspace.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9698a5b adds src/agents/requester-tool-policy.ts:298 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9698a5b177c5; files: src/agents/requester-tool-policy.ts)
  • Josh Avant: Raw commit 3372088 adds src/agents/requester-tool-policy.ts:73 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 33720886c8a8; files: src/agents/requester-tool-policy.ts)

PR surface

Source +606, Tests +1490, Docs +54, Generated 0. Total +2150 across 57 files. Added test files: 4.

View PR surface stats
Area Files Added Removed Net
Source 37 640 34 +606
Tests 16 1683 193 +1490
Docs 2 55 1 +54
Config 0 0 0 0
Generated 2 3 3 0
Other 0 0 0 0
Total 57 2381 231 +2150

Review metrics

Metric Value Why it matters
Configuration surface One opt-in array; two schema nodes A separate exact-target grant avoids silently widening existing allowAgents configurations.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Enables a bounded, operator-configured delegation workflow without changing existing defaults.
  • merge-risk: 🚨 security-boundary: Introduces a deliberate cross-agent exception to local tool denials; the maintainer-authored design explicitly accepts this opt-in tradeoff and supplies denial and revocation evidence.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-10T02:07:54.902Z sha 9bb8aee :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-10T02:27:28.989Z sha 5aa6d54 :: needs real behavior proof before merge. :: [P2] Regenerate prompt snapshots for the changed spawn description
  • reviewed 2026-10-10T03:26:19.880Z sha 1a360f3 :: needs changes before merge. :: none

Reviewed October 9, 2026, 11:49 PM ET / October 10, 2026, 03:49 UTC (Revision 4).

Regenerate the two conflicting config baseline projections and preserve the upstream memory-flush tool restriction. Integrated delegation and X composition regressions pass.

Co-authored-by: steipete <[email protected]>
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 10, 2026 02:17
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 7e2c4a2a73603717e0695aa683d0878569e0738c
  • Maintainer: @roboclaw-bot
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/cli-runner/prepare-tool-policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/agents/delegated-tool-policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/agents/requester-tool-policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/gateway/worker-environments/worker-tool-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 10, 2026
roboclaw-bot and others added 3 commits October 10, 2026 03:12
Retain the reviewed abort-aware settlement fixture; preserve upstream fallback diagnostics.

Co-authored-by: steipete <[email protected]>
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 10, 2026
Remove the superseded retry-context workaround after integrating #168078. Retain upstream canonical projection and internal fallback continuation coverage.

Co-authored-by: steipete <[email protected]>
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@roboclaw-bot
roboclaw-bot merged commit 5e0066b into main Oct 10, 2026
155 of 156 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/diagnose-and-fix-split-teams-failure branch October 10, 2026 03:58
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 10, 2026
…68085)

* fix: restricted intake agents cannot delegate coding work

Preserve the full requester fallback while supporting explicit exact-target native delegation of agent-local deny policy. Keep completion snapshots and live effect authority; refuse unsupported worker and mediated handoffs.

Co-authored-by: steipete <[email protected]>

* fix: restricted intake agents cannot delegate coding work

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 5064aef4-092a-4170-b0bf-331fbaef7511

* fix: complete delegated execution proof and CI fixtures

Co-authored-by: steipete <[email protected]>

* fix: preserve admitted prompts across model fallback

Co-authored-by: steipete <[email protected]>

* fix: use upstream fallback projection owner

Remove the superseded retry-context workaround after integrating openclaw#168078. Retain upstream canonical projection and internal fallback continuation coverage.

Co-authored-by: steipete <[email protected]>

---------

Co-authored-by: steipete <[email protected]>
RomneyDa pushed a commit that referenced this pull request Oct 26, 2026
…turns (#183765)

* fix(claude-cli): let operators keep selected native Claude Code tools on managed turns

* fix(claude-cli): retire warm sessions while native descendants still run

Claude Code reparents a nested Agent when its foreground parent finishes, and a
subagent's background child can resume its Agent later. Neither holds the turn,
so a warm process kept them alive into the next admitted turn, where native
permission callbacks and the process MCP bearer resolve to that turn's
authority. Close the process instead when any Agent, Workflow, or
subagent-owned task is still running at turn end.

* docs(claude-cli): describe warm-process retirement for running native descendants

---------

Co-authored-by: VACInc <[email protected]>

Release adaptation: stable has no delegated-execution tool policy (#168085), so
managed native tools are dropped only for restricted senders, caller caps, and
workspace-only runs (docs, manifest help, and the SDK doc comment no longer mention
delegated execution); resolveCliRuntimeToolPolicy stays synchronous. The
descendant-retirement hunk lands on the #170322 task-ownership port. Tests are
ported into stable's structure: the delegation policy test becomes
prepare-tool-policy.managed-native.test.ts, the bootstrap file-access case moves to
prepare.bootstrap-file-access.test.ts, and the cli-runtime fixture harness is shared
via cli-runtime.harness.test-support.ts so task-ownership cases live in
cli-runtime.task-ownership.test.ts (keeps both files under the line cap). Adds a
subagent-owned and a reparented nested-descendant scenario. Adds the
plugins.entries.anthropic.config.managedNativeTools option (off by default).

(cherry picked from commit 3eeb12b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant