Skip to content

fix(workboard): make Sessions boards work on multi-agent Gateways - #163761

Merged
steipete merged 1 commit into
mainfrom
steipete/session-facts-membership-ready
Oct 2, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/session-facts-membership-ready

Conversation

@steipete

@steipete steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Sessions boards without an explicit board assignee cannot finish utility-model classification on multi-agent Gateways. Fresh boards also look empty while their first classification is still loading.

Team's journal reported AgentSelectionRequiredError: Multiple agents are configured, but this operation has no explicit owner. After classification was triggered, state rules wrote 715 placements (520 done, 89 in-review, 91 merged, 12 working, and 3 stuck). A subsequent board read returned 709 sessions with the utility-model warning; sessions requiring model judgment remained unresolved.

Solution

Group sessions needing model judgment by their own agent, then run one bounded completion per group sequentially in each board pass. Each request contains at most eight sessions and retains the existing 600-token cap. The 30-second floor belongs to the board pass, and each group's overflow stays queued. An explicit orchestration.defaultAssignee overrides the model owner for every group. A utility-model failure in one group retains its prior placements and does not block other groups; the warning logs once until recovery.

Expose classifying: true while an initial empty result is still being prepared. The page shows “Classifying sessions…” without blocking controls or hiding warnings, and rereads through the existing Workboard change epoch. Even a completed empty pass now publishes the epoch needed to clear that status. Add a once-per-streak warning for empty default-scope rosters and an info message when an owner swap aborts classification. Document the model owner and regenerate the plugin UI manifest.

User Impact

Multi-agent Gateways classify sessions using the correct utility model without requiring a Gateway default agent. Operators can distinguish a board that is still classifying from a completed empty board, and partial model failures remain visible while other agents' sessions continue to progress. Foreground reads retain each caller's session visibility; background reads retain the Gateway system actor.

Why This Change Was Made

The classifier called resolveDefaultAgentId despite already having an explicit owner on every session. That resolver correctly refuses to choose an implicit owner on a multi-agent Gateway. Passing each session agent to the existing per-agent completion cache fixes ownership at the caller and preserves the shared completion, authorization, and persistence contracts.

Evidence

Failing-before regression, against the original classifier:

node scripts/run-vitest.mjs extensions/workboard/src/sessions-board.test.ts --maxWorkers=1 -t 'classifies a multi-agent board'
FAIL classifies a multi-agent board with assignee undefined
Received warning:
Sessions board sessions classification failed: AgentSelectionRequiredError: Multiple agents are configured, but this operation has no explicit owner. Select an agent explicitly; CLI callers can pass --agent <id>, channels can add a binding, and ambient services can set their agentId target.
Tests 2 failed | 22 skipped (24)
[test] failed 1 Vitest shard in 98.93s

The override case also exposed the old single mixed-agent completion. After the fix, both cases pass, along with per-agent overflow/board-throttle coverage, partial failures and recovery, first-read/empty completion status, UI epoch rereading, and the retained trusted session-facts regressions.

node scripts/run-vitest.mjs extensions/workboard/src/sessions-board.test.ts extensions/workboard/src/gateway.test.ts extensions/workboard/browser/pages/workboard/workboard-page-sessions.test.ts src/gateway/server-plugins.session-facts.test.ts --maxWorkers=1

Final result: 63 tests passed across four files in 155.64 seconds on the rebased head. The Gateway shard took 75.47 s, the page shard 3.42 s, and the two-file Workboard database shard 64.61 s; wrapper preparation and cleanup account for the remainder. These wall times include compiled worker preparation. A standalone pnpm test extensions/workboard/src/sessions-board.test.ts --maxWorkers=1 run passed all 27 tests in 56.52 s (49.71 s Vitest duration). The suite uses the real SQLite placement owner to exercise persisted partial results, pin preservation, and cancellation, with fake clocks and model responses. Hosted CI timing is pending.

Passed: pnpm tsgo:core, the full pnpm tsgo:core:test, pnpm tsgo:extensions, pnpm tsgo:extensions:test, touched-file oxfmt --check, and pnpm check:deprecated-api-usage. Generated assets match the committed bytes, git merge-tree --write-tree origin/main HEAD is clean, and Codex autoreview returned scoped-clean at P0/P1 with exit 0. The full core typecheck lanes passed before the mechanical conflict rebase; the focused suite, extension typechecks, lint, asset/deprecation/SDK checks, and browser capture were repeated afterward. The rebase retained main's equivalent WorkboardSessionPlacementWrite type and regenerated the UI manifest; reviewed runtime behavior did not change. The pinned installation was restored with pnpm install --frozen-lockfile; no dependency manifest or lockfile changed. Public SDK surface check: 151 entrypoints / 3,631 exports / 2,107 callable exports (all entrypoints: 366 / 7,283 / 4,382).

Synthetic before/after browser proof below demonstrates the first-classification status. The same browser scenario verified warning coexistence and removal of the status after an epoch-triggered reread.

Before: an empty Sessions board without a classification status

After: the initial classification is visible without blocking the board

…lti-agent Gateways

Use the existing per-agent utility completion owner, with the board's explicit
assignee as an override. Bound each agent group to eight sessions per pass and
retain the board-wide 30-second interval, fair overflow queue, and partial-failure
warnings without blocking healthy groups.

Show a non-blocking classifying state on the initial empty board, publish empty
completion epochs, and make empty rosters and owner swaps visible in logs.
Regenerate the plugin UI manifest and document the ownership and loading state.
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime plugin: workboard size: M labels Oct 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 4:38 PM ET / 20:38 UTC (Revision 2).

ClawSweeper review

What this changes

Workboard classifies sessions in bounded groups using each session’s agent, preserves progress when a group fails, and shows a loading status on initially empty Sessions boards.

Merge readiness

✅ Ready for maintainer review

This repair remains necessary: current main still selects an implicit default agent for classification. The pinned patch has no actionable introduced defect, consistent with the prior review.

Priority: P2
Reviewed head: 9acd455ed6be562daa40efda4468ad1f70fe80df

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with direct visual evidence, meaningful regression coverage, and no actionable introduced findings.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected synthetic browser before/after screenshots directly demonstrate the added Sessions-board classification status. Backend ownership and recovery evidence uses mocked completions with real SQLite and is supplemental; the supplied MEMBER classification exempts ordinary contributor setup proof. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected synthetic browser before/after screenshots directly demonstrate the added Sessions-board classification status. Backend ownership and recovery evidence uses mocked completions with real SQLite and is supplemental; the supplied MEMBER classification exempts ordinary contributor setup proof. No stored-data contract changes.
Evidence reviewed 8 items Current main still needs the repair: Fetched main selects board.orchestration.defaultAssignee or resolveDefaultAgentId before one mixed-agent completion. The resolver requires a sole agent when no legacy default is configured, matching the reported multi-agent failure.
Bounded classification through the existing completion owner: The introduced classifier selects at most eight sessions per agent, runs groups sequentially, retains the explicit board assignee override, and catches failures per group. The unchanged completion owner already caches prepared utility models by configuration and agent and enforces cancellation and current-service checks.
Visibility and persistence safeguards retained: Foreground reads still intersect cached facts with the requesting caller’s roster and session identity. Model writes retain the service-current guard, expected board specification, and expected placement revision; the unchanged SQLite owner compares all affected rows before writing. The patch does not introduce a new authorization capability or stored-data format.
Findings None None.
Security None None.

How this fits together

Workboard’s Sessions boards consume Gateway session facts and place conversations into columns using state rules and utility-model judgment. The Control UI reads the resulting placement cache through the caller’s session visibility filters.

flowchart TD
  A[Gateway session facts] --> B[Workboard classifier]
  B --> C[State rules]
  B --> D[Groups by session agent]
  D --> E[Agent utility model]
  C --> F[Placement cache]
  E --> F
  F --> G[Caller visibility filter]
  G --> H[Sessions board and loading status]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +64, Tests +273, Docs +5. Total +342 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 5 119 55 +64
Tests 3 288 15 +273
Docs 1 14 9 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 421 79 +342

Review metrics

Metric Value Why it matters
Production versus test growth production +64 net lines; tests +273 net lines Production growth implements per-agent failure isolation and initial-status lifecycle handling, with substantially larger regression coverage.

Technical review

Best possible solution:

Keep classification in the existing Workboard service, using explicit session ownership while preserving board overrides, cached placements, and visible partial failures.

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

Yes, from source: a multi-agent configuration without an explicit board assignee reaches current main’s implicit default-agent resolver during utility classification. The captured body also supplies a failing-before regression; this review did not execute it.

Is this the best way to solve the issue?

Yes. Selecting each session’s existing agent at the classifier caller reuses the established per-agent completion owner and fixes the ownership mismatch without adding configuration or another implementation.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Inspected synthetic browser before/after screenshots directly demonstrate the added Sessions-board classification status. Backend ownership and recovery evidence uses mocked completions with real SQLite and is supplemental; the supplied MEMBER classification exempts ordinary contributor setup proof. No stored-data contract changes.

Label justifications:

  • P2: This fixes classification and loading feedback in the optional Workboard plugin with a limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected synthetic browser before/after screenshots directly demonstrate the added Sessions-board classification status. Backend ownership and recovery evidence uses mocked completions with real SQLite and is supplemental; the supplied MEMBER classification exempts ordinary contributor setup proof. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected synthetic browser before/after screenshots directly demonstrate the added Sessions-board classification status. Backend ownership and recovery evidence uses mocked completions with real SQLite and is supplemental; the supplied MEMBER classification exempts ordinary contributor setup proof. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected synthetic browser before/after screenshots directly demonstrate the added Sessions-board classification status. Backend ownership and recovery evidence uses mocked completions with real SQLite and is supplemental; the supplied MEMBER classification exempts ordinary contributor setup proof. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: 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 (1 earlier review cycle)
  • reviewed 2026-10-02T20:19:20.689Z sha 9acd455 :: needs maintainer review before merge. :: none

