Skip to content

feat(agents): Swarm core β€” collector spawn, agents_wait, structured output, caps (gated) - #110932

Merged
steipete merged 13 commits into
mainfrom
feat/swarm-core-0717
Jul 19, 2026
Merged

steipete merged 13 commits into
mainfrom
feat/swarm-core-0717

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw has no way to orchestrate many subagents deterministically β€” no awaitable spawn, no structured child output, no fan-out caps. This is the core lane of the Swarm program (#110325).

Why This Change Was Made

Per the frozen spec (docs/plan/swarms.md, lands with this PR): one canonical, harness-agnostic owner of spawn/complete/settle semantics that both the QuickJS code-mode surface and the Codex-harness projection build on. Fully gated behind new tools.swarm config (default off) β€” with the gate closed, the only behavior change is param rejection with a clear error.

User Impact

Gated (off by default). When tools.swarm.enabled:

  • sessions_spawn gains collect (waitable completion record instead of announce/steering), outputSchema (validated structured output via injected structured_output tool, one nudge retry, schemaError fallback), fastMode, groupId; child identity defaults to tools.swarm.defaultAgentId (validated against the existing target allowlist).
  • New agents_wait tool: first-completion race semantics, bounded timeout, idempotent re-reads, spawner-chain ownership.
  • Per-group FIFO scheduler enforcing maxConcurrent / maxChildrenPerGroup / maxTotalPerGroup; collector children run approvals-fail-closed (denials reported in results, no operator prompts).
  • Persistence: additive columns on existing registry/state stores β€” no schema-version bump. Gateway-protocol change is additive-optional fields only.

Evidence

  • Focused suites green locally: swarm-config, swarm-scheduler, agents-wait-tool, structured-output-tool, swarm-tools integration, agent-request-preflight (node scripts/run-vitest.mjs …, 2 shards).
  • Post-rebase full proof on Blacksmith Testbox: run 29657155074 (incl. 88-test state-db suite for the schema-architecture reconciliation).
  • Autoreview round 1 (codex gpt-5.6-sol): two P2s β€” per-request O(n) registry scan and missing collector lifecycle hooks β€” both fixed (index-maintaining run map for O(1) collector lookup + isSubagentSessionKey-gated store fallback; subagent_progress/subagent_spawned emitted from the scheduler start callback). Round 2: one finding rejected as factually incorrect β€” resolveReal already maps only ENOENT to null and rethrows otherwise, so non-ENOENT realpath failures return false (subagent-registry-helpers.ts:189-216).
  • Follow-ups tracked in feat(code-mode): Swarms β€” agent fan-out and orchestration in code modeΒ #110325: QuickJS agents.run surface (in flight), dots widget, event-driven wait (replacing the bounded 25ms in-memory poll), agents.session.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Jul 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86814ac270

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

([, candidate]) =>
!candidate.collectorCompletion ||
candidate.collectorLaunchCleanupPending === true ||
candidate.archiveAtMs === undefined ||

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Assign an archive deadline to default collector runs

When callers use the normal sessions_spawn({ collect: true }) form without specifying cleanup, the tool defaults to cleanup="keep" (src/agents/tools/sessions-spawn-tool.ts:341-343), and registration consequently leaves archiveAtMs undefined (src/agents/subagent-registry-run-manager.ts:790-795). This new group guard therefore prevents every default collector group from ever being archived, retaining its registry/SQLite records indefinitely and causing reused explicit groups to remain permanently subject to maxTotalPerGroup; collector runs need a group-retention deadline independent of session cleanup mode.

Useful? React with πŸ‘Β / πŸ‘Ž.

@steipete steipete closed this Jul 18, 2026
@steipete steipete reopened this Jul 18, 2026
@steipete steipete self-assigned this Jul 18, 2026
@steipete
steipete force-pushed the feat/swarm-core-0717 branch from 86814ac to e9921b9 Compare July 18, 2026 20:14
@clawsweeper clawsweeper Bot added the rating: πŸ¦ͺ silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. label Jul 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9921b9fe9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +90 to +92
const persistedCollectorSession =
!collectorSession && requestSessionKey && isSubagentSessionKey(requestSessionKey)
? loadSessionEntry({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid opening the session DB for every subagent request

For every ordinary request whose sessionKey is a subagent key, collectorSession is absent, so this condition invokes loadSessionEntry even when the session has never been a collector. That function opens the per-agent SQLite database synchronously (src/config/sessions/session-accessor.sqlite-entry.ts:76-79), adding a writable DB open/read to every normal subagent dispatch and resume despite the comment claiming ordinary traffic avoids it. Restrict this fallback to the startup window or maintain a process-level index of persisted collector session keys.

Useful? React with πŸ‘Β / πŸ‘Ž.

@clawsweeper clawsweeper Bot added status: πŸ“£ needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 19, 2026, 1:41 AM ET / 05:41 UTC.

Summary
The branch adds a default-off tools.swarm feature with collector-mode subagent spawning, agents_wait, structured output, fan-out limits, additive persistence, protocol fields, and supporting UI metadata.

Reproducibility: yes. from source: complete a collector with a terminal provider/runtime error before an assistant result is captured, then call agents_wait; the projection returns an empty result instead of the recorded diagnostic.

Review metrics: 3 noteworthy metrics.

  • New configuration contract: 1 top-level gate, 6 documented options, 1 per-agent override. The default-off gate limits rollout, but these values become a compatibility-sensitive public configuration surface.
  • Persisted collector state: 7 additive subagent_runs columns. Collector completion and structured-output data must remain coherent across restart and upgrade paths.
  • Gateway tool contract: 2 optional agent request fields. swarmCollector and swarmOutputSchema extend the cross-client request boundary and need durable ownership.

Stored data model
Persistent data-model change detected: persistent cache schema: src/agents/swarm-output-schema.ts, serialized state: src/agents/tools/sessions-spawn-tool.test.ts, serialized state: src/agents/tools/sessions-spawn-tool.ts, serialized state: src/agents/tools/structured-output-tool.ts, serialized state: src/config/sessions/types.ts, serialized state: src/state/openclaw-state-db.generated.d.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #110325
Summary: This PR is the proposed core implementation lane for the broader Swarm program tracked by the canonical issue.

Members:

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

Merge readiness
Overall: πŸ¦ͺ silver shellfish
Proof: πŸ¦ͺ silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Return a terminal diagnostic or dedicated error from failed collector waits and cover it with a focused regression test.
  • [P1] Add redacted after-fix runtime evidence covering collector spawn, structured output, agents_wait, and a restart/recovery path.
  • Obtain explicit maintainer sponsorship for the permanent Swarm configuration and gateway contract.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The body reports focused suites and Testbox/CI results but has no inspectable redacted after-fix runtime output proving enabled collector spawn, structured completion, agents_wait, and restart recovery; add a terminal transcript, recording, linked artifact, or redacted logs and update the PR body. Redact private endpoints, IP addresses, tokens, and user data; a maintainer can request @clawsweeper re-review if a fresh review does not start.

Risk before merge

  • [P2] Merging with the current result projection makes failed collector runs indistinguishable beyond status: "failed", preventing orchestrators from selecting informed retry or fallback behavior.
  • [P1] This introduces a public configuration, tool, gateway, and persisted-state contract; default-off reduces fresh-install exposure but does not settle the permanent upgrade and API direction.
  • [P1] The supplied proof is test/CI-only, so it does not yet demonstrate the enabled feature’s real collector, wait, structured-output, and restart path.

Maintainer options:

  1. Preserve failed-run diagnostics (recommended)
    Change the collector completion projection so agents_wait returns a terminal error or diagnostic when no assistant result was captured, and add a focused regression test.
  2. Accept a status-only failure contract
    Maintainers may intentionally keep status-only failures, but that would make retry and classification behavior an undocumented caller burden.
  3. Pause until the public contract is sponsored
    Pause the broad feature if maintainers do not want to commit to its configuration, protocol, and persisted-state surface now.

Next step before merge

  • [P1] A narrow error-projection repair is clear, but the larger public configuration, gateway, and persisted-state contract requires protected maintainer sponsorship before merge.

Maintainer decision needed

  • Question: Should the default-off tools.swarm configuration, new agents_wait tool contract, and additive persisted collector record be accepted as OpenClaw’s permanent core orchestration surface after the terminal-error repair?
  • Rationale: The patch adds a broad, compatibility-sensitive core feature whose API, configuration, protocol, and persisted-state semantics exceed a mechanical defect fix; the maintainer label requires explicit sponsorship despite the frozen implementation spec.
  • Likely owner: steipete β€” The linked program issue and the proposed specification identify steipete as the person currently carrying the Swarm design and implementation boundary.
  • Options:
    • Sponsor the gated core contract (recommended): Repair failed-collector diagnostics, keep the feature default-off, and approve the documented config, tool, protocol, and storage contract with real enabled-path evidence.
    • Narrow the first landing: Land only a smaller internally scoped collector primitive and defer public config, catalog, and gateway exposure until the permanent API is agreed.
    • Pause the core feature: Keep the Swarm work out of core until a maintainer confirms that this orchestration capability belongs in the product roadmap.

Security
Cleared: The reviewed patch adds no new dependency source, workflow permission, package lifecycle hook, or concrete security-boundary regression; collector approvals are deliberately fail-closed.

Review findings

  • [P2] Expose terminal errors from failed collectors β€” src/agents/tools/agents-wait-tool.ts:44
Review details

Best possible solution:

Return a stable terminal diagnostic or dedicated error field from agents_wait when a collector fails without output, then obtain explicit maintainer confirmation of the permanent Swarm config/protocol contract and publish redacted enabled-path runtime evidence.

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

Yes, from source: complete a collector with a terminal provider/runtime error before an assistant result is captured, then call agents_wait; the projection returns an empty result instead of the recorded diagnostic.

Is this the best way to solve the issue?

No: the current status-only fallback is not the best solution because it discards an existing terminal outcome; preserve a stable error field or terminal diagnostic in the waiter result.

Full review comments:

  • [P2] Expose terminal errors from failed collectors β€” src/agents/tools/agents-wait-tool.ts:44
    When a collector fails before producing an assistant reply, this fallback returns an empty result even though the terminal outcome retains the provider/runtime diagnostic. Return that diagnostic or a dedicated error field so agents_wait callers can classify and retry failures. This is the still-unfixed P2 from the immediately preceding review of the same head.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a gated but broad agent-orchestration feature with a concrete collector error-reporting defect rather than an active emergency regression.
  • merge-risk: 🚨 compatibility: The PR adds tools.swarm, per-agent configuration, tool parameters, and optional gateway fields that existing integrations may need to understand.
  • merge-risk: 🚨 session-state: Collector identities, completion data, structured output, and group metadata are persisted and reread across lifecycle and restart paths.
  • merge-risk: 🚨 availability: The per-group scheduler, bounded polling wait path, and restart reconciliation can affect agent-run progress and completion under load.
  • 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 real behavior proof before merge: The body reports focused suites and Testbox/CI results but has no inspectable redacted after-fix runtime output proving enabled collector spawn, structured completion, agents_wait, and restart recovery; add a terminal transcript, recording, linked artifact, or redacted logs and update the PR body. Redact private endpoints, IP addresses, tokens, and user data; a maintainer can request @clawsweeper re-review if a fresh review does not start.
Evidence reviewed

What I checked:

  • Unresolved collector failure result: The new completionResult projection returns captured assistant text or an empty string, while the prior review establishes that provider/runtime diagnostics remain in the collector terminal outcome; callers therefore receive status: "failed" without the actionable reason. (src/agents/tools/agents-wait-tool.ts:44, 70f23bb2ed9b)
  • Review continuity: The latest completed ClawSweeper review identified the same P2 terminal-error loss at this exact head SHA; the subsequent current-head commit list contains no repair for the result projection, so the blocker remains. (src/agents/tools/agents-wait-tool.ts:44, 70f23bb2ed9b)
  • Compatibility-sensitive surface: The PR introduces a default-off public tools.swarm configuration contract, per-agent override, new tool parameters, optional gateway fields, and persisted collector columns, all of which require explicit upgrade and permanent-contract review. (src/config/types.tools.ts:243, 70f23bb2ed9b)
  • Real behavior proof: The PR body reports focused tests and a Testbox run, but provides no inspectable redacted runtime transcript, log, terminal output, recording, or artifact demonstrating collector spawn, agents_wait, structured completion, and restart recovery after the fix. (70f23bb2ed9b)
  • Feature history: The branch history attributes the Swarm specification and the core implementation, reconciliation, scheduler, and protocol work to steipete; the linked program issue also names this PR as the core lane. Public docs: docs/plan/swarms.md. (docs/plan/swarms.md:1, b9a7fa7272e7)

Likely related people:

  • steipete: Authored the linked Swarm program issue, the frozen implementation specification, and all 13 commits in the proposed core implementation and follow-up repairs. (role: Swarm feature author and recent area contributor; confidence: medium; commits: b9a7fa7272e7, 625dfc51977f, 7320cce886ce; files: docs/plan/swarms.md, src/agents/subagent-spawn.ts, src/agents/tools/agents-wait-tool.ts)
What the crustacean ranks mean
  • πŸ¦€ challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • πŸ¦ͺ silver shellfish: thin signal; proof, validation, or implementation needs work.
  • πŸ§‚ unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-18T20:45:09.121Z sha 0117d90 :: needs real behavior proof before merge. :: [P2] Avoid opening the session DB for every subagent request
  • reviewed 2026-07-18T21:27:09.568Z sha 0117d90 :: needs real behavior proof before merge. :: [P2] Avoid opening the session DB for ordinary subagent requests
  • reviewed 2026-07-18T22:06:41.891Z sha 57448bd :: needs real behavior proof before merge. :: [P2] Expire completed collector groups independently of session cleanup
  • reviewed 2026-07-18T22:31:44.880Z sha 57448bd :: needs real behavior proof before merge. :: [P2] Make queued collector launches crash-safe before replay
  • reviewed 2026-07-19T00:59:45.003Z sha 57448bd :: needs real behavior proof before merge. :: [P2] Reconcile accepted queued launches before replaying them
  • reviewed 2026-07-19T03:59:55.188Z sha c7325cd :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-19T04:41:31.064Z sha defa45131859e38bfc92a12ae9b6079ac574800f :: needs real behavior proof before merge. :: [P2] Return terminal errors from failed collectors
  • reviewed 2026-07-19T04:58:47.478Z sha 70f23bb :: needs real behavior proof before merge. :: [P2] Return terminal errors from failed collectors

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Jul 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57448bd6f7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1138 to +1145
const response = await subagentRegistryDeps.callGateway({
method: "agent",
params: launch.request,
timeoutMs: launch.timeoutMs,
});
const gatewayRunId = readGatewayRunId(response) ?? runId;
try {
if (!startQueuedSubagentRun(runId, gatewayRunId)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reconcile queued launches before replaying them

If the gateway exits after this agent call is accepted but before startQueuedSubagentRun persists the running transition, the durable row remains queued; restoration therefore sends the same launch request again. The Gateway idempotency cache is only the process-local Map at src/gateway/server-runtime-state.ts:141, so it cannot deduplicate this replay after restart, allowing the collector task and any pre-crash side effects to execute twice. Persist a launch-in-flight state that restoration reconciles against the child session, or use durable request deduplication, rather than unconditionally replaying queued work.

Useful? React with πŸ‘Β / πŸ‘Ž.

@openclaw-barnacle openclaw-barnacle Bot reopened this Jul 18, 2026
@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 Jul 18, 2026
@openclaw-barnacle openclaw-barnacle Bot reopened this Jul 19, 2026
@steipete
steipete force-pushed the feat/swarm-core-0717 branch from 57448bd to c7325cd Compare July 19, 2026 03:56
@clawsweeper clawsweeper Bot added the feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. label Jul 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7595ded42

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2457 to +2459
const snapshot = subagentRegistryDeps.getSubagentRunsSnapshotForRead(subagentRuns);
const byId = new Map<string, SubagentRunRecord>();
for (const entry of snapshot.values()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid rebuilding the full registry on every wait poll

While any requested collector remains pending, agents_wait polls every 25 ms (src/agents/tools/agents-wait-tool.ts:105-120), and each poll reaches this function, which merges the persisted/in-memory registry and then scans every retained run to rebuild byId. With multiple groups or long-retained collector records, one wait therefore performs thousands of full-registry scans and periodically reloads the entire SQLite table during a 600-second call; use a maintained stable-swarm-id index or targeted lookup instead.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment on lines +1143 to +1149
const gatewayRunId = readGatewayRunId(response) ?? runId;
try {
if (!startQueuedSubagentRun(runId, gatewayRunId)) {
throw new Error(
"collector registry row could not transition from queued to running",
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Emit start hooks after restoring a queued collector

When the gateway restarts while a collector is queued, this restored scheduler callback accepts the child and marks it running but never emits subagent_progress(phase="started") or subagent_spawned. The normal queued-launch callback explicitly calls emitSpawnLifecycleHooks after the same transition (src/agents/subagent-spawn.ts:1777-1789), so restart-launched collectors disappear from hook-backed progress and lifecycle integrations even though their eventual ended hook still fires.

Useful? React with πŸ‘Β / πŸ‘Ž.

@openclaw-barnacle openclaw-barnacle Bot added the app: android App: android label Jul 19, 2026
steipete added 11 commits July 18, 2026 21:44
…lector start lifecycle hooks

Autoreview findings: replace the per-request full registry scan with an
index-maintaining run map and gate the persisted-store fallback behind
isSubagentSessionKey; emit subagent_progress/subagent_spawned from the swarm
scheduler start callback so collector children produce balanced plugin
lifecycle events.
…nabled fact

resolveSwarmConfig value-import in tool-catalog dragged the server graph into
the Control UI bundle via tool-policy-shared (UNLOADABLE_DEPENDENCY on
subpath aliases). Catalog stays pure; the gateway tools-catalog handler
resolves the gate and passes the boolean.
@steipete
steipete force-pushed the feat/swarm-core-0717 branch from defa451 to 70f23bb Compare July 19, 2026 04:56
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 19, 2026
@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 Jul 19, 2026
@steipete
steipete merged commit ccb1475 into main Jul 19, 2026
210 of 216 checks passed
@steipete
steipete deleted the feat/swarm-core-0717 branch July 19, 2026 06:30
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 19, 2026
…utput, caps (gated) (openclaw#110932)

* docs: add Swarm implementation spec

* feat(agents): Swarm core β€” collector spawn, agents_wait, structured output, fastMode, caps

Implements docs/plan/swarms.md Β§4-6: tools.swarm config gate (default off),
collector-mode sessions_spawn (collect/outputSchema/fastMode/groupId), fail-closed
child approvals, agents_wait race-semantics tool, per-group FIFO scheduler with
maxConcurrent/maxChildrenPerGroup/maxTotalPerGroup caps, additive registry and
state-schema columns (no schema-version bump), and colocated tests.

Part of openclaw#110325

* fix(agents): rebase reconciliation β€” preserve swarm state columns

* fix(agents): O(1) collector session index, cheap-first preflight, collector start lifecycle hooks

Autoreview findings: replace the per-request full registry scan with an
index-maintaining run map and gate the persisted-store fallback behind
isSubagentSessionKey; emit subagent_progress/subagent_spawned from the swarm
scheduler start callback so collector children produce balanced plugin
lifecycle events.

* chore(protocol): regenerate Swift gateway models for swarm fields

* fix(agents): lint cleanup β€” typed catch, explicit microtask flush, no executor return

* fix(agents): knip/test-support/max-lines cleanup for swarm surfaces

* fix(agents): keep tool-catalog ui-safe β€” callers pass prepared swarmEnabled fact

resolveSwarmConfig value-import in tool-catalog dragged the server graph into
the Control UI bundle via tool-policy-shared (UNLOADABLE_DEPENDENCY on
subpath aliases). Catalog stays pure; the gateway tools-catalog handler
resolves the gate and passes the boolean.

* fix(agents): reconcile swarm spawn pipeline

* fix(agents): refresh swarm tool metadata

* fix(apps): sync swarm tool localization

* style(agents): compact tool display metadata

* fix(plugin-sdk): account for swarm config surface
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
…utput, caps (gated) (openclaw#110932)

* docs: add Swarm implementation spec

* feat(agents): Swarm core β€” collector spawn, agents_wait, structured output, fastMode, caps

Implements docs/plan/swarms.md Β§4-6: tools.swarm config gate (default off),
collector-mode sessions_spawn (collect/outputSchema/fastMode/groupId), fail-closed
child approvals, agents_wait race-semantics tool, per-group FIFO scheduler with
maxConcurrent/maxChildrenPerGroup/maxTotalPerGroup caps, additive registry and
state-schema columns (no schema-version bump), and colocated tests.

Part of openclaw#110325

* fix(agents): rebase reconciliation β€” preserve swarm state columns

* fix(agents): O(1) collector session index, cheap-first preflight, collector start lifecycle hooks

Autoreview findings: replace the per-request full registry scan with an
index-maintaining run map and gate the persisted-store fallback behind
isSubagentSessionKey; emit subagent_progress/subagent_spawned from the swarm
scheduler start callback so collector children produce balanced plugin
lifecycle events.

* chore(protocol): regenerate Swift gateway models for swarm fields

* fix(agents): lint cleanup β€” typed catch, explicit microtask flush, no executor return

* fix(agents): knip/test-support/max-lines cleanup for swarm surfaces

* fix(agents): keep tool-catalog ui-safe β€” callers pass prepared swarmEnabled fact

resolveSwarmConfig value-import in tool-catalog dragged the server graph into
the Control UI bundle via tool-policy-shared (UNLOADABLE_DEPENDENCY on
subpath aliases). Catalog stays pure; the gateway tools-catalog handler
resolves the gate and passes the boolean.

* fix(agents): reconcile swarm spawn pipeline

* fix(agents): refresh swarm tool metadata

* fix(apps): sync swarm tool localization

* style(agents): compact tool display metadata

* fix(plugin-sdk): account for swarm config surface
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: android App: android app: web-ui App: web-ui docs Improvements or additions to documentation feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: πŸ¦ͺ silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: πŸ“£ needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant