Skip to content

fix: hide subagent sessions from Activity - #147253

Merged
steipete merged 3 commits into
mainfrom
codex/activity-hide-subagents
Sep 13, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/activity-hide-subagents

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users opening Activity → Sessions would see subagent work mixed into the recent conversation feed. A busy parent session could fill the feed with its children and inflate the people counts.

Why This Change Was Made

Activity requests the Gateway's new optional excludeSubagents session-list filter. The Gateway applies its canonical subagent-key classification before search, people/owner facets, counts, and pagination. This keeps ordinary nested conversations and conversations whose titles mention subagents visible. Existing session-list callers and Live activity diagnostics keep their behavior. The Swift request model is regenerated and the Activity guide describes the exclusion.

User Impact

The Activity Sessions feed stays focused on conversations, including when searching or filtering by people and time. Subagent sessions remain accessible through their parent conversations.

Evidence

  • Backend regression failed before the filter because subagents consumed the first page; all 49 owner/subagent tests passed after the fix. Coverage includes default/false compatibility, legacy keys, pagination, people counts, and ordinary nested sessions.
  • The bundled Control UI regression failed before the request flag (two rows instead of one), then passed through entry, search, and session-event refresh. The existing Activity refresh lifecycle E2E also passed.
  • Swift protocol generation check, core/UI typechecks (including tests), UI style lint, app lint, the full local macOS CI suite, unused-export checks, and remaining changed-scope boundary guards passed. Final-file lint and both hosted core lint shards passed. Independent review found no actionable issues.
  • Screenshots use synthetic mock Gateway data. Live deployment verification was not performed.
Before After
Activity includes a subagent row Activity keeps only the ordinary conversation

Filter subagent sessions before search, facets, counts, and pagination so Activity stays focused on conversations. Preserve normal nested sessions and existing diagnostic listings.
@clawsweeper

clawsweeper Bot commented Sep 13, 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 size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 18:04
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 2:38 PM ET / 18:38 UTC (Revision 2).

ClawSweeper review

What this changes

Adds an optional Gateway filter that keeps subagent sessions out of Activity’s conversation feed, search results, and people counts, with matching Swift support, documentation, and regression tests.

Merge readiness

✅ Ready for maintainer review

Keep open: this focused fix remains useful on current main, and no actionable correctness or security findings were identified. The related Session Share fix does not supersede it.

Priority: P3
Reviewed head: 8971457059549e45417438f635871c07e51a1ab4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with useful before/after captures and regression coverage; no blocking patch defect was found.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The maintainer-authored PR is exempt from the external live-setup gate. Inspected mock-Gateway screenshots show Activity changing from two rows to one; backend regression coverage supports filtering and counts, but no real deployment run is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external live-setup gate. Inspected mock-Gateway screenshots show Activity changing from two rows to one; backend regression coverage supports filtering and counts, but no real deployment run is claimed.
Evidence reviewed 11 items Introduced filter and preserved defaults: The introduced condition uses the existing subagent-key classifier and applies only when excludeSubagents is explicitly true. It runs before search, facets, and pagination.
Activity-only opt-in: The Sessions request sets excludeSubagents; the current-work request used by Live activity does not. Entry, search, and refresh share this request construction.
Production RPC and cache boundary: The sessions.list handler passes validated parameters into the existing projection owner. Its cache key serializes all request parameters, so filtered and unfiltered requests remain distinct. No authorization or persistence contract changes.
Findings None None.
Security None None.

How this fits together

Activity requests session lists from the Gateway to display recent conversations and people counts. The Gateway filters stored sessions before calculating facets and pagination; Live activity uses a separate request mode.

flowchart TD
  A[Activity Sessions filters] --> B[Session list request]
  C[Stored sessions] --> D[Gateway visibility and subagent filtering]
  B --> D
  D --> E[Search and people counts]
  E --> F[Pagination]
  F --> G[Conversation feed]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +4, Tests +138, Docs 0, Other +4. Total +146 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 3 5 1 +4
Tests 2 138 0 +138
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 0 +4
Total 7 148 2 +146

Review metrics

Metric Value Why it matters
Protocol addition 1 optional boolean; omitted and false preserve existing behavior The filter supports Activity without changing other session-list callers or persisted configuration.
Production versus regression coverage Production net +8 lines; tests +138 lines Production growth extends the existing filter owner; the tests cover pagination, facets, compatibility, and browser request lifecycle.

Technical review

Best possible solution:

Keep session classification and pre-pagination filtering in the Gateway, with Activity opting in and diagnostic listings retaining their existing behavior.

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

Yes, from source: current main includes recent subagent entries in Activity’s unfiltered session list, allowing them to consume page slots and contribute to people counts. Execution was not repeated in this read-only review.

Is this the best way to solve the issue?

Yes. Filtering at the existing Gateway owner keeps rows, counts, search, and pagination consistent; client-side filtering would leave counts and page membership incorrect.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This improves Activity feed relevance and counts without affecting agent execution or message delivery.
  • 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. Not applicable: The maintainer-authored PR is exempt from the external live-setup gate. Inspected mock-Gateway screenshots show Activity changing from two rows to one; backend regression coverage supports filtering and counts, but no real deployment run is claimed.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The maintainer-authored PR is exempt from the external live-setup gate. Inspected mock-Gateway screenshots show Activity changing from two rows to one; backend regression coverage supports filtering and counts, but no real deployment run is claimed.

Evidence

What I checked:

  • Introduced filter and preserved defaults: The introduced condition uses the existing subagent-key classifier and applies only when excludeSubagents is explicitly true. It runs before search, facets, and pagination. (src/gateway/session-utils-list.ts:237, 897145705954)
  • Activity-only opt-in: The Sessions request sets excludeSubagents; the current-work request used by Live activity does not. Entry, search, and refresh share this request construction. (ui/src/pages/activity/session-activity-controller.ts:224, 897145705954)
  • Production RPC and cache boundary: The sessions.list handler passes validated parameters into the existing projection owner. Its cache key serializes all request parameters, so filtered and unfiltered requests remain distinct. No authorization or persistence contract changes. (src/gateway/server-methods/sessions-list-cache.ts:145, 897145705954)
  • Regression coverage: Backend cases cover true, false, and omitted filtering, legacy keys, ordinary nested conversations, pagination, and people counts. The browser regression checks entry, search, and session-event refresh. The PR reports before-fix failures and after-fix passes; this read-only review did not execute tests. (src/gateway/session-utils-owners.test.ts:47, 897145705954)
  • Inspected visual evidence: Both downloaded screenshots were inspected. Before shows a subagent row and an ordinary conversation; after retains only the ordinary conversation, including its title containing “Subagent.” The captured PR body explicitly identifies synthetic mock Gateway data and states that live deployment verification was not performed. (ui/src/e2e/activity-session-subagents.e2e.test.ts:26, 897145705954)
  • Current-main necessity: Inspected main still lacks both the Activity request flag and the Gateway exclusion condition; the central behavior remains unimplemented there. (ui/src/pages/activity/session-activity-controller.ts:223, 69213b315cb3)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: 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-09-13T18:24:58.448Z sha 8971457 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 7dddf51 into main Sep 13, 2026
342 of 345 checks passed
@steipete
steipete deleted the codex/activity-hide-subagents branch September 13, 2026 19:12
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'cf45ff4d6a9c13164463db860285a02c1c4f2e8c':
  test(macos): observe readiness cancellation and deadline ownership (#145056)
  fix(ci): route QA Profile Evidence to its run-status owner test (#147293)
  fix(install): preserve runtime links when Node validation fails (#147221)
  test(auto-reply): reuse memory session fixtures (#147262)
  fix: hide subagent sessions from Activity (#147253)
  ci: record resources for slow runtime test commands (#147254)
  fix(update): recognize FreeBSD boot identities in triage leases (#147243)
  refactor(active-memory): share closing tag line scan (#147031)
  fix: resume Settings autosave after Reload Config (#147136)
  fix(cli): keep conversation context after cancellation (#147139)
  fix(channels): make system-agent approval cards actionable (#147152)
  refactor: retain shared database handles until their last worker closes (#147246)
  refactor(slack): share workspace-qualified target resolution (#147024)
  refactor(msteams): remove duplicate quoted-table test (#147270)
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'ac59d5e09eb468dc23cf95e447608b57e71b52af': (176 commits)
  improve(gateway): avoid redundant startup preflight work (#147285)
  test(macos): observe readiness cancellation and deadline ownership (#145056)
  fix(ci): route QA Profile Evidence to its run-status owner test (#147293)
  fix(install): preserve runtime links when Node validation fails (#147221)
  test(auto-reply): reuse memory session fixtures (#147262)
  fix: hide subagent sessions from Activity (#147253)
  ci: record resources for slow runtime test commands (#147254)
  fix(update): recognize FreeBSD boot identities in triage leases (#147243)
  refactor(active-memory): share closing tag line scan (#147031)
  fix: resume Settings autosave after Reload Config (#147136)
  fix(cli): keep conversation context after cancellation (#147139)
  fix(channels): make system-agent approval cards actionable (#147152)
  refactor: retain shared database handles until their last worker closes (#147246)
  refactor(slack): share workspace-qualified target resolution (#147024)
  refactor(msteams): remove duplicate quoted-table test (#147270)
  fix(qa): bind coverage IDs to producer assertions (#144000)
  fix(linux): explain FreeBSD desktop setup prerequisites (#147211)
  fix(memory): split embedding batches rejected for an input array item cap (#139541)
  test: isolate timing metadata persistence from inherited settings (#147112)
  refactor(status): retire test-only helper publication (#147071)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
* fix: hide subagent sessions from Activity

Filter subagent sessions before search, facets, counts, and pagination so Activity stays focused on conversations. Preserve normal nested sessions and existing diagnostic listings.

* test: use the stored session label in Activity regression

* style: group session key predicates by their owning module
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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