@steipete
steipete marked this pull request as ready for review October 2, 2026 20:34
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 2, 2026
@steipete
steipete merged commit b79ec83 into main Oct 2, 2026
197 of 209 checks passed
@steipete
steipete deleted the steipete/session-facts-membership-ready branch October 2, 2026 20:50
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Landed with a pinned-head squash merge past an inherited red, per the standing rule for failures that also fail on current main.

On head 9acd455 (run 37061408628) every lane the diff touches passed. The only real failure was checks-ui-e2e (2/9):

ui/src/e2e/session-owner-filter-header.e2e.test.ts > filters to a person from the group header and clears from the toolbar
AssertionError: expected 2 to be 1  (openSidebarSortMenu: getByRole("button", { name: "Filter & sort" }).count())

The other checks-ui-e2e shards were fail-fast cancellations. The same shards fail on main (hourly runs 37054655798 and 37061184155) since #163664 added a second sidebar button named "Filter & sort people", which the non-exact Playwright locator now also matches. This PR does not touch ui/. The forward fix (exact locator names in the UI e2e helpers) is being pushed directly to main.

vincentkoc added a commit that referenced this pull request Oct 2, 2026
* commit '79be075e5aa46be9e42dbd53ed6e30e81469210a': (33 commits)
  fix(ui): keep selected-text comment input readable while scrolling (#163772)
  test(memory): open corpus database explicitly
  fix: bound Doctor migration capture to plugin data (#163780)
  fix(ui): gate system information at the shared reader (#160982)
  chore(db): reclassify worker inventory sites with caller evidence (#163754)
  refactor(channels): deslop Slack and Matrix (#163740)
  fix(agents): reject empty sessions_search queries in the tool schema (#129120)
  perf(nodes): load only what a worker turn needs (#160442)
  test(cli): assert concise Gateway failure copy in CLI process tests (#163649)
  refactor(discord): deslop discord (#163728)
  fix(workboard): make Sessions boards work on multi-agent Gateways (#163761)
  test(gateway): add sustained heap retention diagnostics (#163764)
  test(ui): disambiguate session filter controls
  refactor(plugins): deslop imessage, mattermost, and voice-call (#163767)
  fix(qa): run Telegram plugin source in --source-gateway userbot runs (#163718)
  feat(macos): add a --no-activate launch flag for background automation (#163758)
  fix(agents): preserve host authority across module reloads (#163725)
  perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (#163690)
  fix: keep video widgets scrollable and preload initial frames (#163762)
  feat(memory): add a provider-neutral memory provider runtime (#162175)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…enclaw#163761)

Group sessions needing utility-model judgment by their own agent and run one bounded completion per group, with orchestration.defaultAssignee as an override, so multi-agent Gateways no longer fail classification with AgentSelectionRequiredError. A failed group keeps its prior placements without blocking other agents. Expose classifying on the read contract and show a Classifying sessions status before the first pass completes; announce a change epoch for empty passes. Warn once per streak on empty default-scope rosters and log owner swaps that abort classification.
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Oct 3, 2026
* commit '1fda703fb4d3630e4633461967b2a2186e8f15fd': (33 commits)
  fix(ui): keep selected-text comment input readable while scrolling (openclaw#163772)
  test(memory): open corpus database explicitly
  fix: bound Doctor migration capture to plugin data (openclaw#163780)
  fix(ui): gate system information at the shared reader (openclaw#160982)
  chore(db): reclassify worker inventory sites with caller evidence (openclaw#163754)
  refactor(channels): deslop Slack and Matrix (openclaw#163740)
  fix(agents): reject empty sessions_search queries in the tool schema (openclaw#129120)
  perf(nodes): load only what a worker turn needs (openclaw#160442)
  test(cli): assert concise Gateway failure copy in CLI process tests (openclaw#163649)
  refactor(discord): deslop discord (openclaw#163728)
  fix(workboard): make Sessions boards work on multi-agent Gateways (openclaw#163761)
  test(gateway): add sustained heap retention diagnostics (openclaw#163764)
  test(ui): disambiguate session filter controls
  refactor(plugins): deslop imessage, mattermost, and voice-call (openclaw#163767)
  fix(qa): run Telegram plugin source in --source-gateway userbot runs (openclaw#163718)
  feat(macos): add a --no-activate launch flag for background automation (openclaw#163758)
  fix(agents): preserve host authority across module reloads (openclaw#163725)
  perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (openclaw#163690)
  fix: keep video widgets scrollable and preload initial frames (openclaw#163762)
  feat(memory): add a provider-neutral memory provider runtime (openclaw#162175)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. plugin: workboard proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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