Skip to content

feat(agents): support required manual-step handoffs in chat - #196951

Merged
joshavant merged 16 commits into
mainfrom
openclaw/vivid-langoustine-3
Nov 14, 2026
Merged

joshavant merged 16 commits into
mainfrom
openclaw/vivid-langoustine-3

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

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_user contract with requiredAction, 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.

  • Before catalog-refresh repair: the agent naturally displayed a manual-step card; human OAuth reached Connected, but Ready resumed with zero Linear tools. The original task remained blocked.
  • With the final repair: the agent naturally displayed the card; after human OAuth and Ready, the same original run acquired authenticated tools, successfully called linear__get_user, finalized done, and displayed its success reply. No Gateway restart; zero active work or pending inputs. Run 2dd3c7d6-bab0-4193-b189-668de4096b7f, completed 2026-11-14 00:33:52 UTC.
  • Premature Ready without OAuth: settled as still unauthorized, no repeated card or Linear operation. Stop this task: settled with zero subsequent tool calls. Both left no active work or pending input.

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 login CLI cannot resolve. Ready remains a recheck instruction; actual credential state determines catalog availability.

Regression checks and review

  • 125 focused tests pass, covering manual/ordinary answers, Ready with and without a refresh consumer, Stop/cancel/expiry, creator-scope capture, deferred core discovery versus client overrides, normalization, existing runner continuation, and prompt-prefix stability. The repair regression failed before the fix.
  • Targeted production/test types, lint, formatting, whitespace, and the full build including SDK declarations pass. The tests reuse the existing refresh lifecycle; real acquisition is established by the live replay above. Local timings: ask-user 35 cases, 11.29 s runner time; Code Mode/prefix 58 cases across two shards, 55.68 s combined wall time (51-case Code Mode/description owner: 52.36 s including cold transform/import). Broad hosted CI is recorded separately below; it is not green.
  • Independent full-candidate autoreview, Codex gpt-6.1-sol, medium, P0–P3: scoped-clean, no actionable findings, confidence 0.83, range da533397..f4524367 (published as the identical-tree 57ca0021667). 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.
  • Exact published combined head: 57ca0021667c1f0c81ccda0d0f21bdcc620801fa, verified identical tree to reviewed/live-tested local f4524367. 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 from 723eef0 is not credited.
  • Scoped inherited-failure qualification — assertion label corrected in the November 14 provenance audit: 39 of the 40 failed assertions match inspected scheduled-main failures by test and assertion; three browser messages differ only in inspected Playwright retry grouping/timing with identical target and obstruction. The remaining desktop WebKit Logs failure is Auto-follow failing to resume, expect.poll(() => autoFollow.isChecked()).toBe(true) at logs-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, commit 16a586ea9ace, introduced both return-to-tail resumption and this assertion. #196566, commit bad2d8084676, 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.
  • Native landing evidence retains the exact tested merge 322bedec77c0652c2b8dc0e4a3f7ad46fafdb5bc, baseline cb1c431af60266f3631e7cf8480bec1c740a3355, 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.

Original turn waiting with an actionable manual step

Same conversation completed without repeating recorded progress

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

Worked on by:
- @jason-allen-oneal

Co-authored-by: jason-allen-oneal <[email protected]>
OpenClaw-Publication: 50f43aa7-c353-4dbc-8f86-a68beee80d1b
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: L labels Nov 11, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds 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.

  • Before: In the reported replay before the refresh repair, OAuth completed but Ready resumed with zero Linear tools.
  • After: The same run acquired authenticated tools and successfully called linear__get_user without restarting the Gateway.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Useful, focused behavior through existing owners, supported by shipped-entry-point proof and targeted regressions; no actionable finding remains.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Inspected screenshots show the real Gateway question panel and completed original task; the public final-repair replay reports deferred Code Mode discovering the handoff, human Linear OAuth, authenticated tool acquisition and get_user success, with premature Ready and Stop negative controls.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: A task blocked on human sign-in can end prematurely or resume with tools captured before authentication.
Reason: The maintainer-authored direction addresses a demonstrated workflow and retains existing question, authorization, cancellation, and refresh ownership.

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
Reviewed head: 57ca0021667c1f0c81ccda0d0f21bdcc620801fa

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +138, Tests +537, Docs +46, Other +2. Total +723 across 17 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 4 162 24 +138
Tests 11 543 6 +537
Docs 1 53 7 +46
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 17 760 37 +723

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster. Replaced prior rating: 🐚 platinum hermit.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is live_output.

Label justifications:

  • P2: Improves blocked chat tasks and post-authentication continuation without changing configuration or existing authorization controls.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster. Replaced prior rating: 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-11T01:28:33.822Z sha 3865b84 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-13T03:27:49.919Z sha 723eef0 :: needs maintainer review before merge. :: none

Reviewed 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
@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Nov 11, 2026
@roboclaw-bot roboclaw-bot changed the title improve(plugins): resume chat tasks after account sign-in feat(agents): support required manual-step handoffs in chat Nov 11, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 11, 2026 01:57
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

roboclaw-bot and others added 3 commits November 11, 2026 02:15
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
roboclaw-bot and others added 4 commits November 11, 2026 02:44
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
roboclaw-bot and others added 2 commits November 11, 2026 04:20
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
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 13, 2026
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.
@joshavant

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 14, 2026
@joshavant
joshavant enabled auto-merge (squash) November 14, 2026 00:52
@joshavant
joshavant disabled auto-merge November 14, 2026 01:27
@joshavant
joshavant merged commit de0ea1e into main Nov 14, 2026
146 of 155 checks passed
@joshavant
joshavant deleted the openclaw/vivid-langoustine-3 branch November 14, 2026 01:37
@joshavant

Copy link
Copy Markdown
Collaborator

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui clawsweeper:intake:feature Preliminary submission classification; full source review pending. docs Improvements or additions to documentation extensions: codex 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: L 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.

3 participants