Skip to content

refactor(cli): make multi-agent operations agent-owned - #123871

Merged
jalehman merged 8 commits into
openclaw:mainfrom
jjjhenriksen:agent/status-ownerless
Aug 20, 2026
Merged

jalehman merged 8 commits into
openclaw:mainfrom
jjjhenriksen:agent/status-ownerless

Conversation

@jjjhenriksen

@jjjhenriksen jjjhenriksen commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Related: #112735

What Problem This Solves

Fixes an issue where multi-agent CLI setup could route through the wrong agent or lose the retained owner of a migrated legacy roster. Configure auth/model writes, channel setup, and local capability commands could therefore read or write the wrong workspace, auth store, or model policy—or fail as ownerless even though migration had preserved an owner.

Why This Change Was Made

The change establishes one operation-owner rule for these CLI paths:

  • explicit fleets use the configured System Agent unless the command supplies --agent;
  • migrated legacy fleets use their retained compatibility owner after the raw default: true marker is normalized away;
  • configure auth/model writes use the selected agent's auth directory, workspace, model state, and model policy;
  • channel setup and local capability commands use the same ownership rule;
  • ambiguous fleets still fail closed with an actionable agent-selection error.

Model pickers keep their existing defaults-based APIs. Their results are projected onto the selected agent entry so provider integrations remain unchanged. Custom-provider setup preserves its root models.providers mutation while moving only model/default state onto the selected agent.

The current head also addresses the latest ClawSweeper findings:

  • operation-owner resolution consults the retained legacy owner before the raw default-marker path;
  • legacy codex/<model> primaries are canonicalized from the selected agent entry to openai/<model> before its allowlist is updated.

User Impact

Operators can run multi-agent CLI setup without silently placing credentials or model configuration on another agent. Migrated legacy configurations keep their selected owner, and explicit agents cannot retain a legacy Codex primary that falls outside their newly selected OpenAI allowlist.

Evidence

Exact pushed head: 7145e319f9333c95050a237a484b4550e43f1543.

Before: baseline reproduces the owner-loss failure

  • AWS Crabbox run: run_950161a3b9b3
  • Baseline: 4994f7bacf308269a0770b4a912c44a746cccec7
  • Actual command path: pnpm openclaw configure --section model
  • Fixture: explicit main/ops fleet with a configured System Agent.
  • Observed: the CLI exited 1 with Multiple agents are configured, but this operation has no explicit owner; global, main, and ops model state remained unchanged.

After: exact-head real CLI behavior

  • AWS Crabbox run: run_5ec01bee2b65
  • Environment: isolated public-network AWS lease, no Tailscale, no hydration, and no instance profile; lease released after proof.
  • Command path: built the exact head, then drove the actual pnpm openclaw configure --section model PTY flow twice.
  • Explicit list-form fleet: selecting openai/gpt-5.6-luna canonically preserved exactly the main and ops entries, removed the internal list projection, and changed only agents.entries.ops.model; global defaults and main remained unchanged.
  • Migrated legacy fleet: after normalization removed the raw default marker, the retained ops owner was selected and only agents.entries.ops.model changed; global defaults and main remained unchanged.
  • Result: both CLI flows exited 0.

No provider credential, external API, or external channel was used or claimed; this proof exercises the credential-free production CLI ownership path.

Focused and changed-surface verification

  • node scripts/run-vitest.mjs src/commands/onboard-agent-target.test.ts src/commands/onboard-custom-config.test.ts src/commands/configure.gateway-auth.prompt-auth-config.test.ts src/agents/agent-scope-config.test.ts
    • custom config: 34/34 passed
    • onboarding/configure: 26/26 passed
    • agents: 20/20 passed
  • node scripts/check-changed.mjs --: passed all changed formatting, typecheck, lint, export, boundary, import-cycle, and database guards.
  • git diff --check origin/main..HEAD: passed.
  • The selected-agent regression verifies that codex/gpt-5.5 becomes openai/gpt-5.5 on that agent before its allowlist is projected; global defaults remain unchanged.

Dependency contract

Direct sibling Codex inspection confirms openai is the canonical provider ID and built-in provider-map key in ../codex/codex-rs/model-provider-info/src/lib.rs; Codex configuration also defaults provider selection to openai.

Review and size

  • Production: +166/-49. Tests: +357/-1 against the reviewed base. The final list-roster repair itself is production +40/-36 (net +4) and tests +94/-0.
  • Production growth establishes the canonical agent-target ownership boundary and routes existing setup/capability callers through it; the tests cover explicit, migrated legacy, and selected-agent model-policy behavior.

Current Review State

  • Both P1 findings from the review of c2eb109b133 and the list-form roster P1 from the review of 81557e239dab are repaired on the exact head above.
  • Exact-head required CI and refreshed ClawSweeper review are pending.

@clawsweeper

clawsweeper Bot commented Aug 14, 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: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 19, 2026, 10:41 PM ET / August 20, 2026, 02:41 UTC.

ClawSweeper review

What this changes

The PR routes multi-agent CLI model/auth setup, channel setup discovery, and local capability commands through an operation-specific agent owner and preserves list-form agent rosters during model writes.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 6 items remain

Keep open: the PR has useful exact-head CLI proof for model configuration, but interactive channel setup still resolves its workspace through the ambient owner, not the new operation-owner rule. That can split a migrated legacy fleet’s channel discovery and setup across different agents.

Priority: P1
Reviewed head: 7145e319f9333c95050a237a484b4550e43f1543

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The PR has substantial focused coverage and partial real CLI proof, but the remaining channel-owner defect and missing changed-path proof prevent a merge-ready rating.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The exact-head terminal proof convincingly covers model configuration, but it does not show the changed channel setup or local capability paths; redact any private workspace or credential details in follow-up evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The exact-head terminal proof convincingly covers model configuration, but it does not show the changed channel setup or local capability paths; redact any private workspace or credential details in follow-up evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Channel setup bypasses the new owner rule: The wizard calls setupChannels without an operation owner; that flow resolves its workspace through resolveChannelSetupWorkspaceDir instead.
Ambient resolution conflicts with migrated-operation semantics: The setup-flow workspace helper uses resolveAmbientOwnerAgentId, which prefers systemAgent; the new operation resolver deliberately preserves the retained legacy owner for non-explicit fleets.
Current main still lacks the proposed resolver: Current main contains ambient and legacy-default resolution but not resolveAgentOperationAgentId, so the PR is not obsolete.
Findings 1 actionable finding [P1] Thread operation ownership through channel setup
Security None None.

Live Verification

Command: pnpm openclaw configure --help

Result: PASS (completed)

pnpm openclaw configure --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-123871-ywQQTH/target$ pnpm openclaw configure --help
$ node scripts/run-node.mjs configure --help
pnpm openclaw configure --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 105.85 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.6s
node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

[tsdown-build] invocation 2/2 finished in 11.5s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 3497ms (slowest: built plugin control-plane loads 2710ms)

OpenClaw 2026.8.1 (7145e31) — All your chats, one OpenClaw.

Usage: openclaw configure [options]

Interactive configuration for credentials, channels, gateway, and agent defaults

Options:
  -h, --help           Display help for command
  --section ‹section›  Configuration sections (repeatable). Options: workspace, model, web, gateway, daemon, channels, plugins, skills, health (default: [])

Docs: docs.openclaw.ai/cli/configure

runner@runnerv
… output truncated …

Assertions:

  • PASS expect_output: --section

How this fits together

CLI setup selects an agent whose workspace, auth profiles, and model policy should receive the operation. Channel setup then discovers plugins and configures accounts using that workspace, so all stages must use the same owner.

flowchart TD
A[CLI setup command] --> B[Operation owner selection]
B --> C[Selected agent workspace]
B --> D[Selected agent auth and model state]
A --> E[Channel setup wizard]
E --> F[Plugin discovery and setup flow]
F --> G[Channel configuration]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The exact-head terminal proof convincingly covers model configuration, but it does not show the changed channel setup or local capability paths; redact any private workspace or credential details in follow-up evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Thread operation ownership through channel setup (P1) - resolveInitialWizardChannelTarget now discovers with the operation owner, but setupChannels is still called without that owner and resolves its workspace through resolveAmbientOwnerAgentId. A migrated legacy roster that also has a System Agent can therefore inspect one workspace before setup and load/install from another; pass the operation owner or workspace through the full setup flow.
  • Resolve merge risk (P1) - For a migrated legacy roster that also specifies a System Agent, channel preflight can use the retained legacy workspace while the actual setup flow uses the System Agent workspace.
  • Resolve merge risk (P1) - The PR changes persisted agent model and auth ownership; exact-head required CI remains incomplete.
  • Resolve merge risk (P1) - The sibling Codex source was unavailable, so the PR body’s provider-canonicalization contract was not independently verified.
  • Complete next step (P2) - A narrow repair can propagate the already-resolved operation owner into the interactive channel setup flow and prove the missing path.

Findings

  • [P1] Thread operation ownership through channel setup — src/commands/channels/add-wizard.ts:104
Agent review details

Security

None.

PR surface

Source +117, Tests +356. Total +473 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 10 166 49 +117
Tests 4 357 1 +356
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 523 50 +473

Review metrics

Metric Value Why it matters
Production versus test delta production +166/-49; tests +357/-1 The ownership refactor adds production surface across config, auth, model, channel, and capability paths, so the missing channel-flow propagation is material.
Persisted roster shape 1 supported list-form roster normalized to entries on model writes Existing configurations can be rewritten during setup, making sibling preservation and upgrade proof important.

Merge-risk options

Maintainer options:

  1. Unify interactive channel ownership (recommended)
    Pass the operation-owned agent workspace into setupChannels and its plugin-discovery helpers, then add regression and real-flow proof before merge.
  2. Accept split workspace behavior
    Merge knowing migrated fleets with both ownership signals can discover and configure channel plugins from different agent workspaces.

Technical review

Best possible solution:

Thread the resolved operation owner or workspace through the complete interactive channel setup flow, cover the legacy-owner-plus-System-Agent case, then publish redacted exact-head channel and capability proof.

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

Yes, from source: use a non-explicit migrated legacy roster with retained owner ops and a configured System Agent main; the operation resolver selects ops while the interactive setup flow selects main’s workspace.

Is this the best way to solve the issue?

No. The shared channel setup flow must receive the same operation owner rather than independently resolving an ambient owner after the wizard has selected one.

Full review comments:

  • [P1] Thread operation ownership through channel setup — src/commands/channels/add-wizard.ts:104
    resolveInitialWizardChannelTarget now discovers with the operation owner, but setupChannels is still called without that owner and resolves its workspace through resolveAmbientOwnerAgentId. A migrated legacy roster that also has a System Agent can therefore inspect one workspace before setup and load/install from another; pass the operation owner or workspace through the full setup flow.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P1: The interactive channel setup path can use a different agent workspace than the operation owner for active multi-agent fleets.
  • merge-risk: 🚨 compatibility: Model writes normalize persisted list-form agent rosters and move defaults into per-agent entries.
  • merge-risk: 🚨 auth-provider: The patch changes which agent directory owns configure-time auth profile and model-policy operations.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The exact-head terminal proof convincingly covers model configuration, but it does not show the changed channel setup or local capability paths; redact any private workspace or credential details in follow-up evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/flows/channel-setup.test.ts src/commands/channels/add-wizard.test.ts src/agents/agent-scope-config.test.ts.
  • [P1] node scripts/check-changed.mjs --.
  • [P1] git diff --check.

