Skip to content

fix(agents): apply the fallback delegation gate to CLI-backend runs - #115405

Merged
Patrick-Erichsen merged 1 commit into
openclaw:mainfrom
MertBasar0:fix/delegation-capability-cli-loopback
Sep 1, 2026
Merged

Patrick-Erichsen merged 1 commit into
openclaw:mainfrom
MertBasar0:fix/delegation-capability-cli-loopback

Conversation

@MertBasar0

@MertBasar0 MertBasar0 commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Refs #92011
Related: #92271

What Problem This Solves

#92011 added a report_only delegation gate for fallback completion-report turns, but only the embedded attempt path applied it. CLI backends get their OpenClaw tools from the Gateway loopback MCP grant, so the runtime shape reported in #92271 could still see and call sessions_spawn and the other delegation launchers.

Change

  • Carry the attempt-local delegation capability in the minted loopback grant and include it in the loopback tool-cache key.
  • Forward the capability through the production HTTP request-context mapping before Gateway tool resolution.
  • Construct the final Gateway tool surface by applying the existing applyDelegationCapability after normal authorization and deny filtering, but before inherited and cron-creator authority are captured.
  • Derive inheritedToolAllowlist, cronCreatorToolAllowlist, availability descriptions, and returned tools from that same gated surface.
  • Wire both CLI fallback producers: runCliFallbackCandidate and the command-origin runAgentAttempt path.
  • Reuse the shared launcher set and report-only action narrowing instead of maintaining a second CLI-specific list.
  • Preserve plugin ownership metadata when report-only tools are wrapped.
  • Emit a debug record containing the removed and narrowed tools.

The capability is transported through an internal symbol-backed binding, not the public RunCliAgentParams contract. Only report_only creates the binding; unrestricted/primary runs omit it, preserving their prior grant shape.

Review findings addressed

  • The command-origin fallback path now stamps the same capability as the auto-reply fallback candidate.
  • The capability is no longer dropped by the explicit HTTP context mapping.
  • The CLI transport no longer expands the Plugin SDK declaration surface.
  • Primary/full runs no longer add an explicit full field to the grant.
  • Report-only gating now happens before inherited and cron-creator authority capture.
  • A focused resolver regression asserts both captured allowlists exclude delegation launchers and match the final gated surface.
  • Availability descriptions are computed after gating, so they cannot advertise launchers absent from the executable surface.

Scope

This PR closes the fallback CLI loopback surface. It deliberately does not wire the separate primary auto-reply CLI dispatch path in src/auto-reply/reply/agent-runner-cli-dispatch.ts, nor the opt-in cliBackendDispatch: "subscription-auth" orchestrator path. Those need separate plumbing and can remain follow-ups.

conversations_send / conversations_turn are also left unchanged. Whether unsolicited peer-conversation turns count as new delegation under report_only is a compatibility-policy decision rather than something this PR should decide implicitly.

Exact-head producer proof

Environment: macOS, Node v24.19.0, pnpm 12.1.0, exact head 3d04d908f3dabf832c62acc33111de6851b71e93.

The driver calls the real runAgentAttempt twice: a primary external-user control and a fallback completion report with { kind: "inter_session", sourceTool: "subagent_announce" }. A minimal CLI backend and harmless delegation-class plugin tool (llm-task) are installed through the production plugin registry with bundled MCP enabled. The tool's final effect is one append to an isolated marker file.

The real producer selects the CLI runtime, mints the grant, writes the strict MCP config, starts a real process-supervisor child, and passes its bearer token and capture key. Each child performs the MCP handshake and sends authenticated production HTTP tools/list / tools/call requests to /mcp. The driver does not call the grant builder, minting function, Gateway resolver, or capability gate directly.

head: 3d04d908f3dabf832c62acc33111de6851b71e93

=== primary external-user (real child PID 72154) ===
run completed              : true
child received token       : true
child received capture key : true
HTTP tools/list size       : 2
has llm-task               : true
has sessions_spawn         : true
llm-task call              : isError=false {"status":"recorded"}
delegation effects         : 1

