Skip to content

fix: allow cross-browser steering of active sessions - #144694

Merged
steipete merged 2 commits into
mainfrom
codex/fix-shared-session-steering
Sep 11, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/fix-shared-session-steering

Conversation

@steipete

@steipete steipete commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users steering an active shared session from another browser would have their messages queued until the run ended, even when their tool permissions matched. The Control UI displayed those waiting messages as ordinary chat bubbles, making it appear that the agent had read and ignored them.

Why This Change Was Made

Compare tool permissions independently of the approval-reviewer device identity. The running turn retains its original approval destination; permission modes, execution policy, elevation, workspace, client capabilities, concrete tool bindings, and live-owner checks still apply. Both explicit and inherited steering use this owner. Separately executed collected turns retain their existing reviewer partitioning.

The Control UI now labels accepted but unconsumed input Queued · waiting for the agent, while preserving the more specific worker-setup and workspace-sync notices. This follows Codex's same-turn steering contract: input joins the active turn without replacing its execution settings.

User Impact

Authorized participants with matching permissions can redirect the running agent from another browser. Messages that must wait are visibly identified, and steering does not transfer approval ownership or grant additional tool access.

Evidence

  • Before the fix, three cross-device regression cases failed with rejected or missing backend delivery. Same-device controls and eight substantive policy-mismatch cases passed.
  • After the fix, 651 tests passed across nine selected steering, approval-routing, collected-turn, and UI files.
  • Five new-session browser E2E cases passed, retaining exact queued-status, workspace-progress, attachment-continuity, and single-submission checks. CI identified an old zero-notice assertion; it now checks the intended label.
  • Four session-link browser tests passed after repairing the fixture stylesheet dependency. That repair landed independently in fix: session link browser test fails after chat styles load #144690 and is no longer part of this diff.
  • Six memory temporal-ranking tests passed after repairing the FTS-unavailable fixture. Main now owns this repair through test(memory-core): repair temporal-ranking CI after FTS reconciliation #144761 and subsequent memory work; it is no longer part of this diff.
  • Live OpenAI API-key proof passed using openai/gpt-5.6-luna and the real built Gateway plus the pinned Codex app-server. Two independently paired devices exercised explicit and inherited steering. Each case confirmed exactly one canonical user message with the original run's consumption marker, the exact requested final reply, and a single native turn.
  • The live fixture holds a yielding native command until consumption is confirmed, then releases it; send acknowledgment alone cannot satisfy the test. Both cases passed with unchanged timeouts and no retry logic, using an empty source home and only the requested API key.
  • A new-main daemon-install test exceeded its executable-line lint limit by one line. A semantics-preserving mock-factory simplification passed all 42 daemon-install tests, targeted lint, formatting, and independent review. Main subsequently split the fixture in test(daemon): split install reinstall coverage under max-lines #145113; that supersedes our temporary correction, which is no longer in this diff.
  • The pre-rebase real-Gateway job passed 45/46 cases, with one startup timeout waiting for the Send button before any submission. All three approval/delegation cases passed unchanged against a fresh local build. Its targeted rerun was superseded by the required conflict rebase. No timeouts, assertions, or retry logic changed.
  • Final-head CI: https://github.com/openclaw/openclaw/actions/runs/34633810879. The final conflict rebase preserves both remaining patches exactly, confirmed by range-diff.
  • pnpm build and node scripts/check-changed.mjs passed; changed checks also passed after the conflict rebase. Independent review found no actionable P0/P1 findings.

The before/after captures below use synthetic conversation data. No live user transcript or credentials are included.

Before: queued input looks delivered

After: queued input is visibly labeled
Landing note: the maintainer explicitly waived the additional local ClawSweeper completion gate for this PR because the review queue was stalled. Normal GitHub checks remain required. The recovered ClawSweeper service subsequently completed this PR review with no actionable findings.

@clawsweeper

clawsweeper Bot commented Sep 11, 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: M maintainer Maintainer-authored PR labels Sep 11, 2026
@steipete
steipete marked this pull request as ready for review September 11, 2026 05:21
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Sep 11, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@openclaw-barnacle openclaw-barnacle Bot added the extensions: memory-core Extension: memory-core label Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 11, 2026, 2:41 PM ET / 18:41 UTC (Revision 5).

ClawSweeper review

What this changes

Allows equally authorized browsers to steer an active session, preserves its approval destination, and labels accepted but unconsumed messages as queued.

Merge readiness

⛔ Needs changes before merge - 2 items remain

This remains a useful fix absent from current main. The implementation is sound, but the previously reported documentation contradiction remains unresolved.

Priority: P2
Reviewed head: fdcef4ba384642cc096930de0a67e350ecb4b418

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with useful visual and reported live proof; one existing documentation finding remains.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after captures directly prove the queued label; the captured body reports real Gateway-to-Codex explicit and inherited steering with consumption markers, exact final replies, and one native turn, matching the added live fixture.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after captures directly prove the queued label; the captured body reports real Gateway-to-Codex explicit and inherited steering with consumption markers, exact final replies, and one native turn, matching the added live fixture.
Evidence reviewed 8 items Current main still contains the defect: Current main includes approvalReviewerDeviceId in the steering fingerprint, and its pending-input renderer emits no ordinary queued notice. The latest release also includes reviewer identity in that fingerprint.
Latest-release check: The v2026.9.4 source still hashes approvalReviewerDeviceId; this review does not identify a shipped replacement for the fix.
Steering preserves execution authority: The fingerprint retains permission mode, execution restrictions, workspace, client capabilities, and concrete tool bindings. Message injection strips the inbound overlay before backend delivery and checks the active operation; collect-mode partitioning still includes approvalReviewerDeviceId.
Findings 1 actionable finding [P3] Update the existing Control UI queued-input description
Security None None.

How this fits together

The Gateway compares incoming messages with the active agent run’s tool permissions before admitting steering. The Control UI displays Gateway-owned pending input until the runtime consumes it.

flowchart TD
  A[Authorized browser message] --> B[Gateway admission]
  B --> C{Matching tool permissions?}
  C -->|Yes| D[Steer active run]
  C -->|No| E[Queue followup turn]
  D --> F[Original approval destination]
  E --> G[Visible queued notice]
Loading

Before merge

  • Update the existing Control UI queued-input description (P3) - The new queued notice contradicts docs/web/control-ui/sessions-and-sidebar.md:46-49, which still says accepted messages wait without an additional receipt notice. Update that paragraph to describe the queued label while preserving worker-setup and workspace-sync distinctions. This repeats the prior late-discovered finding; the renderer is unchanged from the earlier reviewed head and the contradictory paragraph remains.
  • Complete next step (P2) - Update docs/web/control-ui/sessions-and-sidebar.md to describe the queued label and preserved worker-setup/workspace-sync notices.

Findings

  • [P3] Update the existing Control UI queued-input description — ui/src/pages/chat/chat-pending-inputs.ts:58-69
Agent review details

Security

None.

PR surface

Source +2, Tests +247, Docs +9. Total +258 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 4 15 13 +2
Tests 6 331 84 +247
Docs 1 9 0 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 355 97 +258

Review metrics

None.

Technical review

Best possible solution:

Keep the existing steering owner and approval routing, with consistent documentation explaining queued input and the more specific preparation notices.

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

Yes, source establishes the trigger: otherwise matching messages from different reviewer devices produce different fingerprints on current main and are deferred. No runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Yes, removing approval destination from permission equivalence fixes the existing owner without transferring execution settings; the established UI guide needs the corresponding wording correction.

Full review comments:

  • [P3] Update the existing Control UI queued-input description — ui/src/pages/chat/chat-pending-inputs.ts:58-69
    The new queued notice contradicts docs/web/control-ui/sessions-and-sidebar.md:46-49, which still says accepted messages wait without an additional receipt notice. Update that paragraph to describe the queued label while preserving worker-setup and workspace-sync distinctions. This repeats the prior late-discovered finding; the renderer is unchanged from the earlier reviewed head and the contradictory paragraph remains.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is correct
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: Repairs cross-browser steering and misleading pending-message presentation with a bounded change.
  • 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 captures directly prove the queued label; the captured body reports real Gateway-to-Codex explicit and inherited steering with consumption markers, exact final replies, and one native turn, matching the added live fixture.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after captures directly prove the queued label; the captured body reports real Gateway-to-Codex explicit and inherited steering with consumption markers, exact final replies, and one native turn, matching the added live fixture.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after captures directly prove the queued label; the captured body reports real Gateway-to-Codex explicit and inherited steering with consumption markers, exact final replies, and one native turn, matching the added live fixture.

Evidence

What I checked:

  • Current main still contains the defect: Current main includes approvalReviewerDeviceId in the steering fingerprint, and its pending-input renderer emits no ordinary queued notice. The latest release also includes reviewer identity in that fingerprint. (src/auto-reply/reply/reply-tool-authority.ts:260, 7adce1e1c245)
  • Latest-release check: The v2026.9.4 source still hashes approvalReviewerDeviceId; this review does not identify a shipped replacement for the fix. (src/auto-reply/reply/reply-tool-authority.ts:260, 3a9d69db306c)
  • Steering preserves execution authority: The fingerprint retains permission mode, execution restrictions, workspace, client capabilities, and concrete tool bindings. Message injection strips the inbound overlay before backend delivery and checks the active operation; collect-mode partitioning still includes approvalReviewerDeviceId. (src/auto-reply/reply/reply-run-registry.message-injection.ts:204, fdcef4ba3846)
  • Existing guide contradicts the new notice: The sessions guide still states that accepted messages wait without an additional receipt notice. The introduced renderer now emits a queued notice for that state. Public docs: docs/web/control-ui/sessions-and-sidebar.md. (docs/web/control-ui/sessions-and-sidebar.md:48, fdcef4ba3846)
  • Re-review continuity: GitHub returned renderer blob 7d7f49734e1968dae5bdf47ea2b6161344c9ba9a for the earlier reviewed head, matching the current local blob. The earlier guide contains the same contradictory paragraph. Local comparison of the earlier commit was unavailable, so GitHub source reads established continuity. (ui/src/pages/chat/chat-pending-inputs.ts:58, 707c053e2bf9)
  • Inspected visual proof and reported runtime proof: Both prepared screenshots were inspected: the after image visibly labels the waiting message. The captured PR body reports real Gateway and Codex app-server runs with independently paired devices, explicit and inherited steering, one consumed user message, the requested final reply, and one native turn. The live test checks consumption before releasing its command barrier; screenshots alone are not used to establish runtime or authorization behavior. (src/gateway/gateway-codex-harness.live.test.ts:2161, fdcef4ba3846)

Likely related people:

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

  • Align the sessions-and-sidebar guide with the queued-input notice.

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 (4 earlier review cycles)
  • reviewed 2026-09-11T07:23:19.856Z sha fd45dd2 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-11T17:48:25.561Z sha f39dc61 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-11T17:59:55.836Z sha 707c053 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-11T18:29:59.709Z sha 707c053 :: blocked before merge. :: [P3] Update the existing Control UI queued-input description

@steipete
steipete force-pushed the codex/fix-shared-session-steering branch from fd45dd2 to f39dc61 Compare September 11, 2026 17:41
@openclaw-barnacle openclaw-barnacle Bot removed the extensions: memory-core Extension: memory-core label Sep 11, 2026
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added the cli CLI command changes label Sep 11, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 11, 2026
Keep approval routing attached to the active run while comparing substantive tool permissions for incoming steering. Label unconsumed Gateway inputs as queued in the Control UI. Covers explicit and inherited steering with deterministic regressions and live OpenAI API-key proof.
Keep exact queued-notice, workspace-progress, attachment continuity, and single-submission assertions in the five browser E2E cases.
@steipete
steipete force-pushed the codex/fix-shared-session-steering branch from 707c053 to fdcef4b Compare September 11, 2026 18:32
@openclaw-barnacle openclaw-barnacle Bot removed the cli CLI command changes label Sep 11, 2026
@steipete
steipete merged commit e1eb0e0 into main Sep 11, 2026
196 of 198 checks passed
@steipete
steipete deleted the codex/fix-shared-session-steering branch September 11, 2026 18:50
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
* fix: allow cross-browser steering of active sessions

Keep approval routing attached to the active run while comparing substantive tool permissions for incoming steering. Label unconsumed Gateway inputs as queued in the Control UI. Covers explicit and inherited steering with deterministic regressions and live OpenAI API-key proof.

* test: expect queued input during new-session preparation

Keep exact queued-notice, workspace-progress, attachment continuity, and single-submission assertions in the five browser E2E cases.
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 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: 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