Repository navigation
fix: restore subagent and background process side panels - #164061
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 3, 2026, 8:49 PM ET / October 4, 2026, 00:49 UTC (Revision 12). ClawSweeper reviewWhat this changesRestores separate Subagents and Processes chat panels with child transcripts, recent command output, exact-target Stop controls, and supporting worker transport and test-runner repairs. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: the restoration remains useful, and the earlier compatibility concern is resolved by the additive contracts and existing ownership boundaries. No actionable introduced defect was found. Likely related people: steipete and shakkernerd, supported as routing candidates by current-main UI history. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI displays work belonging to a conversation using Gateway session and process owners. Panel requests retrieve child transcripts or bounded process output, while Stop requests reach the authorized owner of the selected run or process. flowchart TD
A[Parent conversation] --> B[Subagents panel]
A --> C[Processes panel]
B --> D[Gateway session access]
C --> D
D --> E[Local or worker process owner]
D --> F[Child transcript owner]
E --> G[Recent output and exact Stop]
F --> H[Child transcript and run Stop]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Restore beside-parent inspection through existing session, transcript and process owners while preserving saved layouts, permission ceilings and exact-target cancellation. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main lacks the dedicated panel slots and modules needed for beside-parent inspection. This review did not execute target code. Is this the best way to solve the issue? Yes. The patch restores the UI through existing session and process owners, keeps the retired Tasks registry removed, and preserves authorization and stored-layout behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ca267fa035f8. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
59afcf6 to
232bb69
Compare
Restore bounded process observations and exact-instance Stop through existing local and retained-worker owners. Preserve narration release custody, permission ceilings, and parent drafts; keep Subagents out of the topbar. Co-authored-by: steipete <[email protected]> Co-authored-by: shakkernerd <[email protected]>
Separate sidebar restoration — a1e2182Subagents and Processes are independent side-panel tabs. The dedicated Subagents icon is removed from the conversation and Home topbars. The existing Subagents design, child transcript, and parent draft ownership are retained. Before / afterActual built Control UI, Chromium, dark theme, 1440×900, synthetic Gateway data. Before is the original PR head 232bb69, which has Subagents but no Processes. After is this restoration candidate. Both images were inspected and delivered in the originating conversation.
Completed verification
Production delta against the PR merge base is +3,249 lines; tests/support +2,845. Growth restores two independent panel flows and the missing bounded process read/exact-stop transport through existing registry/supervisor owners; it introduces no parallel Tasks registry, storage migration, retention change, or configuration option. CI follow-up and compatibilitySix CI failures were repaired: append-only method registration, schema owner inventory, current/private/serial browser-test inventories, a frozen-target inventory that must not follow current tests, the deliberately removed topbar button expectation, and the canonical monospace theme token. The affected suites pass (34 method cases; 13 inventory cases; 6 theme cases; 6 additional browser scenarios). The updated image above includes the final output typography. The actual exec/child live proof described above was run on the e28a8 runtime repair. Subsequent changes have focused method-order, inventory, and UI proof; that completed runtime evidence is retained rather than represented as a new live run. Configuration and upgrade compatibility reviewed: no new config/default, database schema/version, persisted process store, retention change, or permission grant. The new schema module is an additive RPC contract, not stored data. Existing method indices and saved layouts remain valid. Older retained workers are rejected with actionable unavailability before unknown process commands; no alternate owner fallback. This addresses the review's compatibility question. Two broader worker-wire CI failures from the previous head remain under isolated diagnosis; they are not being called inherited or passing. Landing remains pending their disposition and the native gates. Conflict repair and runner readiness — 22:23 UTCMerged current main to resolve the actual conflict, preserving contributor ancestry and main's consolidated SSH/node timeout tests. The new process-observation fixture method remains present. On this published head, 32 worker environment/observation cases, six process-RPC permission cases, and 68 sidebar/controller/composer UI cases pass (106 total). The frozen dependency lock is reconciled. Two isolated-runner defects encountered during diagnosis are also repaired: complete private-QA/declaration preparation for the canonical E2E configuration, and private scratch on the existing admitted snapshot disk. They preserve HOME isolation, the 2-GiB /tmp cap, networking, mounts, authority, and cleanup. Their 33 focused tests and changed-file lint pass; they do not claim to fix either runtime CI failure. The original two worker-wire failures remain under investigation. The earlier Testbox admission expired and AWS refused allocation at its active-lease cap; neither command reached runtime assertions. Diagnosis has resumed. Current-head CI is https://github.com/openclaw/openclaw/actions/runs/37158161545; it is not yet passing evidence. Existing screenshots and e28 live proof remain historical evidence for unchanged behavior, not a fresh live run on this head. No Team production deployment. Final worker-wire repairs — 23:10 UTCBoth previously failing scenarios now have reproduced causes and passing repairs:
Proof used supported rootless isolation, unchanged deadlines and a complete private-QA/declaration build (final build9m17.6s). Fresh independent P0-P2 review found no actionable findings. Formatting, focused type-aware lint and diff-check pass. Parent integration reran all50 build-configuration cases successfully (16.80s wrapper). Temporary instrumentation is absent from source; owned containers/snapshots and AWS lease cleaned up. Fixes published as17d445/36dfcee. Both earlier CI findings are resolved by source and red-to-green proof; current-head hosted CI and native landing gates remain pending. Earlier screenshots and e28 live UI evidence retain original attribution. No Team deployment, schema/protocol bump, permission or timeout change. Remaining CI failures repaired — October4,00:27UTCAll three roots from the completed04d95a58 CI run are now addressed:
Current published head:ed13d849bd72b7b4526c03478239c6276aaf0ec9. Exact-head CI:https://github.com/openclaw/openclaw/actions/runs/37164774724. Landing now uses normal completed gates and direct native recovery, not an inherited-red exception. Auto-merge remains disabled. No Team deployment. Earlier visual and real-Gateway evidence retains its original attribution above. Final test-harness integration — October4,00:42UTCThe completeded13 run passed the original worker/runtime repairs and exposed three harness issues. All have reproduced repairs:
All patches have fresh scoped P0-P2 clean review and checked lint/formatting. Alias duplication is removed instead of adding a special-case fallback. Auto-merge stays disabled; direct native recovery follows completed normal gates. Earlier runtime/media proof retains its attribution. Current head:a1e2182f9140778d6c5385ca1a7757fe079353cb. Current CI:https://github.com/openclaw/openclaw/actions/runs/37165639560 (pending, not a green claim). Landed — October4,2026,01:00UTCExact-head CI37165639560 passed with no pending checks. The native completed-evidence gate accepted sourcea1e2182f9140778d6c5385ca1a7757fe079353cb, and direct recovery landed it as e25a981. GitHub merged state, retained native complete receipt and containment on main were verified. Auto-merge was not re-enabled; no admin CI exception or Team deployment was used. Native PR worktree and task-owned PR branches were removed and their absence verified. |
|
|
🦞👀 Re-review progress:
|
Reuse the existing cancellation confirmation predicate without masking timeout or finalization failures. Co-authored-by: steipete <[email protected]> Co-authored-by: shakkernerd <[email protected]>
|
🦞👀 Re-review progress:
|
* improve: show configured names for shared operator profiles * fix(ui): preserve unnamed shared owner labels across consumers * test(ui): align sidebar shared owner name expectation * fix(test): share package aliases with UI Vitest projects Backport the shared worker-runtime alias-owner entries from #164537. Reuse the shared aliases in standalone UI Vitest and cover them following #164061. * fix(ui): reconcile named shared-owner locale expectations and scan coverage * chore: prepare reviewed contributor base integration * fix(ui): preserve shared profile labels across main integration * chore: remove duplicate scan target * style(ui): format shared profile name fixture --------- Co-authored-by: TheAngryPit <[email protected]> Co-authored-by: Vyctor H. Brzezowski <[email protected]>
…#164593) * improve: show configured names for shared operator profiles * fix(ui): preserve unnamed shared owner labels across consumers * test(ui): align sidebar shared owner name expectation * fix(test): share package aliases with UI Vitest projects Backport the shared worker-runtime alias-owner entries from openclaw#164537. Reuse the shared aliases in standalone UI Vitest and cover them following openclaw#164061. * fix(ui): reconcile named shared-owner locale expectations and scan coverage * chore: prepare reviewed contributor base integration * fix(ui): preserve shared profile labels across main integration * chore: remove duplicate scan target * style(ui): format shared profile name fixture --------- Co-authored-by: TheAngryPit <[email protected]> Co-authored-by: Vyctor H. Brzezowski <[email protected]>
## Problem Open a brand-new main chat (no messages yet, for example right after onboarding sets a model). Session Details shows a red "Session process access changed; refresh the conversation." with Retry until the first reply arrives. The Gateway log shows three refused reads for the same chat: - `sessions.processes.list` → `FORBIDDEN` "Session process access changed; refresh the conversation." - `mcp.app.discover` → `FORBIDDEN` "The requested session is unavailable; open an existing session first." - `talk.catalog` → `INVALID_REQUEST` "No session found: agent:main:main" A config hot reload is not needed: a fresh profile with a model already configured shows the same three refusals.  ## Root cause The agent's main conversation has no session row until its first turn creates it. The chat still starts session-scoped reads for it on open: - Session Details reads processes as soon as it renders (`ui/src/pages/chat/chat-pane-layout-render.ts:293`, process Details since #175041). The Gateway has no row to bind the list to and answers with the access-changed error (`src/gateway/server-methods/session-processes.ts:69-79`, since #164061). - The composer mounts MCP discovery for the chat. The composer already has a `sessionAdmitted` gate for provisional sessions (`chat-composer-view.tsx:414`, #166865), but the chat pane never set it. Discovery needs a session authority, which needs a row (`src/gateway/session-access-authority.ts:246`). - The composer reads the session-scoped Talk catalog. The catalog only uses the key to pick the agent, but `talk.catalog` refused the missing row (`src/gateway/talk/handlers/catalog.ts:536`). Subscriptions already admit the caller's own unstarted main conversation (`isStartableMainSession`, #197151). v2026.11.6 has the same chat pane and process code. ## Fix Each reader is fixed at the owner of the fact it depends on: | Read | Depends on | Owner and fix | |---|---|---| | `sessions.processes.list` | the row's `sessionId` | Control UI: Details stops offering process reads once the chat's history read proved the session absent (`isChatSessionProvenAbsent`, #197151). A cold load of an existing chat keeps its Details layout while rows load. | | `mcp.app.discover` | a session authority built from the row | Control UI: the chat pane sets the composer's existing `sessionAdmitted` gate from the selected row, so composer extensions mount once it exists | | `talk.catalog` | only the agent named by the key | Gateway: answers the caller's own unstarted main conversation from its agent (same `isStartableMainSession` rule as subscriptions); other missing or hidden keys still get "No session found" | Holding `talk.catalog` in the UI instead would keep dictation unavailable for the first message, and the protocol has no agent-only form of the request. Same PR, first send (two causes, both at their owner): - **Diff baseline (session creation owner).** The first turn captures the session diff baseline (`sessionDiffBaseline`, the files that existed before the session) about half a second after `chat.send` creates the row. A diff read in that window either showed pre-existing workspace files as session changes or was refused with "Session workspace changed during file access" when the baseline landed. A new operator conversation now records the pending baseline claim (`sessionDiffBaselineCapture`) with its row, as `sessions.create` already does (`buildNewSessionCreationFields` in `src/config/sessions/session-diff-baseline-capture.ts`), and the diff answers "no changes" while the claim is pending (`src/gateway/server-methods/sessions-diff.ts`). The first turn's existing capture settles the claim. - **Skill-library selection (workspace owner).** The first turn writes an empty selection (`librarySelections: []`) into a row that had none, and the session file workspace compared `undefined` with `[]` strictly. The sandbox owner already treats both as "no selection" (`librarySelections?.length`); the workspace check now does too. The existing access-change refusals (replaced row, revoked sharing) are unchanged. ## Impact - A new chat opens without an error. Processes and MCP controls appear after the first turn, which is when they can have content. The first message can be dictated. - No protocol or schema change.  ## Evidence - Real-Gateway Control UI e2e `ui/src/e2e/chat-new-session-readers.real-gateway.e2e.test.ts`: opens `agent:main:main` before its first turn at 1600x900, sends the first message, checks that no non-retryable Gateway read failed and that process, MCP and diff reads succeed after the row exists. Red on the merge base (the three refusals above), green on this branch. - `src/gateway/talk/handlers/catalog.test.ts` "answers the caller's unstarted main conversation from its agent": red on the merge base, green here. A missing non-main key and a caller who cannot start the conversation still get "No session found". - `src/gateway/server-methods/sessions-diff-reset.test.ts` "shows no changes for a new operator conversation before its first turn captures the baseline": creates the row through the real reply session init, then reads the diff of a repo with a pre-existing file. Red on the merge base (the pre-existing file is listed as a session change), green here. - `src/gateway/server-methods/session-file-live-read.test.ts` "keeps a diff read across the first turn recording no library skills": red on the merge base, green here; a real selection change still invalidates. - Isolated Gateway with a real provider, fresh agent main chat, Control UI at 1600x900: base shows the alert and logs the three refusals; this branch shows no alert and no refusal, and the first reply arrives. - Existing consumers: `chat-pane-side-panels.test.ts`, `chat-details-reload.e2e.test.ts`, `test/vitest-ui-e2e-config.test.ts` green. `chat-pane-state-snapshot.e2e.test.ts` was red on `main` and is fixed separately in #203246. - `pnpm tsgo:ui`, `pnpm check:test-types`, `pnpm check:changed` (the dead-export scan reports two exports in files this PR does not touch; same on `main`). Isolated Gateway first-send log (fresh agent, real provider, head rebased on #203283): from opening the brand-new chat through the first reply, no FORBIDDEN, UNAVAILABLE or INVALID_REQUEST line. The `talk.catalog` first-read "warming" answer is fixed at its owner in #203283. ## Merge danger Two-way door: a revert fully restores the previous behavior. No stored state, config or published contract changes. Blast radius: Control UI chats, `talk.catalog` callers for an unstarted main conversation, new operator session rows (pending diff-baseline claim), and session file/diff reads across the first turn. Co-authored-by: Ayaan Zaidi <[email protected]>
…w#203126) ## Problem Open a brand-new main chat (no messages yet, for example right after onboarding sets a model). Session Details shows a red "Session process access changed; refresh the conversation." with Retry until the first reply arrives. The Gateway log shows three refused reads for the same chat: - `sessions.processes.list` → `FORBIDDEN` "Session process access changed; refresh the conversation." - `mcp.app.discover` → `FORBIDDEN` "The requested session is unavailable; open an existing session first." - `talk.catalog` → `INVALID_REQUEST` "No session found: agent:main:main" A config hot reload is not needed: a fresh profile with a model already configured shows the same three refusals.  ## Root cause The agent's main conversation has no session row until its first turn creates it. The chat still starts session-scoped reads for it on open: - Session Details reads processes as soon as it renders (`ui/src/pages/chat/chat-pane-layout-render.ts:293`, process Details since openclaw#175041). The Gateway has no row to bind the list to and answers with the access-changed error (`src/gateway/server-methods/session-processes.ts:69-79`, since openclaw#164061). - The composer mounts MCP discovery for the chat. The composer already has a `sessionAdmitted` gate for provisional sessions (`chat-composer-view.tsx:414`, openclaw#166865), but the chat pane never set it. Discovery needs a session authority, which needs a row (`src/gateway/session-access-authority.ts:246`). - The composer reads the session-scoped Talk catalog. The catalog only uses the key to pick the agent, but `talk.catalog` refused the missing row (`src/gateway/talk/handlers/catalog.ts:536`). Subscriptions already admit the caller's own unstarted main conversation (`isStartableMainSession`, openclaw#197151). v2026.11.6 has the same chat pane and process code. ## Fix Each reader is fixed at the owner of the fact it depends on: | Read | Depends on | Owner and fix | |---|---|---| | `sessions.processes.list` | the row's `sessionId` | Control UI: Details stops offering process reads once the chat's history read proved the session absent (`isChatSessionProvenAbsent`, openclaw#197151). A cold load of an existing chat keeps its Details layout while rows load. | | `mcp.app.discover` | a session authority built from the row | Control UI: the chat pane sets the composer's existing `sessionAdmitted` gate from the selected row, so composer extensions mount once it exists | | `talk.catalog` | only the agent named by the key | Gateway: answers the caller's own unstarted main conversation from its agent (same `isStartableMainSession` rule as subscriptions); other missing or hidden keys still get "No session found" | Holding `talk.catalog` in the UI instead would keep dictation unavailable for the first message, and the protocol has no agent-only form of the request. Same PR, first send (two causes, both at their owner): - **Diff baseline (session creation owner).** The first turn captures the session diff baseline (`sessionDiffBaseline`, the files that existed before the session) about half a second after `chat.send` creates the row. A diff read in that window either showed pre-existing workspace files as session changes or was refused with "Session workspace changed during file access" when the baseline landed. A new operator conversation now records the pending baseline claim (`sessionDiffBaselineCapture`) with its row, as `sessions.create` already does (`buildNewSessionCreationFields` in `src/config/sessions/session-diff-baseline-capture.ts`), and the diff answers "no changes" while the claim is pending (`src/gateway/server-methods/sessions-diff.ts`). The first turn's existing capture settles the claim. - **Skill-library selection (workspace owner).** The first turn writes an empty selection (`librarySelections: []`) into a row that had none, and the session file workspace compared `undefined` with `[]` strictly. The sandbox owner already treats both as "no selection" (`librarySelections?.length`); the workspace check now does too. The existing access-change refusals (replaced row, revoked sharing) are unchanged. ## Impact - A new chat opens without an error. Processes and MCP controls appear after the first turn, which is when they can have content. The first message can be dictated. - No protocol or schema change.  ## Evidence - Real-Gateway Control UI e2e `ui/src/e2e/chat-new-session-readers.real-gateway.e2e.test.ts`: opens `agent:main:main` before its first turn at 1600x900, sends the first message, checks that no non-retryable Gateway read failed and that process, MCP and diff reads succeed after the row exists. Red on the merge base (the three refusals above), green on this branch. - `src/gateway/talk/handlers/catalog.test.ts` "answers the caller's unstarted main conversation from its agent": red on the merge base, green here. A missing non-main key and a caller who cannot start the conversation still get "No session found". - `src/gateway/server-methods/sessions-diff-reset.test.ts` "shows no changes for a new operator conversation before its first turn captures the baseline": creates the row through the real reply session init, then reads the diff of a repo with a pre-existing file. Red on the merge base (the pre-existing file is listed as a session change), green here. - `src/gateway/server-methods/session-file-live-read.test.ts` "keeps a diff read across the first turn recording no library skills": red on the merge base, green here; a real selection change still invalidates. - Isolated Gateway with a real provider, fresh agent main chat, Control UI at 1600x900: base shows the alert and logs the three refusals; this branch shows no alert and no refusal, and the first reply arrives. - Existing consumers: `chat-pane-side-panels.test.ts`, `chat-details-reload.e2e.test.ts`, `test/vitest-ui-e2e-config.test.ts` green. `chat-pane-state-snapshot.e2e.test.ts` was red on `main` and is fixed separately in openclaw#203246. - `pnpm tsgo:ui`, `pnpm check:test-types`, `pnpm check:changed` (the dead-export scan reports two exports in files this PR does not touch; same on `main`). Isolated Gateway first-send log (fresh agent, real provider, head rebased on openclaw#203283): from opening the brand-new chat through the first reply, no FORBIDDEN, UNAVAILABLE or INVALID_REQUEST line. The `talk.catalog` first-read "warming" answer is fixed at its owner in openclaw#203283. ## Merge danger Two-way door: a revert fully restores the previous behavior. No stored state, config or published contract changes. Blast radius: Control UI chats, `talk.catalog` callers for an unstarted main conversation, new operator session rows (pending diff-baseline claim), and session file/diff reads across the first turn. Co-authored-by: Ayaan Zaidi <[email protected]>


What Problem This Solves
Fixes missing beside-parent inspection of ordinary subagents and background shell processes after the old Tasks/sidebar flow was removed.
User Impact
Subagents and Processes are separate chat side panels, not a merged work list. Subagents retain the existing design and full child transcript. Processes show running and recently finished commands, bounded recent output, and Stop for the exact process. Inspection does not consume the agent's output or replace the parent's draft.
Existing retention and permissions are unchanged. Output is temporary, not a durable terminal archive. A disconnected or incompatible remote worker reports an explicit error rather than pretending no processes exist.
Why This Change Was Made
Reuse the existing child-session, transcript, exec-registry, and process-supervisor owners. The process API routes to the session's actual local or retained-worker owner, rechecks authority after asynchronous work, and never substitutes a whole-turn cancellation for process Stop. Hidden/disposed Subagents panels retain responsibility for retrying subscription releases.
Review also corrected Stop availability for own-session-only credentials and distinguished a process omitted from a limited snapshot from one no longer retained. No Tasks registry, database migration, config option, or retention change is introduced.
Compatibility review
No configuration option or default, SQLite schema/version, persisted process store, or retention policy changes. The new session-process schema describes additive RPC messages, not a stored data model. New methods append to the canonical method table without shifting existing advertised indices. The two side-panel slot names are additive; existing saved layouts, order, and defaults remain valid. The Gateway and its Control UI ship together.
Retained workers keep their existing lifecycle. Process observation/control requires the current bundle and exact session, placement, owner epoch, node connection, and process incarnation. An older or unavailable worker returns actionable unavailability; it is not sent unknown process messages and never falls back to another process owner. Existing read/write and own-session ceilings remain enforced. No migration or operator configuration change is required. These contracts were source-reviewed and covered by saved-layout, older-endpoint, stale-owner, permission, and append-only method-order tests.
Original Subagents implementation and design by @shakkernerd. Separate-panel restoration, verification, and landing requested by @steipete.
Work sessions
Evidence
Inspected before/after screenshots and verification details.
The runtime/UI builds, final type graphs, changed-scope lint, 17 mock-Gateway browser scenarios, and the real-Gateway composition pass. The real proof executes and independently stops an actual child and background process, verifies socket/stream closure and terminal state, and preserves the parent draft through reload at desktop/mobile widths. Its loopback model provider is scripted, not an external API. Permission, cancellation-incarnation, partial-list, requested-Stop, and subscription-cleanup regressions are covered. No Team production deployment was performed.
Whole-core lint retains three unchanged maximum-line violations; the UI build reports a startup-JS size advisory. Neither baseline nor budget was relaxed. See the linked evidence for exact scope and limitations.
Original Subagents visual evidence
The following evidence belongs to the contributor's original head 232bb69; the separate Processes restoration is documented above and in the final verification comment.
Subagents panel interaction (playback slowed 2.5 times)
subagents-readable.webm
Visual verification
232bb6950c8796988873d383383f6fe9e4ef31deCI follow-up: all identified failures have reproduced repairs. Original worker scenarios, Linux ownership and terminal UI outcome fixes pass. The final harness batch also repairs workspace source aliases and stale node/Activity expectations:44combined tests pass on pinned Bun and Node,23configuration cases pass, plus2Activity browser and53owner tests. Exact-head CI:https://github.com/openclaw/openclaw/actions/runs/37165639560 (a1e2182) passed with no pending checks. See the verification comment for head-specific evidence.
Merged directly through the native workflow as e25a981 on October4,2026 at01:00UTC. Exact-head CI passed; auto-merge remained disabled. No inherited-red admin exception or Team deployment was used.