=== fallback completion-report (real child PID 72175) ===
run completed              : true
child received token       : true
child received capture key : true
HTTP tools/list size       : 0
has llm-task               : false
has sessions_spawn         : false
llm-task call              : isError=true "Tool not available: llm-task"
sessions_spawn call        : isError=true "Tool not available: sessions_spawn"
delegation effects         : 1 (unchanged)

verdict                    : passed=true, exit 0

This proves both final effects on the reviewed head: the primary child retains delegation authority and completes one real tool effect; the report-only fallback cannot discover either delegation launcher, both nearest-forbidden calls fail at the authenticated Gateway boundary, and no second effect occurs.

No live model provider was used; the behavior under test is CLI grant production and Gateway tool authorization, which occur before a model call.

Evidence

Exact-head validation for 3d04d908f3dabf832c62acc33111de6851b71e93:

  • Real runAgentAttempt → process-supervisor child → authenticated production loopback HTTP → final-effect proof above — passed, exit 0.
  • Current-main reproduction before repair: real resolveGatewayScopedTools report-only scenario exposed sessions_spawn / sessions_send; assertion failed as expected.
  • Producer regression before repair: primary candidate incorrectly received report_only because fallbackActive was hardcoded; assertion failed as expected. Exact head threads runner-owned isFallbackRetry and passes.
  • Focused touched-surface validation — 325 passed across the producer, delegation capability, grant context, MCP HTTP, and Gateway resolver suites.
  • pnpm check — passed.
  • Exact CI test-type stripe node scripts/run-tsgo-core-test-shards.mjs --stripe 5/5 --concurrency 2 — passed.
  • GitHub Actions exact-head CI run 33464835898 — passed, including openclaw/ci-gate.
  • Native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 115405 — passed with prep/head SHA parity.
  • SHA-bound Autoreview — READY, no actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: M labels Jul 28, 2026
@clawsweeper clawsweeper Bot added 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. P1 High-priority user-facing bug, regression, or broken workflow. labels Jul 29, 2026
@clawsweeper

clawsweeper Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 12:19 AM ET / 04:19 UTC.

ClawSweeper review

What this changes

The branch propagates the existing report-only delegation capability through CLI MCP grants, cache keys, HTTP mapping, and Gateway tool resolution, with regressions for both CLI fallback producers.

Regression provenance

Possible regression — probable (reviewed change; failure trace; known regression link). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open as a viable landing candidate: current main still lacks the CLI loopback propagation, and the refreshed exact-head trace now proves both the allowed and nearest-forbidden final effects.

Priority: P1
Reviewed head: 3d04d908f3dabf832c62acc33111de6851b71e93

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong exact-head authority proof and focused regressions support a normal good-quality bug-fix patch.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The exact-head PR-body trace connects the real CLI fallback producer through a process-supervisor child and authenticated production MCP to rejected final tool calls, while a primary control run completes one allowed delegation-class effect.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The exact-head PR-body trace connects the real CLI fallback producer through a process-supervisor child and authenticated production MCP to rejected final tool calls, while a primary control run completes one allowed delegation-class effect.
Evidence reviewed 5 items Current main lacks the CLI capability transport: Fetched main has no delegation capability read or grant field in the CLI grant builder, no HTTP forwarding field, and derives inherited authority from the ungated tool surface.
Introduced final enforcement boundary: The PR applies the capability after regular policy and deny filtering, before inherited and cron-creator allowlists are derived.
Focused owner-boundary regression: The resolver test verifies that report-only grants remove launchers and that inherited and cron-creator snapshots are derived from the gated surface.
Findings None None.
Security None None.

How this fits together

CLI-backed agent attempts mint a Gateway loopback grant, then an authenticated child process uses that grant to list and call Gateway tools. The new capability makes fallback completion reports receive the same restricted delegation surface as embedded attempts.

flowchart LR
A[Fallback completion report] --> B[CLI attempt producer]
B --> C[Loopback MCP grant]
C --> D[Authenticated Gateway request]
D --> E[Delegation capability gate]
E --> F[Restricted tool list and calls]
Loading

