Skip to content

fix(browser-handoff): tell the customer before attaching the browser - #242

Merged
convyusboy merged 2 commits into
boonfrom
ridho/browser-handoff-message-before-attach
Sep 25, 2026
Merged

convyusboy merged 2 commits into
boonfrom
ridho/browser-handoff-message-before-attach

Conversation

@convyusboy

@convyusboy convyusboy commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Live testing of the browser-handoff recheck flow on arief-openclaw-test: a customer signed in to BuildingConnected, the automatic recheck correctly detected status: "ready", but the customer never received any reply at all.

Why This Change Was Made

Tracing the live logs: the recheck detected ready, and per its own scheduled prompt, was supposed to message the customer immediately. Instead, the model called action=attach, then tried to actually use the browser tool against the newly-registered CDP profile — which failed repeatedly with Chrome MCP handshake timed out (a separate, likely boon-core/Anchor Browser-side issue, not addressed by this change). The model never got back to sending the customer a message at all.

Both text surfaces the model sees on a ready result told it different things:

  • The recheck's own scheduled prompt (scheduleRecheck) said to message the customer now, but only in passing, before other instructions.
  • handleStatus's "ready" tool-result text said only "Call action=attach with the same site to finish setup." — no mention of messaging at all, and it's the text the model reads immediately after getting the fresh result, so it apparently won out over the fuller framing prompt.

Reworded both to say the same thing, in the same order: message the customer first, before any other tool call, specifically because a follow-up step (attach/browse) can fail or hang and shouldn't be able to block the one thing the customer is actually waiting on — confirmation they're signed in.

This is a prompt-wording fix, not a deterministic guarantee — the model's exact tool-call ordering isn't something code can force. It follows the same pattern already used elsewhere in this file (see the existing comment on scheduleRecheck about a different observed model-behavior failure mode it guards against with wording).

User Impact

Customers who finish a browser-handoff sign-in should reliably get a "you're signed in" confirmation message, even if boon-core's follow-up browser-attach step is slow or failing (as it currently is, separately, on arief).

Evidence

  • Live: reproduced on arief-openclaw-test — journalctl --user -u openclaw-gateway.service showed the recheck detect ready, then three repeated [tools] browser failed: ... Chrome MCP handshake timed out entries (open, tabs, snapshot actions) with no message tool call in between, before and after an unrelated gateway restart.
  • node scripts/run-vitest.mjs extensions/browser-handoff — 43/43 passing (existing tests use loose substring assertions on this text — toContain("finished signing in"), toContain("message"), toContain("ready") — so none needed updating).
  • pnpm tsgo:core — clean.
  • pnpm check:import-cycles — 0 cycles.
  • node scripts/run-oxlint.mjs extensions/browser-handoff/src/tool.ts — clean.
  • oxfmt --check — clean.
  • git diff --numstat — 12 insertions / 2 deletions, comment-and-wording only; no logic changes.

🤖 Generated with Claude Code


Summary by cubic

Fixes the browser-handoff flow so customers who finish signing in reliably get a confirmation message, even when the follow-up browser attach step fails or hangs.

  • Rewords the scheduled recheck prompt, the "ready" status tool-result text, and the SKILL.md step list to all instruct the model to message the customer before any other tool call.
  • Previously the status text and skill doc told the model to attach next without mentioning messaging, and a failing attach could block the customer message entirely.
  • Prompt- and doc-wording only; no logic changes.

Written for commit b469b7c. Summary will update on new commits.

Review in cubic

Live testing on arief-openclaw-test showed a signed-in customer never
getting a reply: the scheduled recheck detected status="ready" and
correctly told the model to message the customer, but the model
proceeded to action=attach and then the browser tool first -- which
kept failing with a Chrome MCP handshake timeout -- and never got
back to sending the message at all.

Both text surfaces the model sees on a ready result now say the same
thing: message the customer first, before any other tool call. The
recheck's scheduled prompt already said this, but only in passing; the
status tool's own "ready" response text said "call action=attach next"
without mentioning messaging at all, competing for the model's next
action and, per the observed failure, apparently winning. Reordering
both consistently means a customer gets the "you're signed in"
confirmation even when the follow-up attach/browse step fails or
hangs.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@convyusboy
convyusboy requested a review from a team September 23, 2026 12:11

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread extensions/browser-handoff/src/tool.ts Resolved
cubic review feedback on #242: SKILL.md still told the model to go
straight from a ready status to action="attach" then the browser tool,
with no step to confirm sign-in first -- leaving the exact
attach-before-message failure that PR fixes reachable whenever a flow
is driven from the skill doc rather than the scheduled recheck prompt.
Added a message-first step matching the tool-result wording.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

@augusteo augusteo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the exact diff at b469b7c. No actionable code findings. The customer-notification instruction now precedes attach/browser follow-up in both the status result and resumed recheck prompt. Exact-head Actions workflows completed successfully. The focused local browser-handoff test was not run in this environment.

@convyusboy
convyusboy merged commit d8fdc86 into boon Sep 25, 2026
139 of 140 checks passed
@convyusboy
convyusboy deleted the ridho/browser-handoff-message-before-attach branch September 25, 2026 12:42
convyusboy added a commit that referenced this pull request Sep 28, 2026
…249)

* chore(release): bump version 2026.6.11-boon.46 -> 2026.6.11-boon.47

Root version, 135 plugin manifests synced via scripts/sync-plugin-versions.ts, changed npm-shrinkwrap.json files regenerated, CHANGELOG section for boon.47.

Shipping: #236/#239 (a plugin tool's own execute() handler can now reliably schedule/unschedule a cron-backed session turn, fixing the browser-handoff recheck across three sequential live-found bugs), #240 (recheck backoff cap tightened 5m -> 2m), #242 (recheck messages the customer before attaching the browser), #241 (delivery.mode: "none" cron jobs can deliver an explicit message-tool send), #243 (Chrome MCP stderr drained before connect, not after), #247 (distinct exec-trajectory label for boon-projects schedule append/list), ENG-20030 (shared turn-resume-instruction wording for boon-core/anychat-boon-web), #248 (Docker build no longer OOMs 8 GB CI runners).

Base = 2026.6.11-boon.46. Gateway plus @openclaw/slack, @openclaw/msteams and @openclaw/diagnostics-prometheus bumped in lockstep; no separately published plugin source changed in this train, so a gateway roll delivers all of it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(release): regenerate stale extension npm-shrinkwrap.json versions for boon.47

pnpm plugins:sync bumps each plugin's package.json version but does not touch its checked-in npm-shrinkwrap.json, so 65 published extension shrinkwraps still embedded version 2026.6.11-boon.46 despite package.json already reading boon.47. Since npm-shrinkwrap.json ships inside the npm artifact, this would have published every affected plugin with a mismatched embedded version.

Bumped the version field(s) in all 65 (plus the openclaw peerDependency range where present) to 2026.6.11-boon.47, matching the pattern boon.46's bump commit already applied to these same files.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants