Skip to content

fix: allow independent placement of persistent spawned sessions - #148533

Draft
roboclaw-bot wants to merge 10 commits into
mainfrom
openclaw/we-need-to-differentiate-between-subagents-and-sessions-here
Draft

roboclaw-bot wants to merge 10 commits into
mainfrom
openclaw/we-need-to-differentiate-between-subagents-and-sessions-here

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Closes #147603
Related: #148423

What Problem This Solves

Fixes an issue where users could not move or pin a persistent follow-up session because the sidebar treated every session created by another session like a subordinate subagent run. Clearing a group also put the conversation back beneath its parent.

Why This Change Was Made

Persistent conversations now have independent sidebar placement; only actual subagent runs remain under a labeled Subagents section. Existing parent navigation, completion routing, workspace bindings, and permission ancestry are preserved. Confirmed group changes use the shared session-update owner so moves also reach sessions loaded only through a parent detail list.

User Impact

Users can drag persistent spawned sessions into another group, return them to ungrouped, pin them, and follow their parent backlink without changing the underlying execution relationship. Subagent runs remain visibly subordinate and cannot be independently pinned or moved.

Evidence

The Control UI browser scenario fails on the original source at the persistent session's draggable=false state. It passes after the change: move to Engineering, return to ungrouped, pin, and navigate back to the parent while the actual subagent stays nested. The scenario also covers a persistent session available only in the parent detail cache.

Before

Persistent session and subagent are both trapped beneath the parent

After

Persistent session moved to Engineering while the subagent remains under its parent

Screenshots use the real Control UI with a deterministic mocked Gateway. Evidence discussion.

  • 829 UI tests passed across 29 sidebar, lineage, navigation, menu, and Sessions-page files on the candidate before the final main refresh. This includes stale-response, owner/filter, workspace-placement, and selected-run coverage.
  • The selected subagent stays visible with subordinate controls while its first parent lookup is pending, moves into the resolved parent tree without duplication, and does not become an independent root when its parent is unavailable. The focused regression fails before the repair and passes afterward.
  • The new browser scenario passes under the existing serialized private-server owner; the CI resource-ownership regression also passes.
  • Session maintenance and stored batch-operation tests: 73 passed. Gateway patch/list/RPC coverage: 397 passed, with the unrelated no-Git-ancestor fixture passing under TMPDIR=/var/tmp; 26 Gateway handler tests were rerun after their final cleanup.
  • Three original-source navigation/projection regressions fail before the feature change and pass afterward.
  • The shared CI preflight blocker was repaired using the database-worker registry deduplication described in fix(ci): detect missing Wizard recovery fork routing #148423; 235 planner/timing tests passed after reproducing the failure. The final main merge preserves both live Wizard consumers exactly once after overlapping upstream fixes removed the remaining recovery registration, and extends independent selected-file routing coverage. The strict duplicate guard remains unchanged.
  • Independent P0/P1 review found no actionable defects. Final changed-surface checks cover types, lint, formatting, styles, i18n, exports, import cycles, and storage guards.

Validation ran in an independently installed local checkout after Testbox authentication and AWS workload admission were unavailable. The unused AWS lease was released. No live provider or production session state was used. Local dependency revalidation for the final main refresh stalled at supply-chain verification and was stopped without bypassing that check; final exact-head hosted CI is required before landing.

Implementation scope

The change removes category-dependent child promotion and ancestry-dependent pin policy, uses real subagent identity for subordinate controls, and keeps cached group receipts in the existing scoped field-reconciliation path. Existing nested-run fixtures now use subagent keys; persistent-session cases assert independent placement. No storage schema, runtime ownership, retention policy, or permission contract was added. Existing pin protection now applies to the newly pinnable persistent conversations.

Worked on by


View the OpenClaw team session

roboclaw-bot and others added 10 commits September 14, 2026 06:38
Distinguish persistent conversations from subordinate subagent runs without changing their origin, completion, or permission ancestry.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 4ffcee19-b0c8-4baa-8c40-525bffcd651f
Keep unresolved selected runs visible with subordinate controls, retain unavailable-parent behavior, migrate remaining nested-run fixtures, and register the browser regression under its serial resource owner.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: b2c50cb8-85cc-4ca4-b211-e01b94de180d
Preserve the published branch history using the exact conflict-resolved tree already validated by 829 UI tests and the browser workflow.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: b67b9375-75bf-47cd-9285-7563ab2db90c
Carry the one-line CI unblock described in #148423 by @steipete. Preserve the first Wizard recovery registration, every unique test, and the strict duplicate guard.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 601f7689-d046-430c-bad5-8fc21f7b7f78
Preserve both live Wizard consumers exactly once after overlapping upstream deduplication fixes. Extend independent selected-file routing coverage. Local dependency revalidation stopped at stalled supply-chain verification; exact-head hosted CI remains required.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 74109420-0750-4adf-aff6-2dec4e56ec4b
@clawsweeper

clawsweeper Bot commented Sep 14, 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 agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 5, 2026, 6:01 PM ET / 22:01 UTC (Revision 3).

ClawSweeper review

What this changes

The branch makes persistent spawned conversations independently movable and pinnable while preserving ancestry, and updates sidebar rendering, Gateway pin policy, documentation, and regression coverage.

Merge readiness

