Repository navigation
fix: let the first message after a Control UI reconnect author skills and answer pending questions - #204698
Conversation
The Control UI reconnect marker no longer withholds the skill-library authoring grant, no longer keeps a steer from replacing a pending multi-part or secret question, and no longer rejects a goal start. Session rollover on resume still reads it. 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. |
|
E2E on exact head
|
|
Landed as 15b7df3. The first message after a Control UI reconnect now gets the skill-library grant and can replace a pending multi-part or secret question. The dead goal-start refusal is gone. Proof: two tests red on base and green on head, a real-Gateway run where A/B/C all list the skill library, one-admission E2E Q/R/S pass, CI green on the first round, local review clean. The session-rollover read (#89017) keeps the marker. |
|
Codex review: needs maintainer review before merge. What this changesThis PR lets reconnect-marked Control UI messages receive normal skill-authoring authority and replace pending questions, while removing an unreachable Goal restriction. Example: After reconnecting, an authenticated user sends “Save this workflow as a skill” in the existing conversation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes reconnect-specific restrictions still present on main, and no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherControl UI sends enter Gateway chat normalization and admission, then reach the existing skill-library or question owners; the reconnect marker separately preserves matching-session lifecycle behavior. flowchart TD
A[Control UI message] --> B[Chat request normalization]
B --> C[Existing request admission]
C --> D[Skill library authority]
C --> E[Pending question owner]
B --> F[Matching session resume]
Technical reviewBest possible solution: Remove the reconnect-specific capability exclusions while retaining existing admission, question ownership, deduplication and matching-session resume behavior. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows the reconnect exclusions, and the author reports live skill-library failure plus base-failing regressions; this read-only review executed no reproduction. Is this the best way to solve the issue? The patch is the smallest complete source fix: reconnect state describes session continuity, while the existing admission and capability owners already decide authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bf91a8134039. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -6, Tests +59. Total +53 across 5 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. Review metrics
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, 9:56 AM ET / 14:56 UTC. |
… 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]>
… 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]>
… 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]>
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":skill_libraryanswers "Skill authoring needs a fresh message from the person requesting the change." The messages before and after it work.required_actionquestion, a steer message normally replaces that question. The first steer after a reconnect does not, so the run stays blocked on the question.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
idempotencyKeyis 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 currentsessionId(#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
66301b8523: an admin Control UI client asks the agent to callskill_library liston turn A (fresh), turn B (after a socket reconnect, with__controlUiReconnectResume: trueand the samesessionId) and turn C (fresh). All three tool results list the library. On main4164dcb200af, 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.chat-send-session-binding.test.ts› "grants skill authoring to the first message typed after a Control UI reconnect": a direct Control UI adminchat.sendwith the marker and the session'ssessionIdgetsskillLibraryAuthoring. On merge base500e19e4490b:expected undefined to be defined.chat-send-question-replacement.test.ts›reconnect-resumerow: a reconnect-resumed steer replaces a pending multi-part question. On merge base:expected false to be true.pnpm tsgo:core,pnpm tsgo:test, oxfmt and oxlint on the changed files: clean.