Repository navigation
fix: keep WebChat permissions after an agent hands back a chat - #201160
Conversation
Co-authored-by: VACInc <[email protected]>
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 94bc88bc-cc23-8c04-95a1-484af4c6f75b
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR restores existing caller permissions for fresh WebChat messages after an agent releases a spawned dashboard chat. Example: A user with operator.write sends a fresh message in agent:main:dashboard:binding after its parent releases control.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a current permission mismatch using the existing admission owner; no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway chat admission combines authenticated client identity, input provenance, session control, and scopes into capabilities consumed by message actions and repository dispatch. flowchart TD
A[Authenticated WebChat message] --> B[Gateway chat admission]
C[Session lineage and live controller] --> B
B --> D[Shared direct input classification]
D --> E[Dashboard reads and prompt reactions]
D --> F[Repository dispatch]
D --> G[Caller scoped scheduling]
Technical reviewBest possible solution: Use the shared direct-input classifier to distinguish fresh authenticated dashboard input from spawn history while preserving each capability owner's existing permission checks. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the spawnedBy rejection and its affected consumers, and the author reports a red/green chat.send regression; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch fixes the shared classification mismatch with a reused helper and existing authority owners, without adding state, another dispatch path, or broader scheduling privileges. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5ef0e2fb9894. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +6, Tests +46. Total +52 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 18, 2026, 6:43 AM ET / 11:43 UTC. |
…law#201160) * fix: keep WebChat permissions after an agent hands back a chat Co-authored-by: VACInc <[email protected]> * fix: keep WebChat permissions after an agent hands back a chat Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 94bc88bc-cc23-8c04-95a1-484af4c6f75b --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: VACInc <[email protected]>
* fix: keep WebChat permissions after an agent hands back a chat Co-authored-by: VACInc <[email protected]> * fix: keep WebChat permissions after an agent hands back a chat Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 94bc88bc-cc23-8c04-95a1-484af4c6f75b --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: VACInc <[email protected]> (cherry picked from commit 6122ae9) Co-authored-by: RomneyDa <[email protected]>
Related: #201015
What Problem This Solves
After an agent handed back a dashboard chat, a user's next message could schedule a job but still couldn't read an otherwise permitted channel, react to the current prompt, or start a worker that needs the user's repository access. WebChat was still checking who started the conversation instead of who sent that message.
User Impact
Users keep their existing permissions when they take over a dashboard chat. Messages coming from Discord, Slack, Telegram or another channel continue to follow that channel's rules. No role, setting or migration changes.
Why This Change Was Made
The WebChat entry point now makes one decision about whether the current input came directly from an authenticated user after parent control ended. Each feature still checks its own permissions. The scheduling exception remains limited to the caller's own jobs. No channel adapter changed.
Evidence
A regression test sent a fresh message through
chat.sendin an existing, previously spawned dashboard chat. It failed on main and passed with the fix. The test checks the channel-read permission, reaction binding, and repository dispatch, including loss of access when the turn ends. Separate tests keep channel-origin messages, non-WebChat clients, supervised children, and internal messages outside the exception. Discord and Slack read-permission tests, Telegram inbound authorization, and the shared channel and repository suites passed. Type checks, lint, and formatting passed. No live channel messages were sent or external workers launched.Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by