Skip to content

In a MAWS session, name the in-app browser in js's search hint, js's rules and the host notes (#368) - #385

Merged
SSFSKIM merged 3 commits into
mainfrom
fix/368-maws-browser-hint
Nov 17, 2026
Merged

SSFSKIM merged 3 commits into
mainfrom
fix/368-maws-browser-hint

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 15, 2026

Copy link
Copy Markdown
Owner

What changes

In a MAWS session (a MAWS backend in CUA_BROWSER_BACKENDS, with the browser surface on), the texts an agent reads before profiles_list now name the session's in-app browser:

  • js's search hint: "control macos apps, this session's MAWS in-app browser and the user's chrome profiles: click, type, fill forms, read, screenshot". With the browser surface alone, the hint is "operate this session's MAWS in-app browser and the user's chrome browser profiles: …".
  • js's rules gain a line before the Chrome pointer: "In MAWS: cua.getBrowser() with no id is this session's in-app browser (key maws), the pane the user watches; use it for any page, and it needs no profiles_list call. Use a Chrome profile only when the user names one, and then follow profiles_list's rules."
  • The host notes gain MAWS_RULE verbatim after the head line. The worst-case initialize instructions are now 1,496 characters, within the 2,048 limit.

With no MAWS backend, every model-facing text is byte for byte as on main. A sha256 pin covers every host note, hint, rule and js description across platform × surface set × devices; it was computed on main's source before the change.

Why

Under tool search, profiles_list is deferred, so an agent could find and call js without ever reading MAWS_RULE, which lived only in profiles_list's description. It then tested pages in a separate browser and asked the person to click (#368's "Seen").

Not done

The ticket's optional item 4 (a line in the browser docs that the first js call returns) is skipped. That text is the vendor's, built in the runtime host's launch overrides, and that path is deliberately MAWS-neutral (serve-lazy's test). The new rule already sits in js's own description, above the vendor docs.

Verification

  • Focused tests: node --test test/mcp-maws-hint.test.mjs test/mcp-browser-surface.test.mjs test/mcp-server.test.mjs test/serve-lazy.test.mjs test/serve-maws.test.mjs test/chrome-client-mode.test.mjs, 98/98 passing. The new serve()-level test fails if the MAWS re-read is removed.
  • Review: doperpowers:reviewer-medium. Round 1 found the exemption's "it" could read as the Chrome profile; that is fixed in 9690bf8. Round 2: correct.
  • ci-gate on 3342e66, gates plugin and test: GREEN, https://github.com/SSFSKIM/cua/actions/runs/43754627400. The engine, sandbox and browser-parity gates were not run, because the change touches only MCP text and its wiring in src/mcp/.

Plugin 0.28.2.

Closes #368

Sminos-Session: cursor235#b93055dd (cua on macbook)

…rules and the host notes (refs #368)

With a MAWS backend configured (inAppBrowser), the texts an agent reads before it ever loads profiles_list now say that
cua.getBrowser() with no id is this session's in-app browser: js's hint names it first, js's rules carry the MAWS rule
(profiles_list's wording plus where no profiles_list call is needed), and the host notes gain that rule after their head
on the browser surfaces. serve() passes the backend's presence to settingsFrom for the notes; a custom CUA_SHIM_HOST_NOTES
is left alone. With no backend every text is byte for byte unchanged (pinned by digest).

Sminos-Session: cursor235#b93055dd (cua on macbook)
…n, before the Chrome sentence (refs #368)

The appended "no profiles_list call is needed for it" followed the Chrome-profile sentence, so a reader of js alone
could take "it" to be the Chrome profile and skip profiles_list for Chrome.

Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T20:16:47.728004Z 3342e66 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 9d8508e into main Nov 17, 2026
10 of 18 checks passed
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.

In a MAWS session, name the in-app browser where the agent looks first (the js tool's search hint and rules, the host notes)

1 participant