What I checked:

  • Channel setup bypasses the new owner rule: The wizard calls setupChannels without an operation owner; that flow resolves its workspace through resolveChannelSetupWorkspaceDir instead. (src/commands/channels/add-wizard.ts:104, 7145e319f933)
  • Ambient resolution conflicts with migrated-operation semantics: The setup-flow workspace helper uses resolveAmbientOwnerAgentId, which prefers systemAgent; the new operation resolver deliberately preserves the retained legacy owner for non-explicit fleets. (src/flows/channel-setup.status.ts:60, 7145e319f933)
  • Current main still lacks the proposed resolver: Current main contains ambient and legacy-default resolution but not resolveAgentOperationAgentId, so the PR is not obsolete. (src/agents/agent-scope-config.ts:237, 29cfd195d19d)
  • Partial real-behavior proof: The PR body records an exact-head Crabbox run of configure --section model for explicit list and migrated legacy rosters, but it does not exercise the changed interactive channel or capability paths. (7145e319f933)
  • Adjacent current-main ownership: Current-main blame attributes the agent-aware model-picker projection to Vitor Cepeda Lopes; local history for the older resolver path is incomplete in this checkout. (src/flows/model-picker.ts:141, e00f860198)
  • Codex contract check unavailable: The PR body makes a Codex-provider canonicalization claim, but the required sibling Codex source is absent from this read-only environment and the configured remote could not resolve; this review does not independently validate that external contract. (7145e319f933)

