Skip to content

fix(agents): make requested threads sidebar-visible - #118073

Merged
fuller-stack-dev merged 7 commits into
openclaw:mainfrom
fuller-stack-dev:codex/sidebar-visible-thread-default
Aug 2, 2026
Merged

fuller-stack-dev merged 7 commits into
openclaw:mainfrom
fuller-stack-dev:codex/sidebar-visible-thread-default

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Aug 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • make explicit create/open-thread requests produce persistent dashboard sessions by default
  • preserve the parent conversation's effective tool-policy ceiling for restricted visible children
  • carry trusted spawn authority through in-process and signed Gateway paths
  • persist labels, lineage, depth, completion ownership, and inherited policy before the first child turn

Problem

Visible thread creation was rejected whenever the requesting conversation carried inherited tool restrictions. The fallback path could also create a non-dashboard session that never appeared in the sidebar.

Solution

Carry the trusted parent identity and complete normalized authority envelope into the session-creation owner boundary, then atomically persist it with the dashboard child. The same envelope survives reset, restart, and completion. Signed caller/parent mismatches remain rejected, ordinary background spawns remain hidden, and visible children cannot gain tools denied to their parent.

Maintainer security decision

Approve bounded propagation across the signed parent-bound Gateway boundary, provided the normalized inherited policy is persisted atomically before the first child turn. This PR implements that boundary and the lifecycle preservation needed to keep it fail-closed.

Validation

  • base red on ad53d4419ea42ae3f98463519451cd82baa31074: restricted visible: true returned status: forbidden (Testbox run 30758563684)
  • 364 focused Gateway and agent-tool tests passed on the repaired tree
  • 424 focused tests passed after relevant main movement, covering signed identity, create/reset/chat persistence, requester policy, restart ownership, session scopes, and agent tooling (Testbox run 30764546844)
  • source-blind behavior validation passed 5/5 assertions
  • build, pnpm check, Plugin SDK baseline, test typecheck, formatting, and structured autoreview passed
  • broad-suite PR-related projects passed; two unrelated plugin registry failures reproduced unchanged on canonical main 254ab826f1e32762f82612f035563df75a670b2d (Testbox run 30764438636)
  • final head 8b9afbd40020f497de8872e20dde1c661ac147c7 contains canonical main 0c32879d45f9a83552a0d1a4db78dec38518296b; the final main-only movement touched channel lifecycle and OpenAI realtime surfaces, not the agent/session proof contract

User impact

Asking an agent to create or open a named thread now produces a persistent sidebar-visible session without a configuration workaround, including for conversations with sender-scoped tool restrictions.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Aug 2, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Aug 2, 2026
@clawsweeper clawsweeper Bot added 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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 4:12 PM ET / 20:12 UTC.

ClawSweeper review

What this changes

The branch lets restricted subagents create persistent sidebar-visible dashboard threads by transferring the parent’s effective tool-policy ceiling through Gateway session creation and persisted session lineage.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

This PR is still necessary: current main intentionally rejects restricted visible spawns, while the branch replaces that denial with a signed, persisted policy-propagation path. The implementation appears coherent and preserves the parent-policy ceiling, but it changes a documented security boundary and should remain open for explicit security-owner approval and exact-head CI completion.

Priority: P1
Reviewed head: 8b9afbd40020f497de8872e20dde1c661ac147c7
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and supported by targeted policy, Gateway, reset, and event-path coverage, with the remaining blocker being an intentional security-boundary decision rather than a concrete code defect.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR body nevertheless reports focused Testbox behavior validation and lifecycle coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR body nevertheless reports focused Testbox behavior validation and lifecycle coverage.
Evidence reviewed 6 items Current-main behavior: Current main explicitly returns status: forbidden when visible: true is requested by a session with an inherited allowlist or denylist; the documented behavior says the same restriction applies.
Proposed owner-boundary repair: The branch creates the visible child through the existing Gateway owner, carries the inherited policy only as signed session-spawn context, and rejects a supplied parent key that does not equal the signed agent caller.
Persisted policy enforcement: The branch requires a persisted dashboard child envelope with spawn depth, lineage, and policy version before treating it as delegated, and requester-policy resolution consumes that envelope instead of re-deriving sender identity.
Findings None None.
Security None None.

How this fits together

The agent sessions_spawn tool asks Gateway to create a persistent dashboard session and start its first child run. Gateway persists the child’s lineage and effective tool restrictions; later agent policy resolution reads that persisted envelope so the sidebar-visible child remains no more capable than its requester.

