Skip to content

fix: explicit agent ownership no longer breaks system surfaces - #123339

Merged
jalehman merged 2 commits into
mainfrom
fix/custodian-overview-explicit-owner
Aug 14, 2026
Merged

jalehman merged 2 commits into
mainfrom
fix/custodian-overview-explicit-owner

Conversation

@jalehman

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users with multiple explicitly owned agents could see Custodian, Skills, setup, or Google Meet fail by asking for a retired implicit default agent instead of using the owner already selected by configuration or UI state.

Why This Change Was Made

The affected paths now resolve the authoritative System Agent, route, or UI-selected agent once and carry that ID through subsequent work. Skills status requests cannot be emitted without an agent owner, and Google Meet defers legacy fallback resolution until neither request nor plugin configuration supplies an owner.

User Impact

Operators can use Custodian and the Skills page with explicit multi-agent ownership without an AgentSelectionRequiredError. System Agent setup and recovery consistently affect the configured System Agent owner, while Google Meet honors its configured realtime agent without first requiring an implicit default.

Evidence

  • Reproduced the original Custodian failure with an explicit System Agent owner and two-agent roster before the repair.
  • Reproduced the Skills failure as a successful agent-scoped skills.status request followed by an ownerless request that overwrote the page; the request producer now requires agentId.
  • Operator live verification confirmed Custodian and Skills load successfully from the rebuilt Control UI bundle.
  • src/system-agent/setup-inference.test.ts: 127/127 passed after rebasing onto current main.
  • src/system-agent/operations.test.ts: 59/59 passed.
  • Focused Control UI tests: 69/69 passed.
  • Google Meet owner-selection regression: 1/1 passed.
  • Scoped formatting and git diff --check passed.
  • Final autoreview: clean, no accepted/actionable findings.

Production LOC: +132/-95 (net +37) | Tests/test support: +136/-26

The mocked browser regression is included for CI; local Blacksmith capacity was unavailable during the earlier live-debug pass.

@clawsweeper

clawsweeper Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 13, 2026
@clawsweeper

clawsweeper Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 9:21 AM ET / 13:21 UTC.

ClawSweeper review

What this changes

The PR carries a configured or selected agent through System Agent setup, prepared model runtime, Skills UI requests, compaction, and Google Meet instead of forcing an implicit default agent.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for explicit maintainer review: the unmerged, maintainer-labeled branch has no source-proven defect, but it changes compatibility-sensitive agent selection and still has exact-head checks running.

Priority: P2
Reviewed head: e5b2effb715b62f80c8b92da666cc9ee0316c0df
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a coherent owner-boundary repair with focused regressions and no source-proven blocker; compatibility acceptance and exact-head validation remain maintainer gates.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository state identifies this as a MEMBER-authored, maintainer-labeled PR, so the external-contributor proof gate does not apply; the body nevertheless reports operator verification.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository state identifies this as a MEMBER-authored, maintainer-labeled PR, so the external-contributor proof gate does not apply; the body nevertheless reports operator verification.
Evidence reviewed 6 items Canonical auth fallback: The prepared-runtime owner normalizes an omitted inherited-auth directory through the legacy-auth resolver, so removing caller-side implicit-default resolution preserves the dedicated compatibility owner rather than dropping auth inheritance.
Explicit ownership contract: The legacy-auth resolver uses explicit auth inheritance, a retained legacy owner, then main; System Agent routing separately requires a configured System Agent or sole agent.
Skills request boundary: The branch waits for the gateway agent list, selects a listed default, and sends skills.status only with that agent ID; the gateway schema requires a non-empty defaultId and supplies visible agents.
Findings None None.
Security None None.

How this fits together

Agent ownership enters from configuration, a session, or Control UI selection, then drives setup, model/auth preparation, and plugin actions. The changed paths pass that owner to runtime and UI requests so explicit multi-agent setups do not require a retired ambient default.

flowchart LR
  Config[Agent and System Agent config] --> Select[Resolve authoritative agent]
  Session[Session or UI selection] --> Select
  Select --> Setup[System Agent setup]
  Select --> Runtime[Model and compaction runtime]
  Select --> Skills[Skills UI requests]
  Select --> Meet[Google Meet sessions]
Loading

Decision needed

Question Recommendation
Should this PR establish the gateway-visible default agent as the initial Skills owner for explicit multi-agent rosters while System Agent paths use the separately configured System Agent? Accept the scoped ownership routing: Approve the branch’s distinct System Agent and Skills owner rules after the pending exact-head checks complete.

Why: This is a compatibility-sensitive interpretation of explicit ownership across existing UI and setup workflows; source proves the implementation is coherent, but maintainers own acceptance of that user-facing selection policy.

Before merge

  • Resolve merge risk (P1) - The branch changes setup, model/auth, UI, and plugin owner selection; maintainers should explicitly accept the visible gateway default as the initial Skills owner for explicit multi-agent rosters.
  • Resolve merge risk (P1) - Production code is net +4 lines for a bug fix; the added named System Agent resolver and owner propagation appear necessary to centralize the boundary, but this remains a merge-relevant growth check.
Agent review details

Security

None.

PR surface

Source +9, Tests +204. Total +213 across 35 files.

View PR surface stats
Area Files Added Removed Net
Source 24 97 88 +9
Tests 11 228 24 +204
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 35 325 112 +213

Review metrics

Metric Value Why it matters
Production versus test delta production +88/-84 (net +4); tests/test support +237/-28 (net +209) The small production increase is concentrated in named owner propagation and a System Agent target helper; the larger test delta covers the changed ownership boundaries.

Stored data model

Persistent data-model change detected: durable storage schema: src/gateway/worker-environments/inference-runtime.test.ts, durable storage schema: src/gateway/worker-environments/inference-runtime.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the explicit-roster selection contract (recommended)
    Merge after exact-head validation if maintainers agree that Skills may initialize from the gateway-visible default while System Agent effects remain separately configured.
  2. Define a stricter Skills owner policy
    Pause the branch if explicit ownership must never infer an initial Skills owner from the gateway list.

Technical review

Best possible solution:

Keep the canonical prepared-runtime legacy-auth fallback, use the configured System Agent for system surfaces, and land the branch once maintainers accept the explicit-roster Skills selection contract and exact-head checks pass.

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

Yes, from source: current main eagerly resolves an implicit default in Google Meet and emits ownerless Skills requests, both incompatible with an explicit multi-agent roster; the branch adds focused regressions for those paths.

Is this the best way to solve the issue?

Yes: removing caller-side implicit-default resolution while retaining the prepared runtime’s canonical legacy-auth fallback is a cleaner owner-boundary repair than adding per-surface guards.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs bounded multi-agent setup, runtime, plugin, and Control UI behavior without evidence of an emergency-wide outage.
  • merge-risk: 🚨 compatibility: Existing explicit multi-agent configurations will take a different owner-resolution path in setup, runtime, Skills, and Google Meet.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository state identifies this as a MEMBER-authored, maintainer-labeled PR, so the external-contributor proof gate does not apply; the body nevertheless reports operator verification.

Evidence

What I checked:

  • Canonical auth fallback: The prepared-runtime owner normalizes an omitted inherited-auth directory through the legacy-auth resolver, so removing caller-side implicit-default resolution preserves the dedicated compatibility owner rather than dropping auth inheritance. (src/agents/prepared-model-runtime.owner.ts:217, e5b2effb715b)
  • Explicit ownership contract: The legacy-auth resolver uses explicit auth inheritance, a retained legacy owner, then main; System Agent routing separately requires a configured System Agent or sole agent. (src/agents/legacy-inherited-auth-dir.ts:9, e5b2effb715b)
  • Skills request boundary: The branch waits for the gateway agent list, selects a listed default, and sends skills.status only with that agent ID; the gateway schema requires a non-empty defaultId and supplies visible agents. (ui/src/pages/skills/route.ts:31, e5b2effb715b)
  • Google Meet precedence: Google Meet now defers fallback resolution until neither the request nor realtime configuration supplies an agent, covering both join and probe paths. (extensions/google-meet/src/runtime.ts:301, e5b2effb715b)
  • Current-path provenance: Current-main blame attributes the prepared-runtime normalizer and prior ownerless Skills implementation to the recent ownership-routing work, making Peter Steinberger the strongest source-history contact. (src/agents/prepared-model-runtime.owner.ts:217, c0930de5dea1)
  • Branch and validation status: The branch is not an ancestor of current main and has no containing local release tag; its two commits are unmerged. The complete branch diff is whitespace-clean. (e5b2effb715b)

Likely related people:

  • Peter Steinberger: Current-main blame assigns the prepared-runtime normalization and prior Skills ownership behavior to this recent ownership-routing commit. (role: recent ownership-routing contributor; confidence: high; commits: c0930de5dea1; files: src/agents/prepared-model-runtime.owner.ts, ui/src/lib/skills/index.ts, extensions/google-meet/src/runtime.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-13T22:19:14.134Z sha a61eb12f58c3b6ed6cb8d98a586d21921f4019a0 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-14T00:09:38.468Z sha d9ee4bd :: needs maintainer review before merge. :: none

@jalehman
jalehman force-pushed the fix/custodian-overview-explicit-owner branch from a61eb12 to 8fa8ced Compare August 13, 2026 23:32
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 13, 2026
@jalehman
jalehman force-pushed the fix/custodian-overview-explicit-owner branch from 8fa8ced to d9ee4bd Compare August 13, 2026 23:47
@jalehman
jalehman force-pushed the fix/custodian-overview-explicit-owner branch from d9ee4bd to e5b2eff Compare August 14, 2026 13:13
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations agents Agent runtime and tooling labels Aug 14, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 14, 2026
@jalehman
jalehman merged commit c23c188 into main Aug 14, 2026
183 checks passed
@jalehman
jalehman deleted the fix/custodian-overview-explicit-owner branch August 14, 2026 13:52
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
…law#123339)

* fix: honor explicit agent ownership in system surfaces

* oc-000: fix explicit-owner runtime preparation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui commands Command implementations gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: google-meet rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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