Before merge

  • Resolve merge risk (P2) - Existing CLI fallback completion-report runs that intentionally launch new work will lose those tools after upgrade; that is the intended parity with the shipped embedded report-only boundary.
  • Resolve merge risk (P1) - Production code grows by 99 lines to carry and enforce an authority fact across producers, grant construction, caching, HTTP mapping, and resolution; the end-to-end boundary is justified, but should not expand into a second policy path.
Agent review details

Security

None.

PR surface

Source +99, Tests +347. Total +446 across 17 files.

View PR surface stats
Area Files Added Removed Net
Source 10 103 4 +99
Tests 7 349 2 +347
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 17 452 6 +446

Review metrics

Metric Value Why it matters
Production versus test delta production +99, tests +347 The production growth carries one attempt-local authority fact to the existing Gateway owner; the larger test delta covers the two producers, cache separation, grant mapping, and resolver behavior.

Stored data model

Persistent data-model change detected: vector/embedding metadata: src/agents/delegation-capability.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #115405
Summary: This PR is the active repair for the missing CLI loopback portion of the fallback-delegation invariant.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Land the established report-only parity (recommended)
    Accept the intentional restriction that CLI fallback completion reports cannot start new delegated work, matching the already shipped embedded policy.
  2. Pause for a broader delegation policy
    Pause this PR only if maintainers want peer-conversation actions to be part of the report-only policy rather than preserving their existing behavior.

Technical review

Best possible solution:

Retain one shared report-only policy and enforce it at the Gateway’s final tool-resolution boundary for CLI fallbacks, backed by the exact producer-to-final-effect regression proof.

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

Yes. Current-main source omits the grant, HTTP, and resolver propagation, and the supplied exact-head production trace exercises the corresponding allowed and forbidden tool calls.

Is this the best way to solve the issue?

Yes. It reuses the shipped shared capability and carries it to the authoritative Gateway resolution boundary rather than creating a CLI-specific delegation policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The exact-head PR-body trace connects the real CLI fallback producer through a process-supervisor child and authenticated production MCP to rejected final tool calls, while a primary control run completes one allowed delegation-class effect.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The exact-head PR-body trace connects the real CLI fallback producer through a process-supervisor child and authenticated production MCP to rejected final tool calls, while a primary control run completes one allowed delegation-class effect.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: Without this propagation, a fallback completion report on a CLI backend can still reach delegation launchers and re-execute work.
  • merge-risk: 🚨 compatibility: Merging intentionally removes delegation tools from existing CLI fallback completion-report runs to align them with embedded behavior.
  • merge-risk: 🚨 security-boundary: The PR changes authority conveyed in a server-minted MCP grant and used to admit side-effecting Gateway tools.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The exact-head PR-body trace connects the real CLI fallback producer through a process-supervisor child and authenticated production MCP to rejected final tool calls, while a primary control run completes one allowed delegation-class effect.
  • proof: sufficient: Contributor real behavior proof is sufficient. The exact-head PR-body trace connects the real CLI fallback producer through a process-supervisor child and authenticated production MCP to rejected final tool calls, while a primary control run completes one allowed delegation-class effect.

Evidence

What I checked:

  • Current main lacks the CLI capability transport: Fetched main has no delegation capability read or grant field in the CLI grant builder, no HTTP forwarding field, and derives inherited authority from the ungated tool surface. (src/agents/cli-runner/mcp-grant-context.ts:126, 0e6848e36751)
  • Introduced final enforcement boundary: The PR applies the capability after regular policy and deny filtering, before inherited and cron-creator allowlists are derived. (src/gateway/tool-resolution.ts:556, 3d04d908f3da)
  • Focused owner-boundary regression: The resolver test verifies that report-only grants remove launchers and that inherited and cron-creator snapshots are derived from the gated surface. (src/gateway/tool-resolution.delegation.test.ts:60, 3d04d908f3da)
  • Exact-head authority proof: The supplied PR-body terminal trace runs the real producer and process-supervisor child through authenticated production MCP: the primary run performs one permitted delegation-class effect, while the report-only fallback cannot list or call llm-task or sessions_spawn and produces no second effect. (3d04d908f3da)
  • Shipped shared-gate provenance: The earlier merged repair added the shared delegation-capability owner; its behavior is included in the current stable release, while this PR supplies the missing CLI transport. (src/agents/delegation-capability.ts:12, 9d6133a9315d)

Likely related people:

  • MertBasar0: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (40 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-22T01:33:58.001Z sha 56bcde16bcc5ac9a4a03cf4b734d729c96770bc8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-22T02:16:42.559Z sha 56bcde16bcc5ac9a4a03cf4b734d729c96770bc8 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T07:04:31.298Z sha 5b6c15826c1d7a2f665277f4dd0fd7183959043e :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-25T10:54:27.579Z sha 5b6c15826c1d7a2f665277f4dd0fd7183959043e :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T23:38:29.964Z sha d14a38120eedded0b2d0362b72acedd1ce273f1d :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-26T00:36:23.898Z sha d14a38120eedded0b2d0362b72acedd1ce273f1d :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T02:01:59.930Z sha 997f3c0c4977cd1a1d661e3e491570b063b896e7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-01T03:12:24.486Z sha 3d04d90 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 31, 2026
@MertBasar0
MertBasar0 force-pushed the fix/delegation-capability-cli-loopback branch from 4be782f to 8065242 Compare August 1, 2026 21:31
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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. 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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 1, 2026
@MertBasar0

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 2, 2026
@MertBasar0
MertBasar0 force-pushed the fix/delegation-capability-cli-loopback branch from 6bd850c to 4cf19db Compare August 3, 2026 19:40
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed 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 Aug 3, 2026
@MertBasar0
MertBasar0 force-pushed the fix/delegation-capability-cli-loopback branch 3 times, most recently from f5e270a to 9161e57 Compare August 12, 2026 18:54
@MertBasar0

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@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: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 Aug 13, 2026
@Patrick-Erichsen Patrick-Erichsen self-assigned this Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Rebased onto current main (a2d1b0c03b), addressed the public Plugin SDK exposure and primary grant-shape compatibility risks, and refreshed the PR body with exact-head producer proof for 4ee5ec10f6. Current CI has no failures; remaining jobs are still running.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the open P1 on exact head c7e9bc94f7: the report-only gate now constructs the final tool surface before inherited and cron-creator authority are captured, and the focused resolver regression covers both snapshots. The PR body now includes refreshed exact-head real child → loopback HTTP proof; the requested acceptance set passed 146 tests and the full build passed.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Final exact head is 49f09c0e43, rebased onto aebe360349. The P1 authority-capture ordering fix and both derived-allowlist assertions are present; the assertion-safety CI issue was also removed without a suppression. The PR body now carries refreshed exact-head real child → loopback HTTP proof. Requested acceptance: 146 passed; MCP grant regression: 12 passed; assertion ratchet, core typecheck, focused lint/format, and full build all passed.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The PR body now carries refreshed exact-head producer proof for 5b6c15826c: real runAgentAttempt → process-supervisor child → production /mcp shows the primary run retaining sessions_spawn, while the fallback completion-report run removes sessions_send / sessions_spawn and rejects a sessions_spawn call. The focused acceptance set passed 160 tests, the command-origin producer cases passed 3/3, and exact-head GitHub Actions are green with openclaw/ci-gate passing.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

Exact-head authority proof for 3d04d908f3dabf832c62acc33111de6851b71e93 is now in the PR body: real producer → process-supervisor child → authenticated production MCP, with one allowed primary llm-task final effect and report-only rejection of both llm-task and sessions_spawn before any second effect.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Maintainer merge decision for the two remaining ClawSweeper risk items:

  • Accept the intentional compatibility change: CLI fallback completion reports must lose delegation launchers, matching the shipped embedded report_only boundary. Primary CLI authority is preserved and exact-head proven.
  • Accept the +99 production LOC: it transports one existing authority fact across the existing producer → grant → cache → HTTP → resolver boundary and enforces it through the shared applyDelegationCapability; it does not introduce a second policy path.

The stored-data-model note is a classifier false positive: src/agents/delegation-capability.ts defines transient in-memory tool capability policy and changes no persisted schema or migration surface.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M stale Marked as stale due to inactivity 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.

2 participants