flowchart LR
  A[Restricted requester session] --> B[Visible thread request]
  B --> C[Signed parent authority]
  C --> D[Gateway session creation]
  D --> E[Persisted child lineage and policy]
  E --> F[Requester policy resolution]
  F --> G[Sidebar-visible restricted thread]
Loading

Decision needed

Question Recommendation
Should restricted requesters be allowed to create sidebar-visible children when Gateway receives a signed parent-bound policy envelope and persists it before the child’s first turn? Approve signed propagation: Accept the bounded capability after verifying the exact head remains green and the persisted policy cannot exceed the parent ceiling.

Why: Current main deliberately documents and enforces denial of this case; deciding whether signed propagation is an acceptable replacement for that security boundary requires maintainer intent, not mechanical review judgment.

Before merge

  • Resolve merge risk (P1) - Merging changes a documented hard rejection for restricted visible spawns into a new signed authority-propagation path; an explicit security owner must accept that broader capability before merge.
  • Resolve merge risk (P1) - The exact PR head still has CI in progress, so the security-sensitive lifecycle coverage and build gates are not yet complete on the merge candidate.
  • Complete next step (P2) - A security owner must choose whether the signed persisted-policy path is an acceptable replacement for the intentional visible-spawn denial; no narrow automated repair is indicated.
Agent review details

Security

None.

PR surface

Source +243, Tests +405, Docs 0. Total +648 across 27 files.

View PR surface stats
Area Files Added Removed Net
Source 13 272 29 +243
Tests 13 434 29 +405
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 27 707 59 +648

Review metrics

Metric Value Why it matters
Authorization transition 1 documented fail-closed visible-spawn rule replaced by 1 signed-and-persisted policy path This is a user-visible expansion of a security-sensitive session-creation capability, so the acceptance decision matters beyond ordinary test coverage.

Stored data model

Persistent data-model change detected: serialized state: src/agents/requester-tool-policy.test.ts, serialized state: src/agents/tools/sessions-spawn-tool.test.ts, serialized state: src/agents/tools/sessions-spawn-visible.ts, serialized state: src/gateway/server-methods/session-creation-provenance.ts, serialized state: src/gateway/server-methods/sessions-create.ts, serialized state: src/gateway/server.sessions.create.test.ts, and 8 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Record explicit security approval before merge (recommended)
    Approve the signed parent-bound propagation only after an owner confirms that replacing the documented denial is an acceptable security tradeoff and exact-head CI completes.
  2. Preserve the current restriction
    Pause this PR and keep restricted visible spawns fail-closed if maintainers do not want dashboard children to carry delegated authority.

Technical review

Best possible solution:

Keep one canonical visible-session creation path, but land it only after a security owner explicitly approves signed propagation of the parent ceiling and exact-head CI confirms the persisted-policy lifecycle remains fail-closed.

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

Yes, by source: on current main, invoke sessions_spawn with visible: true from a requester carrying either inherited tool list and maybeSpawnVisibleSession returns forbidden at src/agents/tools/sessions-spawn-visible.ts:164. The PR body also reports a Testbox reproduction of that path, though this read-only review did not execute it.

Is this the best way to solve the issue?

Yes, conditionally: persisting a signed parent-derived envelope at the Gateway creation owner is safer than bypassing the visible-spawn check downstream. The remaining question is whether maintainers want this capability to replace the documented fail-closed policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: The current restriction blocks a normal agent-thread workflow for restricted sessions, while the affected behavior is central to agent and dashboard operation.
  • merge-risk: 🚨 security-boundary: The branch replaces a deliberate denial with signed authority propagation and persisted policy inheritance across the Gateway boundary.
  • 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 author is a repository member, so the external-contributor proof gate does not apply; the PR body nevertheless reports focused Testbox behavior validation and lifecycle coverage.

Evidence

What I checked:

  • Current-main behavior: Current main explicitly returns status: forbidden when visible: true is requested by a session with an inherited allowlist or denylist; the documented behavior says the same restriction applies. (src/agents/tools/sessions-spawn-visible.ts:164, bc826d6866a0)
  • Proposed owner-boundary repair: The branch creates the visible child through the existing Gateway owner, carries the inherited policy only as signed session-spawn context, and rejects a supplied parent key that does not equal the signed agent caller. (src/gateway/server-methods/sessions-create.ts:416, 8b9afbd40020)
  • Persisted policy enforcement: The branch requires a persisted dashboard child envelope with spawn depth, lineage, and policy version before treating it as delegated, and requester-policy resolution consumes that envelope instead of re-deriving sender identity. (src/agents/subagent-capabilities.ts:309, 8b9afbd40020)
  • Security regression coverage: The branch adds coverage for atomic visible-spawn policy persistence and rejects a signed spawn whose requested parent differs from the signed caller. (src/gateway/server.sessions.create.test.ts:1707, 8b9afbd40020)
  • Behavior provenance: The current fail-closed rule and the adjacent Gateway session-creation scope guard both trace to the same security-focused change, so the PR is altering deliberate behavior rather than filling an accidental omission. (src/agents/tools/sessions-spawn-visible.ts:164, 2c96af3b769c)
  • Current-main inclusion check: The PR head is not an ancestor of the checked-out current main, so the visible-thread behavior remains absent from main and has not been superseded there. (bc826d6866a0)

Likely related people:

  • Shakker: Blame attributes both the visible-spawn restriction and the relevant Gateway authorization area to the same security-focused commit. (role: introduced the current fail-closed behavior and adjacent session-creation authorization guard; confidence: high; commits: 2c96af3b769c; files: src/agents/tools/sessions-spawn-visible.ts, src/gateway/server-methods/sessions-create.ts)

Rank-up moves

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

  • Obtain explicit security-owner approval for replacing the current documented fail-closed rule.
  • Wait for the exact-head CI run to complete before merge.

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-08-02T17:20:43.873Z sha 2c8a882 :: needs maintainer review before merge. :: none

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review August 2, 2026 20:07
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@fuller-stack-dev
fuller-stack-dev merged commit 01565bd into openclaw:main Aug 2, 2026
181 of 183 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

@fuller-stack-dev
fuller-stack-dev deleted the codex/sidebar-visible-thread-default branch August 2, 2026 20:26
vincentkoc added a commit that referenced this pull request Aug 2, 2026
* origin/main:
  feat(gateway): track event-loop degradation persistence and add concurrency benchmark (#118193)
  fix(config): preserve secret ownership when configuration rows move (#118149)
  fix(cron): deliver failure alerts after persistence (#118200)
  chore(lint): clear 172 lint:all baseline violations in five batches (#118098)
  perf(gateway): remove streaming hot-path rescans (#118192)
  test(gateway): use in-memory task registry (#118191)
  test(macos): fix three races in the bounded process suites (#118196)
  refactor(migrate-hermes): consolidate test fixtures (#118182)
  test(android): share Wear transport fixtures (#118177)
  test(ui): deduplicate control UI e2e setup (#118180)
  fix(plugins): unblock prerelease validation (#118103)
  test(cli): reduce redundant process launches (#118141)
  test(gateway): compact terminal observer fixtures (#118179)
  fix(agents): make requested threads sidebar-visible (#118073)
  test(plugins): canonicalize native resolver fixtures (#118174)
  test: deduplicate agent runner fixtures (#118176)
  refactor(policy): consolidate doctor test fixtures (#118173)
  fix(plugins): remove disabled channel plugin configuration on uninstall (#118127)
  refactor(matrix): consolidate monitor test fixtures (#118175)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
* fix(agents): make requested threads sidebar-visible

* fix(agents): preserve visible spawn authority
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
* origin/main:
  feat(gateway): track event-loop degradation persistence and add concurrency benchmark (openclaw#118193)
  fix(config): preserve secret ownership when configuration rows move (openclaw#118149)
  fix(cron): deliver failure alerts after persistence (openclaw#118200)
  chore(lint): clear 172 lint:all baseline violations in five batches (openclaw#118098)
  perf(gateway): remove streaming hot-path rescans (openclaw#118192)
  test(gateway): use in-memory task registry (openclaw#118191)
  test(macos): fix three races in the bounded process suites (openclaw#118196)
  refactor(migrate-hermes): consolidate test fixtures (openclaw#118182)
  test(android): share Wear transport fixtures (openclaw#118177)
  test(ui): deduplicate control UI e2e setup (openclaw#118180)
  fix(plugins): unblock prerelease validation (openclaw#118103)
  test(cli): reduce redundant process launches (openclaw#118141)
  test(gateway): compact terminal observer fixtures (openclaw#118179)
  fix(agents): make requested threads sidebar-visible (openclaw#118073)
  test(plugins): canonicalize native resolver fixtures (openclaw#118174)
  test: deduplicate agent runner fixtures (openclaw#118176)
  refactor(policy): consolidate doctor test fixtures (openclaw#118173)
  fix(plugins): remove disabled channel plugin configuration on uninstall (openclaw#118127)
  refactor(matrix): consolidate monitor test fixtures (openclaw#118175)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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