Likely related people:

  • Vitor Cepeda Lopes: Current-main blame attributes the agent-aware model-picker projection adjacent to this PR’s per-agent model handling to this contributor. (role: recent adjacent contributor; confidence: medium; commits: e00f860198; files: src/flows/model-picker.ts)
  • steipete: Authored the merged multi-agent status ownership repairs that establish the related explicit-owner boundary. (role: adjacent feature owner; confidence: medium; commits: b3f1cd36dbc4, d5c194f4eade; files: src/status/summary.ts, src/commands/status-runtime-shared.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Pass the selected operation owner through interactive channel setup and add a regression for a retained legacy owner plus System Agent.
  • Post redacted exact-head terminal proof for interactive channel setup and one affected capability command.
  • Let required exact-head CI complete after the repair.

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 (42 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-19T03:37:36.608Z sha ec14ef688eb3cac5fe8fce953c0a98435684721a :: needs real behavior proof before merge. :: [P1] Preserve the authored agent entry key | [P1] Keep provider-auth model defaults on the target agent | [P1] Route custom-provider model setup through the target
  • reviewed 2026-08-19T04:04:04.377Z sha d7f4d9818f023ca03cd7019cfc6d9c378b1e6eb8 :: needs real behavior proof before merge. :: [P1] Preserve legacy default selection for channel setup | [P1] Preserve legacy default selection for local capabilities
  • reviewed 2026-08-19T04:51:00.608Z sha a0f47f2740ba7c28d9f3dc2b3f2fb108b8a5f557 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-19T16:21:32.606Z sha b19f80d0c83ecf679eb6bae8398e416b9d1b3c72 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T00:10:40.048Z sha c2eb109b13399a7bfad5e2524c7bb1ff5cb399df :: needs real behavior proof before merge. :: [P1] Preserve the retained legacy operation owner | [P1] Canonicalize the selected agent’s legacy Codex primary
  • reviewed 2026-08-20T00:22:27.627Z sha c2eb109b13399a7bfad5e2524c7bb1ff5cb399df :: needs real behavior proof before merge. :: [P1] Keep capability CLI on the documented System Agent chain
  • reviewed 2026-08-20T01:48:55.147Z sha 59f084c65c39912d5f1e2f12457287aca0c7789e :: needs real behavior proof before merge. :: [P1] Preserve list-form agent rosters during model writes | [P1] Retain target model policy and catalog during custom setup
  • reviewed 2026-08-20T02:17:25.372Z sha 81557e2 :: needs real behavior proof before merge. :: [P1] Preserve list-form agent rosters during model writes

@jjjhenriksen
jjjhenriksen force-pushed the agent/status-ownerless branch from 8ca5723 to 866422d Compare August 14, 2026 22:52
@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 14, 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 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 14, 2026
@jjjhenriksen
jjjhenriksen force-pushed the agent/status-ownerless branch from 866422d to 85ad2b9 Compare August 15, 2026 22:33

Copy link
Copy Markdown
Contributor Author

Current-main supersedure check and exact-head proof update:

  • main at 80ee4b97e56a23ca527d9d31c719068ecae1662c still uses strict resolveSystemMainSessionKey(cfg) at src/status/summary.ts:379-380 before peeking queued system events; fix(status): keep multi-agent diagnostics owner-safe #123826 and fix(status): keep explicit fleets ownerless in diagnostics #123831 do not cover that boundary.
  • The PR body now contains a complete redacted fixture/config transcript for literal head 85ad2b96e82f6fd11ca0aa5f144ed94e4e9df4e3: explicit main/research, no configured system owner, human status exit 0, JSON status exit 0, and queuedSystemEvents: [].
  • Exact-head focused validation: 2 files, 7 tests passed; formatting and git diff --check passed.

@clawsweeper re-review

@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:

@jjjhenriksen
jjjhenriksen force-pushed the agent/status-ownerless branch from 85ad2b9 to 4e6a1d4 Compare August 15, 2026 22:38

Copy link
Copy Markdown
Contributor Author

Correction to the prior proof note: the contributor branch was automatically rebased while review was running.

  • Literal current PR head: 4e6a1d44c6d9501dd6f2a303b3131e604f252346.
  • I re-ran the focused tests and the isolated human/JSON status proof on that head: 2 files, 7 tests passed; both commands exited 0; queuedSystemEvents: []; explicit ownership reported with defaultId: null and `selectionRequired: true.
  • The PR body has been updated so its head/base references match this latest proof.

The earlier 85ad2b… note is superseded by this correction.

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fresh exact-head behavior proof is now recorded in the PR body for c1914aad7eb201569db2a54e70424350021479ac.

@clawsweeper

clawsweeper Bot commented Aug 16, 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 rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Recreated the real-behavior proof on the literal current PR head c1914aad7eb201569db2a54e70424350021479ac (base 8a3fff21a8902ed2f1143d81f55f08f11bb562d2).

  • Focused regression: 2 files, 8 tests passed.
  • oxfmt --check on all four changed files and git diff --check: passed.
  • Fresh isolated source-CLI human status: exited 0 for an ownerless explicit main/ research roster with global session scope.
  • Fresh isolated source-CLI JSON status: exited 0; agents.defaultId: null, ownership: "explicit", selectionRequired: true, and queuedSystemEvents: [].
  • The current-head boundary regression separately enqueues a global event and verifies it is preserved in the summary.
  • No live gateway or channel credentials were used.

I updated the PR Evidence section with the redacted fixture and selected JSON output. @clawsweeper re-review

@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. 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 16, 2026
@jjjhenriksen
jjjhenriksen marked this pull request as ready for review August 16, 2026 03:25
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@clawsweeper clawsweeper Bot removed the rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. label Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 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:

@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review the literal current head 0369ded2dfa3f16b89baa65a68f94a3f5532449d. The maintainer-requested routed-owner propagation is present for native and inline /status; exact-head proof is recorded in the PR body, including the native command harness and focused routed-status coverage.

@clawsweeper

clawsweeper Bot commented Aug 18, 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:

@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the three P1 findings at exact head d7f4d9818f023ca03cd7019cfc6d9c378b1e6eb8:

  • authored roster keys are preserved (OPS is mutated, no normalized duplicate);
  • provider-auth default-model results are projected to the target and global defaults are restored;
  • custom-provider model/alias metadata is retained under models.providers while agent model state is written to the target entry.

Exact-head proof: 8 focused files, 108 tests passed; core typecheck and formatting passed. The PR body contains the redacted behavior assertions.

@clawsweeper

clawsweeper Bot commented Aug 19, 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:

@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the latest compatibility findings at exact head a0f47f2740ba7c28d9f3dc2b3f2fb108b8a5f557:

  • added one shared operation-owner resolver;
  • explicit fleets use the configured System Agent;
  • non-explicit legacy fleets retain their existing default: true owner for channel setup and image/video/embedding operations;
  • added regression coverage for both ownership modes.

Exact-head terminal proof is now in the PR body: core typecheck passed and the focused suite passed 224/224 tests.

@clawsweeper

clawsweeper Bot commented Aug 19, 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:

@jalehman

Copy link
Copy Markdown
Contributor

Exact-head real-behavior proof is now in the PR body for 17ddaa97a27eadec9a0d758d372abfee163efd6d.

  • Baseline 4994f7bacf3 reproduces the owner-loss failure through the actual openclaw configure --section model flow.
  • Exact-head focused tests pass: 2 files, 18 tests.
  • Exact-head AWS Crabbox proof drives the actual built CLI for both ownership modes:
    • explicit fleet updates only the configured System Agent;
    • legacy fleet updates only the default-marker agent.
  • Global defaults and the non-target agent remain unchanged in both cases.
  • Fresh isolated autoreview reports no accepted/actionable findings.

The body records the commands, redacted outcomes, run links, environment boundary, and remaining conflict/CI gap.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 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:

@jalehman

Copy link
Copy Markdown
Contributor

Exact-head repair and behavior proof for 81557e239dab8d1774c9892339c4bbde72897988 are now in the PR body.

The two P1 findings from the review of c2eb109b133 are addressed:

  • migrated legacy operations consult the retained compatibility owner after normalization removes the raw default marker;
  • selected-agent legacy codex/<model> primaries are canonicalized to openai/<model> before that agent's allowlist is updated.

Verification:

  • focused regressions: commands 18/18 and agents 20/20 passed;
  • changed-surface formatting/typecheck/lint/architecture guards passed;
  • exact-head AWS Crabbox run run_134cf140ba12 drove the built openclaw configure --section model CLI for explicit and migrated-legacy fleets; both exited 0 and changed only the intended ops agent, leaving global defaults and main unchanged.

The body records the baseline failure, exact commands, environment boundary, dependency contract, results, and LOC split.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 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:

@jalehman

Copy link
Copy Markdown
Contributor

Addressed the exact-head list-roster P1 at 7145e319f9333c95050a237a484b4550e43f1543.

Root cause: both targeted model mutation paths read agents.list but reconstructed a one-entry agents.entries, which takes precedence and hides sibling agents. The shared onboarding mutation boundary now canonicalizes the complete roster, preserves authored IDs and every sibling, removes the internal list projection, and updates only the selected entry.

Verification:

  • the two owner-boundary regressions fail on the prior code and pass on this head;
  • focused suites pass 80/80 across agent resolution, primary/model-policy projection, configure auth, and custom-provider projection;
  • node scripts/check-changed.mjs -- passes;
  • exact-head AWS Crabbox run run_5ec01bee2b65 drives the real built openclaw configure --section model CLI:
    • explicit agents.list: exits 0, produces exactly main + ops, removes list, updates only ops, preserves main and global defaults;
    • migrated legacy roster: exits 0 with the same ownership and sibling-preservation assertions.

The PR body now contains the exact-head results and updated production/test deltas.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 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:

@jalehman

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 cli CLI command changes commands Command implementations merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: refactor-only Candidate: refactor/cleanup-only PR without maintainer context.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants