Repository navigation
fix(gateway): admit reconnect-resumed chat sends like fresh sends - #204669
Conversation
- The Control UI reconnect marker no longer narrows the cron creator admission of a chat.send turn. Fixes #167867 and #194428. Co-authored-by: obviyus <[email protected]>
|
🦞👀 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 admits reconnect-marked chat sends through the same existing permission checks as fresh sends. Example: A Control UI administrator asks for an automation list after reconnecting to the same conversation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR provides a focused, maintainer-directed fix for reconnect-related automation permission loss that remains on main; no actionable patch defects were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Gateway receives authenticated chat.send requests, classifies their input source, and issues run-bound automation capabilities consumed by agent tools. flowchart LR
A[Control UI send] --> B[Authenticated Gateway request]
B --> C[Chat admission]
C --> D[Existing scope and source checks]
D --> E[Run-bound automation capability]
E --> F[Automation tool operation]
Technical reviewBest possible solution: Use the existing admission owner for reconnect-marked sends while preserving current scope, source, session, and run restrictions. Do we have a high-confidence way to reproduce the issue? The UI marker and current-main rejection establish the failing path directly; the PR also reports a matching live reproduction, which this read-only review did not rerun. Is this the best way to solve the issue? This is the smallest complete fix: remove session-reconnect metadata from the existing permission decision and retain the marker for session continuity and its other consumers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a6893b815789. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -5, Tests +1. Total -4 across 8 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. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 24, 2026, 8:42 AM ET / 13:42 UTC. |
|
Landed as 24a8e8f. A send that follows a Control UI reconnect now goes through the same cron creator admission as any fresh send, so the owner keeps automation management on that turn. Proof: real Gateway reproduction A/B/C all |
… and answer pending questions (#204698) Related: #167867, #204669 ## What Problem This Solves After the Control UI reconnects its socket, the first message you type carries a reconnect marker (`__controlUiReconnectResume`). Three Gateway checks still read that marker as "this is not fresh input": 1. **Skill authoring:** that one message gets no skill-library grant. If you ask the agent to save or update a skill, `skill_library` answers "Skill authoring needs a fresh message from the person requesting the change." The messages before and after it work. 2. **Pending questions:** while the agent waits on a multi-part, secret or `required_action` question, a steer message normally replaces that question. The first steer after a reconnect does not, so the run stays blocked on the question. 3. **Goal start:** a goal start with the marker is rejected. The Control UI never sends the marker with a goal start, so this refusal cannot be reached. This is the same class as #204669 (the cron creator admission). Each send is admitted on its own when it starts. The marker must not change what new input can do. ## User Impact The first message after a reconnect can save or update skills and can replace a pending question, the same as any other message. ## Why This Change Was Made The three reads are deleted. No new code. Production lines: +2/−5. Replay dedupe does not depend on the marker: a repeated `idempotencyKey` is answered from the chat-send dedupe cache (`chat-send-pre-admission.ts`). Kept on purpose: the marker still reaches `chat-user-turn-recorder.ts` → `resumeRequestedSession`, which skips idle/daily session rollover when the reconnecting tab sends the session's current `sessionId` (#89017, "sessions persist after reconnects"). That is a session-lifecycle choice, not admission: it does not change tools, questions, goals or skills. So the marker itself stays. Accepted edge case: an outbox message typed before a question appeared, and first sent after a reconnect, now also replaces that question, like any other steer. ## Evidence - **Real Gateway, real model (gpt-5.5), head `66301b8523`:** an admin Control UI client asks the agent to call `skill_library list` on turn A (fresh), turn B (after a socket reconnect, with `__controlUiReconnectResume: true` and the same `sessionId`) and turn C (fresh). All three tool results list the library. On main `4164dcb200af`, turn B returned `{"status":"error","error":"Skill authoring needs a fresh message from the person requesting the change."}`. The check now reads the tool result, not the model's reply. - **Red on base, green on head:** - `chat-send-session-binding.test.ts` › "grants skill authoring to the first message typed after a Control UI reconnect": a direct Control UI admin `chat.send` with the marker and the session's `sessionId` gets `skillLibraryAuthoring`. On merge base `500e19e4490b`: `expected undefined to be defined`. - `chat-send-question-replacement.test.ts` › `reconnect-resume` row: a reconnect-resumed steer replaces a pending multi-part question. On merge base: `expected false to be true`. - Pre-push: 11 test files (touched tests and direct importers of the changed sources), 206 tests, all pass. `pnpm tsgo:core`, `pnpm tsgo:test`, oxfmt and oxlint on the changed files: clean. - One-admission E2E (Q/R/S) and local review results: see comments. Co-authored-by: Ayaan Zaidi <[email protected]>
…04669) ## Problem After a Control UI socket reconnect, the first message the owner types carries `__controlUiReconnectResume: true`. The UI sets this marker on any send whose `sessionId` matches the resumed session, including new typed input. The cron creator admission in `cron-creator-authority-admission.ts` treated that marker as "not direct input". So that one turn lost automation management: `automations list` returned `scope=caller total=0` between two `scope=gateway total=3` turns (#167867, #194428). ## Fix Each send is admitted on its own when it starts, and queued or replayed input goes through the same admission as new input. So the reconnect marker no longer takes part in the cron creator decision: - `isReconnectResume` is removed from `GatewayChatUserTurn`, from the chat-send external admission params and from the dispatch call site. - The chat admission, the dashboard hand-off follow-up check and the Template-setup admission no longer read it. - The marker itself stays. Session-id reuse on resume (`auto-reply/reply/session.ts`), goal-start rejection, question replacement and the skill-library human-turn flag still read it. Decision recorded: no new distinction between typed and replayed outbox input. Replayed input is admitted the same as fresh input, by the same owner. Production code: 3 files, net −5 lines. ## Tests - `chat.directive-tags.test.ts`: the lazy configured-MCP cron authority table (moved to the sibling test-support file, next to `deniedChatCronAuthorityCases`, to keep the file under its line cap) gets a `resumed` row. A Control UI admin `chat.send` with `__controlUiReconnectResume: true` and the session's `sessionId` must get the same capability as the fresh row. Red on base, green on head. - Removed rows that asserted the old narrowing (`agent-run-local-operator-authority.test.ts`), and the dropped field in fixtures. ## Evidence - Real Gateway, real model (Z1 harness, case #167867), head `a496e4039557`: an admin Control UI client creates 3 automations, then the agent runs `automations list` on turn A (fresh), turn B (after a socket reconnect, sent with `__controlUiReconnectResume: true` and the same `sessionId`), and turn C (fresh). Result: A `scope=gateway total=3`, **B `scope=gateway total=3`**, C `scope=gateway total=3`. On main `736ec651c262`, B was `scope=caller total=0`. - One-admission E2E on head `a496e4039557`: Q (queued input refused visibly), R (a running turn finishes) and S (Stop cancels) all pass. - Red on base: the `resumed` row of the lazy configured-MCP table fails on merge base `e24a2eecffb7` (capability withheld) and passes on head. - Pre-push: 20 test files (touched tests, direct importers, test-support importers). All pass except `src/cron/service.pr-automation.test.ts` (`trigger.state` is null in the trigger script), which fails the same way on merge base `e24a2eecffb7`. - `pnpm tsgo:core`, `pnpm tsgo:test`, oxlint and oxfmt on the changed files: clean. - Local ClawSweeper review on `a496e4039557`: complete, patch is correct, no findings. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 24a8e8f) Co-authored-by: RomneyDa <[email protected]>
… and answer pending questions (#204698) Related: #167867, #204669 ## What Problem This Solves After the Control UI reconnects its socket, the first message you type carries a reconnect marker (`__controlUiReconnectResume`). Three Gateway checks still read that marker as "this is not fresh input": 1. **Skill authoring:** that one message gets no skill-library grant. If you ask the agent to save or update a skill, `skill_library` answers "Skill authoring needs a fresh message from the person requesting the change." The messages before and after it work. 2. **Pending questions:** while the agent waits on a multi-part, secret or `required_action` question, a steer message normally replaces that question. The first steer after a reconnect does not, so the run stays blocked on the question. 3. **Goal start:** a goal start with the marker is rejected. The Control UI never sends the marker with a goal start, so this refusal cannot be reached. This is the same class as #204669 (the cron creator admission). Each send is admitted on its own when it starts. The marker must not change what new input can do. ## User Impact The first message after a reconnect can save or update skills and can replace a pending question, the same as any other message. ## Why This Change Was Made The three reads are deleted. No new code. Production lines: +2/−5. Replay dedupe does not depend on the marker: a repeated `idempotencyKey` is answered from the chat-send dedupe cache (`chat-send-pre-admission.ts`). Kept on purpose: the marker still reaches `chat-user-turn-recorder.ts` → `resumeRequestedSession`, which skips idle/daily session rollover when the reconnecting tab sends the session's current `sessionId` (#89017, "sessions persist after reconnects"). That is a session-lifecycle choice, not admission: it does not change tools, questions, goals or skills. So the marker itself stays. Accepted edge case: an outbox message typed before a question appeared, and first sent after a reconnect, now also replaces that question, like any other steer. ## Evidence - **Real Gateway, real model (gpt-5.5), head `66301b8523`:** an admin Control UI client asks the agent to call `skill_library list` on turn A (fresh), turn B (after a socket reconnect, with `__controlUiReconnectResume: true` and the same `sessionId`) and turn C (fresh). All three tool results list the library. On main `4164dcb200af`, turn B returned `{"status":"error","error":"Skill authoring needs a fresh message from the person requesting the change."}`. The check now reads the tool result, not the model's reply. - **Red on base, green on head:** - `chat-send-session-binding.test.ts` › "grants skill authoring to the first message typed after a Control UI reconnect": a direct Control UI admin `chat.send` with the marker and the session's `sessionId` gets `skillLibraryAuthoring`. On merge base `500e19e4490b`: `expected undefined to be defined`. - `chat-send-question-replacement.test.ts` › `reconnect-resume` row: a reconnect-resumed steer replaces a pending multi-part question. On merge base: `expected false to be true`. - Pre-push: 11 test files (touched tests and direct importers of the changed sources), 206 tests, all pass. `pnpm tsgo:core`, `pnpm tsgo:test`, oxfmt and oxlint on the changed files: clean. - One-admission E2E (Q/R/S) and local review results: see comments. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 15b7df3) Co-authored-by: RomneyDa <[email protected]>
…enclaw#204669) ## Problem After a Control UI socket reconnect, the first message the owner types carries `__controlUiReconnectResume: true`. The UI sets this marker on any send whose `sessionId` matches the resumed session, including new typed input. The cron creator admission in `cron-creator-authority-admission.ts` treated that marker as "not direct input". So that one turn lost automation management: `automations list` returned `scope=caller total=0` between two `scope=gateway total=3` turns (openclaw#167867, openclaw#194428). ## Fix Each send is admitted on its own when it starts, and queued or replayed input goes through the same admission as new input. So the reconnect marker no longer takes part in the cron creator decision: - `isReconnectResume` is removed from `GatewayChatUserTurn`, from the chat-send external admission params and from the dispatch call site. - The chat admission, the dashboard hand-off follow-up check and the Template-setup admission no longer read it. - The marker itself stays. Session-id reuse on resume (`auto-reply/reply/session.ts`), goal-start rejection, question replacement and the skill-library human-turn flag still read it. Decision recorded: no new distinction between typed and replayed outbox input. Replayed input is admitted the same as fresh input, by the same owner. Production code: 3 files, net −5 lines. ## Tests - `chat.directive-tags.test.ts`: the lazy configured-MCP cron authority table (moved to the sibling test-support file, next to `deniedChatCronAuthorityCases`, to keep the file under its line cap) gets a `resumed` row. A Control UI admin `chat.send` with `__controlUiReconnectResume: true` and the session's `sessionId` must get the same capability as the fresh row. Red on base, green on head. - Removed rows that asserted the old narrowing (`agent-run-local-operator-authority.test.ts`), and the dropped field in fixtures. ## Evidence - Real Gateway, real model (Z1 harness, case openclaw#167867), head `a496e4039557`: an admin Control UI client creates 3 automations, then the agent runs `automations list` on turn A (fresh), turn B (after a socket reconnect, sent with `__controlUiReconnectResume: true` and the same `sessionId`), and turn C (fresh). Result: A `scope=gateway total=3`, **B `scope=gateway total=3`**, C `scope=gateway total=3`. On main `d5af0116c7e3`, B was `scope=caller total=0`. - One-admission E2E on head `a496e4039557`: Q (queued input refused visibly), R (a running turn finishes) and S (Stop cancels) all pass. - Red on base: the `resumed` row of the lazy configured-MCP table fails on merge base `5bfd560ab5f1` (capability withheld) and passes on head. - Pre-push: 20 test files (touched tests, direct importers, test-support importers). All pass except `src/cron/service.pr-automation.test.ts` (`trigger.state` is null in the trigger script), which fails the same way on merge base `5bfd560ab5f1`. - `pnpm tsgo:core`, `pnpm tsgo:test`, oxlint and oxfmt on the changed files: clean. - Local ClawSweeper review on `a496e4039557`: complete, patch is correct, no findings. Co-authored-by: Ayaan Zaidi <[email protected]>
… and answer pending questions (openclaw#204698) Related: openclaw#167867, openclaw#204669 ## What Problem This Solves After the Control UI reconnects its socket, the first message you type carries a reconnect marker (`__controlUiReconnectResume`). Three Gateway checks still read that marker as "this is not fresh input": 1. **Skill authoring:** that one message gets no skill-library grant. If you ask the agent to save or update a skill, `skill_library` answers "Skill authoring needs a fresh message from the person requesting the change." The messages before and after it work. 2. **Pending questions:** while the agent waits on a multi-part, secret or `required_action` question, a steer message normally replaces that question. The first steer after a reconnect does not, so the run stays blocked on the question. 3. **Goal start:** a goal start with the marker is rejected. The Control UI never sends the marker with a goal start, so this refusal cannot be reached. This is the same class as openclaw#204669 (the cron creator admission). Each send is admitted on its own when it starts. The marker must not change what new input can do. ## User Impact The first message after a reconnect can save or update skills and can replace a pending question, the same as any other message. ## Why This Change Was Made The three reads are deleted. No new code. Production lines: +2/−5. Replay dedupe does not depend on the marker: a repeated `idempotencyKey` is answered from the chat-send dedupe cache (`chat-send-pre-admission.ts`). Kept on purpose: the marker still reaches `chat-user-turn-recorder.ts` → `resumeRequestedSession`, which skips idle/daily session rollover when the reconnecting tab sends the session's current `sessionId` (openclaw#89017, "sessions persist after reconnects"). That is a session-lifecycle choice, not admission: it does not change tools, questions, goals or skills. So the marker itself stays. Accepted edge case: an outbox message typed before a question appeared, and first sent after a reconnect, now also replaces that question, like any other steer. ## Evidence - **Real Gateway, real model (gpt-5.5), head `66301b8523`:** an admin Control UI client asks the agent to call `skill_library list` on turn A (fresh), turn B (after a socket reconnect, with `__controlUiReconnectResume: true` and the same `sessionId`) and turn C (fresh). All three tool results list the library. On main `455100f26b1b`, turn B returned `{"status":"error","error":"Skill authoring needs a fresh message from the person requesting the change."}`. The check now reads the tool result, not the model's reply. - **Red on base, green on head:** - `chat-send-session-binding.test.ts` › "grants skill authoring to the first message typed after a Control UI reconnect": a direct Control UI admin `chat.send` with the marker and the session's `sessionId` gets `skillLibraryAuthoring`. On merge base `ab61848f5bfc`: `expected undefined to be defined`. - `chat-send-question-replacement.test.ts` › `reconnect-resume` row: a reconnect-resumed steer replaces a pending multi-part question. On merge base: `expected false to be true`. - Pre-push: 11 test files (touched tests and direct importers of the changed sources), 206 tests, all pass. `pnpm tsgo:core`, `pnpm tsgo:test`, oxfmt and oxlint on the changed files: clean. - One-admission E2E (Q/R/S) and local review results: see comments. Co-authored-by: Ayaan Zaidi <[email protected]>
…04669) After a Control UI socket reconnect, the first message the owner types carries `__controlUiReconnectResume: true`. The UI sets this marker on any send whose `sessionId` matches the resumed session, including new typed input. The cron creator admission in `cron-creator-authority-admission.ts` treated that marker as "not direct input". So that one turn lost automation management: `automations list` returned `scope=caller total=0` between two `scope=gateway total=3` turns (#167867, #194428). Each send is admitted on its own when it starts, and queued or replayed input goes through the same admission as new input. So the reconnect marker no longer takes part in the cron creator decision: - `isReconnectResume` is removed from `GatewayChatUserTurn`, from the chat-send external admission params and from the dispatch call site. - The chat admission, the dashboard hand-off follow-up check and the Template-setup admission no longer read it. - The marker itself stays. Session-id reuse on resume (`auto-reply/reply/session.ts`), goal-start rejection, question replacement and the skill-library human-turn flag still read it. Decision recorded: no new distinction between typed and replayed outbox input. Replayed input is admitted the same as fresh input, by the same owner. Production code: 3 files, net −5 lines. - `chat.directive-tags.test.ts`: the lazy configured-MCP cron authority table (moved to the sibling test-support file, next to `deniedChatCronAuthorityCases`, to keep the file under its line cap) gets a `resumed` row. A Control UI admin `chat.send` with `__controlUiReconnectResume: true` and the session's `sessionId` must get the same capability as the fresh row. Red on base, green on head. - Removed rows that asserted the old narrowing (`agent-run-local-operator-authority.test.ts`), and the dropped field in fixtures. - Real Gateway, real model (Z1 harness, case #167867), head `a496e4039557`: an admin Control UI client creates 3 automations, then the agent runs `automations list` on turn A (fresh), turn B (after a socket reconnect, sent with `__controlUiReconnectResume: true` and the same `sessionId`), and turn C (fresh). Result: A `scope=gateway total=3`, **B `scope=gateway total=3`**, C `scope=gateway total=3`. On main `736ec651c262`, B was `scope=caller total=0`. - One-admission E2E on head `a496e4039557`: Q (queued input refused visibly), R (a running turn finishes) and S (Stop cancels) all pass. - Red on base: the `resumed` row of the lazy configured-MCP table fails on merge base `e24a2eecffb7` (capability withheld) and passes on head. - Pre-push: 20 test files (touched tests, direct importers, test-support importers). All pass except `src/cron/service.pr-automation.test.ts` (`trigger.state` is null in the trigger script), which fails the same way on merge base `e24a2eecffb7`. - `pnpm tsgo:core`, `pnpm tsgo:test`, oxlint and oxfmt on the changed files: clean. - Local ClawSweeper review on `a496e4039557`: complete, patch is correct, no findings. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 24a8e8f) Companion audit: 15b7df3 and 1ef0005 are later independent lane picks. 35cd392 and 50a7368 change downstream reply waiting/snooze behavior; 5e3065e, 63e0742 and 8027293 are later authority-owner refactors; b5023a7 trims unrelated examples. None are companions to this correction. Release adaptation: Remove only the transport marker from admitted direct automation provenance; adapt the requester custody fixture without changing its stable delegation or controls. Co-authored-by: RomneyDa <[email protected]>
… and answer pending questions (#204698) Related: #167867, #204669 After the Control UI reconnects its socket, the first message you type carries a reconnect marker (`__controlUiReconnectResume`). Three Gateway checks still read that marker as "this is not fresh input": 1. **Skill authoring:** that one message gets no skill-library grant. If you ask the agent to save or update a skill, `skill_library` answers "Skill authoring needs a fresh message from the person requesting the change." The messages before and after it work. 2. **Pending questions:** while the agent waits on a multi-part, secret or `required_action` question, a steer message normally replaces that question. The first steer after a reconnect does not, so the run stays blocked on the question. 3. **Goal start:** a goal start with the marker is rejected. The Control UI never sends the marker with a goal start, so this refusal cannot be reached. This is the same class as #204669 (the cron creator admission). Each send is admitted on its own when it starts. The marker must not change what new input can do. The first message after a reconnect can save or update skills and can replace a pending question, the same as any other message. The three reads are deleted. No new code. Production lines: +2/−5. Replay dedupe does not depend on the marker: a repeated `idempotencyKey` is answered from the chat-send dedupe cache (`chat-send-pre-admission.ts`). Kept on purpose: the marker still reaches `chat-user-turn-recorder.ts` → `resumeRequestedSession`, which skips idle/daily session rollover when the reconnecting tab sends the session's current `sessionId` (#89017, "sessions persist after reconnects"). That is a session-lifecycle choice, not admission: it does not change tools, questions, goals or skills. So the marker itself stays. Accepted edge case: an outbox message typed before a question appeared, and first sent after a reconnect, now also replaces that question, like any other steer. - **Real Gateway, real model (gpt-5.5), head `66301b8523`:** an admin Control UI client asks the agent to call `skill_library list` on turn A (fresh), turn B (after a socket reconnect, with `__controlUiReconnectResume: true` and the same `sessionId`) and turn C (fresh). All three tool results list the library. On main `4164dcb200af`, turn B returned `{"status":"error","error":"Skill authoring needs a fresh message from the person requesting the change."}`. The check now reads the tool result, not the model's reply. - **Red on base, green on head:** - `chat-send-session-binding.test.ts` › "grants skill authoring to the first message typed after a Control UI reconnect": a direct Control UI admin `chat.send` with the marker and the session's `sessionId` gets `skillLibraryAuthoring`. On merge base `500e19e4490b`: `expected undefined to be defined`. - `chat-send-question-replacement.test.ts` › `reconnect-resume` row: a reconnect-resumed steer replaces a pending multi-part question. On merge base: `expected false to be true`. - Pre-push: 11 test files (touched tests and direct importers of the changed sources), 206 tests, all pass. `pnpm tsgo:core`, `pnpm tsgo:test`, oxfmt and oxlint on the changed files: clean. - One-admission E2E (Q/R/S) and local review results: see comments. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 15b7df3) Companion audit: da88cb8 selected immediately next for the same fixture cleanup. 1ef0005 is a separate later lane pick; 283b6d7, 50a7368, 5e3065e and 63e0742 introduce unrelated sharing, snooze or authority-owner changes. Release adaptation: Apply only skillLibrary.isHumanTurn and its directly admitted stable reconnect regression; omit the absent question replacement owner and unrelated goal change. Co-authored-by: RomneyDa <[email protected]>
Problem
After a Control UI socket reconnect, the first message the owner types carries
__controlUiReconnectResume: true. The UI sets this marker on any send whosesessionIdmatches the resumed session, including new typed input. The cron creator admission incron-creator-authority-admission.tstreated that marker as "not direct input". So that one turn lost automation management:automations listreturnedscope=caller total=0between twoscope=gateway total=3turns (#167867, #194428).Fix
Each send is admitted on its own when it starts, and queued or replayed input goes through the same admission as new input. So the reconnect marker no longer takes part in the cron creator decision:
isReconnectResumeis removed fromGatewayChatUserTurn, from the chat-send external admission params and from the dispatch call site.auto-reply/reply/session.ts), goal-start rejection, question replacement and the skill-library human-turn flag still read it.Decision recorded: no new distinction between typed and replayed outbox input. Replayed input is admitted the same as fresh input, by the same owner.
Production code: 3 files, net −5 lines.
Tests
chat.directive-tags.test.ts: the lazy configured-MCP cron authority table (moved to the sibling test-support file, next todeniedChatCronAuthorityCases, to keep the file under its line cap) gets aresumedrow. A Control UI adminchat.sendwith__controlUiReconnectResume: trueand the session'ssessionIdmust get the same capability as the fresh row. Red on base, green on head.agent-run-local-operator-authority.test.ts), and the dropped field in fixtures.Evidence
a496e4039557: an admin Control UI client creates 3 automations, then the agent runsautomations liston turn A (fresh), turn B (after a socket reconnect, sent with__controlUiReconnectResume: trueand the samesessionId), and turn C (fresh). Result: Ascope=gateway total=3, Bscope=gateway total=3, Cscope=gateway total=3. On main736ec651c262, B wasscope=caller total=0.a496e4039557: Q (queued input refused visibly), R (a running turn finishes) and S (Stop cancels) all pass.resumedrow of the lazy configured-MCP table fails on merge basee24a2eecffb7(capability withheld) and passes on head.src/cron/service.pr-automation.test.ts(trigger.stateis null in the trigger script), which fails the same way on merge basee24a2eecffb7.pnpm tsgo:core,pnpm tsgo:test, oxlint and oxfmt on the changed files: clean.a496e4039557: complete, patch is correct, no findings.