⛔ Blocked before merge - 4 items remain

This protected PR retains useful work: current main and v2026.9.8 still restrict spawned-conversation pinning and placement. No concrete introduced defect was found, but the conflicting head needs reconciliation with the newer subagent presentation decision.

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful implementation with strong visual evidence and focused boundary coverage; scope reconciliation remains a landing blocker.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots directly show the sidebar placement change; the recorded real-Control-UI browser scenario covers moving, ungrouping, pinning, cached-child placement, and parent navigation with a deterministic mocked Gateway. This proves the recorded branch behavior and should be refreshed after conflict reconciliation. Existing category and pin storage formats are reused.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after screenshots directly show the sidebar placement change; the recorded real-Control-UI browser scenario covers moving, ungrouping, pinning, cached-child placement, and parent navigation with a deterministic mocked Gateway. This proves the recorded branch behavior and should be refreshed after conflict reconciliation. Existing category and pin storage formats are reused.
Evidence reviewed 10 items Pinned introduction boundary: Reviewed the introduced merge-base-to-head changes rather than endpoint drift. The recorded checkout and original PR head are fdd111a; no pinned test merge is available.
Central request remains necessary: Current main still rejects pin eligibility when spawnedBy is present. Its sidebar renderer also requires a row not to be a child before permitting dragging; the current tree still nests ungrouped persistent children.
Latest-release check: The supplied latest release, v2026.9.8 at fc23bc8, retains the spawnedBy pin restriction. It does not ship this PR's independent pinning behavior.
Findings None None.
Security None None.

How this fits together

The Control UI builds its conversation sidebar from Gateway session rows and cached child details. Group and pin actions update Gateway-owned session metadata, while ancestry continues to support parent navigation and execution relationships.

flowchart TD
  A[Gateway session rows] --> B[Sidebar projection]
  C[Cached child details] --> B
  B --> D[Persistent conversation or subagent run]
  D --> E[Conversation placement controls]
  E --> F[Gateway session update]
  F --> B
  D --> G[Parent navigation and run presentation]
Loading

Decision needed

Question Recommendation
Should this PR be narrowed to independent persistent-session placement and pinning while preserving the current policy of hiding subagent sidebar rows? Preserve current run presentation: Carry forward independent persistent placement and pinning while retaining hidden run rows, parent summaries, and side-panel inspection.

Why: The original sponsored design predates a verified merged presentation decision, so resolving conflicts alone cannot determine the intended product outcome.

Before merge

  • Resolve merge risk (P1) - The head conflicts with its target branch; the reconciled implementation and placement scenario have not been reviewed.
  • Resolve merge risk (P1) - The branch's visible subagent-row design predates the merged decision to hide those rows; the intended landing scope needs confirmation.
  • Complete next step (P2) - Confirm the subagent presentation scope, resolve current-main conflicts, and repeat the placement browser scenario on the reconciled head.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source -37, Tests +419, Docs +2. Total +384 across 58 files.

View PR surface stats
Area Files Added Removed Net
Source 24 101 138 -37
Tests 33 1097 678 +419
Docs 1 5 3 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 58 1203 819 +384

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #147603
Summary: This PR is the open implementation candidate for independent persistent-session organization; related search and ancestry work covers different boundaries.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Give persistent conversations independent placement and pinning through existing session owners, retain ancestry, and preserve current parent summaries and Subagents side-panel inspection.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Give persistent conversations independent placement and pinning through existing session owners, retain ancestry, and preserve current parent summaries and Subagents side-panel inspection.

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

Yes: current source nests ungrouped spawned conversations, disables child-row dragging, and rejects spawnedBy pins; the recorded browser scenario demonstrates the restriction before the change. No runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Unclear as a landing candidate: separating placement from lineage uses the existing owners appropriately, but the run-row presentation must be reconciled with current main.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded conversation-organization improvement with demonstrated user value and no established urgent runtime failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after screenshots directly show the sidebar placement change; the recorded real-Control-UI browser scenario covers moving, ungrouping, pinning, cached-child placement, and parent navigation with a deterministic mocked Gateway. This proves the recorded branch behavior and should be refreshed after conflict reconciliation. Existing category and pin storage formats are reused.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots directly show the sidebar placement change; the recorded real-Control-UI browser scenario covers moving, ungrouping, pinning, cached-child placement, and parent navigation with a deterministic mocked Gateway. This proves the recorded branch behavior and should be refreshed after conflict reconciliation. Existing category and pin storage formats are reused.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots directly show the sidebar placement change; the recorded real-Control-UI browser scenario covers moving, ungrouping, pinning, cached-child placement, and parent navigation with a deterministic mocked Gateway. This proves the recorded branch behavior and should be refreshed after conflict reconciliation. Existing category and pin storage formats are reused.

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)
  • SunnyShu: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Reconcile current main under the confirmed run-presentation scope, then repeat the existing placement browser scenario and inspect updated before/after captures.

Rating scale

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

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

Workflow

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

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-14T21:03:14.810Z sha fdd111a :: needs maintainer review before merge. :: none
  • reviewed 2026-09-24T01:59:28.894Z sha fdd111a :: blocked before merge. :: none

This branch has not been deployed

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

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. 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: XL 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.

Improve sidebar organization of persistent spawned sessions

2 participants