Repository navigation
feat(agents): support required manual-step handoffs in chat - #196951
Conversation
Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 50f43aa7-c353-4dbc-8f86-a68beee80d1b
|
Codex review: needs maintainer review before merge. What this changesAdds required manual steps to ask_user and refreshes available tools before resuming after the user selects Ready to recheck. Example: A chat task needs authentication for Linear plugin 1.0.1.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a useful manual-step handoff and reuses existing lifecycle owners; no actionable correctness or security defect was found, and exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe agent's ask_user tool converts model input into Gateway questions; existing chat controls collect the answer, and the runtime-refresh owner reacquires tools before continuing the original turn. flowchart LR
A[Agent task] --> B[ask_user normalization]
B --> C[Gateway question lifecycle]
C --> D[Chat question panel]
D --> E[Answer settlement]
E --> F[Runtime refresh]
F --> G[Prerequisite verification]
Technical reviewBest possible solution: Extend the existing question and refresh owners with explicit Ready and unresolved outcomes, preserving authoritative prerequisite checks and completed progress. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the decision-only question contract and missing Ready-triggered refresh; the supplied replay demonstrates the affected OAuth scenario, which this read-only review did not execute. Is this the best way to solve the issue? The implementation uses the smallest existing ownership boundary: canonical questions for the wait and the existing refresh continuation for tool reacquisition, without a second approval system or recovery ledger. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9156de83fa53. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +138, Tests +537, Docs +46, Other +2. Total +723 across 17 files. Added test files: 1. 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 HistoryReviewed November 13, 2026, 7:55 PM ET / November 14, 2026, 00:55 UTC (Revision 3). |
Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 6ba709ca-e842-4d08-9ee9-b9fbe8db0038
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Co-authored-by: jason-allen-oneal <[email protected]>
Co-authored-by: jason-allen-oneal <[email protected]>
Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 2dfa6046-fa0e-4976-8bd8-76fdb56b28c0
Co-authored-by: jason-allen-oneal <[email protected]>
Co-authored-by: jason-allen-oneal <[email protected]>
Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: b14c207c-b680-45b6-8f81-fe7a974d0b20
Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 960ff543-9fbf-4daa-892c-6039f6363c96
Co-authored-by: jason-allen-oneal <[email protected]>
Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 3354bc36-5c29-4685-9de5-950cfd01d15a
|
🦞👀 Re-review progress:
|
Expose requiredAction guidance in deferred Code Mode catalogs only for the effective built-in ask_user binding. After human Ready, request the existing runtime-refresh continuation before rechecking the original task. Preserve ordinary answers, unresolved outcomes, and the actual authorization gates. Validation: 125 focused tests, targeted types/lint/format, and full build. Isolated live original request and screenshot reached the handoff, completed human Linear OAuth, resumed the same run, and successfully queried get_user without a Gateway restart. Premature Ready stayed blocked; Stop made no further tool calls. Independent P0-P3 review found no actionable defects.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…#196951) * improve(plugins): resume chat tasks after account sign-in Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 50f43aa7-c353-4dbc-8f86-a68beee80d1b * Publish openclaw/vivid-langoustine-3 Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 6ba709ca-e842-4d08-9ee9-b9fbe8db0038 * Save workspace before refreshing its selected base Co-authored-by: jason-allen-oneal <[email protected]> * Publish openclaw/vivid-langoustine-3 Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 2dfa6046-fa0e-4976-8bd8-76fdb56b28c0 * Save workspace before refreshing its selected base Co-authored-by: jason-allen-oneal <[email protected]> * Publish openclaw/vivid-langoustine-3 Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: b14c207c-b680-45b6-8f81-fe7a974d0b20 * Publish openclaw/vivid-langoustine-3 Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 960ff543-9fbf-4daa-892c-6039f6363c96 * Publish openclaw/vivid-langoustine-3 Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 3354bc36-5c29-4685-9de5-950cfd01d15a * Publish openclaw/vivid-langoustine-3 Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: d2c714a5-68e2-4ec0-9b86-dc7c682a8df9 * Publish openclaw/vivid-langoustine-3 Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 817a5867-b409-4cc2-ba15-74de40ea51fe * Publish openclaw/vivid-langoustine-3 Worked on by: - @jason-allen-oneal Co-authored-by: jason-allen-oneal <[email protected]> OpenClaw-Publication: 8872042f-a6b3-48d1-ad85-bab0bc626f13 * fix(agents): resume human handoffs with refreshed tools Expose requiredAction guidance in deferred Code Mode catalogs only for the effective built-in ask_user binding. After human Ready, request the existing runtime-refresh continuation before rechecking the original task. Preserve ordinary answers, unresolved outcomes, and the actual authorization gates. Validation: 125 focused tests, targeted types/lint/format, and full build. Isolated live original request and screenshot reached the handoff, completed human Linear OAuth, resumed the same run, and successfully queried get_user without a Gateway restart. Premature Ready stayed blocked; Stop made no further tool calls. Independent P0-P3 review found no actionable defects. --------- Co-authored-by: jason-allen-oneal <[email protected]> Co-authored-by: Josh Avant <[email protected]>
Related: #192713 (effective-tool CLI diagnostics, a separate entry point).
What Problem This Solves
Agents can end an authorized task when a required human step blocks them, and completing sign-in can leave the waiting task with its old unauthenticated tool catalog.
User Impact
The existing chat question panel explains the observed blocker and supported manual step, optionally opens a verified link, and keeps the original task waiting. Ready to recheck refreshes available tools and resumes that task for authoritative verification; it never grants permission or declares success. Stop this task, Skip, and expiry leave the requirement unresolved and stop dependent work.
Existing OAuth, approval, native-permission, and desktop-ownership controls remain authoritative. There is no new configuration, approval layer, or durable restart ledger. Unsupported prerequisites still block the task, and the agent must verify completion before dependent effects.
Why This Change Was Made
Extend the existing
ask_usercontract withrequiredAction, preserving its attributed human-input wait, navigation, reconnect, cancellation, and expiry behavior. Advertise the built-in handoff in deferred Code Mode descriptions; client-overridden question tools do not inherit core semantics. After manual Ready, the tool requests the existing runtime-refresh continuation so newly authorized plugin tools become discoverable without restarting the Gateway or replaying completed work. Ordinary decision answers and unresolved manual steps do not request refresh.The six-file follow-up repairs two gaps observed against reviewed head
723eef051b8954c7ff62686a6a8f2c768884de34: handoff discovery and post-OAuth catalog refresh. It adds no Linear-specific policy or connector workaround.Evidence
Original-flow replay with a real model and human OAuth
An isolated Linux Gateway used Linear plugin 1.0.1, deferred Code Mode, the supplied screenshot, and the original uncoached request, “can you try this? for the isntalled linear plugin”. The real-account replay restricted Linear tools to read operations and instructed the agent against writes.
linear__get_user, finalizeddone, and displayed its success reply. No Gateway restart; zero active work or pending inputs. Run2dd3c7d6-bab0-4193-b189-668de4096b7f, completed 2026-11-14 00:33:52 UTC.This proves the reported browser-account path on the tested configuration. It does not establish recovery for every provider/channel, an unavailable capability, or a plugin-bundled connector that the standalone
mcp loginCLI cannot resolve. Ready remains a recheck instruction; actual credential state determines catalog availability.Regression checks and review
gpt-6.1-sol, medium, P0–P3: scoped-clean, no actionable findings, confidence 0.83, rangeda533397..f4524367(published as the identical-tree57ca0021667). The reviewer inspected supplied source; it did not independently execute the runtime proof. Local ClawSweeper was unavailable because its checkout has no built runtime/dependencies; the workflow fallback uses autoreview and an exact-head hosted re-review after publication; that review completed with no findings or before-merge actions.57ca0021667c1f0c81ccda0d0f21bdcc620801fa, verified identical tree to reviewed/live-tested localf4524367. Combined-head CI run 43536585081, attempt 1 completed with failure: all 81 jobs terminal, seven UI unit/browser root jobs failed plus their aggregate gate. Security-fast and selected Node/type/lint/source/docs checks passed; skipped lanes remain unrun. Historical green CI from723eef0is not credited.expect.poll(() => autoFollow.isChecked()).toBe(true)atlogs-scroll.e2e.test.ts:135:57(failed CI job). The preceding last-row visibility assertion had passed; the earlier description incorrectly called this a visibility failure. #191317, commit16a586ea9ace, introduced both return-to-tail resumption and this assertion. #196566, commitbad2d8084676, later repaired one coalesced-scroll-event case and is already present in the tested baseline. Its repair does not establish that this remaining WebKit interleaving is covered. The medium-confidence attribution of unrelatedness rests on unchanged Logs production/test/transport/dependency owners and a controlled baseline-advertisement comparison, not proof of the precise failure mechanism. That comparison produced identical request counts and row/stream/scroll geometry, and both complete original assertion sequences passed; it did not capture a failing reader-intent/event sequence. Five original baseline runs, one tested-merge run and the original baseline case under CI's four-worker shard passed all three Logs cases. The whole baseline shard still failed three unrelated files. The exact remaining Auto-follow trigger is unreproduced, and ARM64 isolation differs from CI x64. These passing replays do not repair the failure or make CI green.322bedec77c0652c2b8dc0e4a3f7ad46fafdb5bc, baselinecb1c431af60266f3631e7cf8480bec1c740a3355, all seven root jobs/40 cases, aggregate accounting, hashed logs/source comparisons, scoped checks and the explicit Logs attribution/limitations. Landing uses the authorized inherited-failure exception; security and enforced reviews remain separate.Existing handoff runtime/UI proof and contributor credit
Earlier built-Gateway/Control-UI scenarios use a scripted local model and synthetic external app: success with reconnect, Ready while unresolved, cancellation, and a manual step without a URL. Successful paths recheck the prerequisite before one dependent effect; unresolved/cancelled paths perform none, and the original progress write remains one. These screenshots show two stages of that existing fixture journey, not an old-build/new-build comparison.
Existing regression allocation: 483 lines for manual-action settlement/validation, one suite-owned Gateway/UI flow, shared mock read capabilities, and UI-state fixtures; the follow-up reuses existing suites. Local focused timings and hosted CI cost will remain scoped to their measured inputs.
Contributor credit: @jason-allen-oneal. Original PR ancestry is preserved.
Work sessions
Linked for team reference; these sessions are not public.
Worked on by