Skip to content

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) #368

Closed

Description

@SSFSKIM

Background. MAWS is a macOS desktop app that runs Claude Code sessions. Each session it runs has a browser pane beside the conversation, the in-app browser, which the person watches and can take over. MAWS gives each session's engine a Unix socket in CUA_BROWSER_BACKENDS; with it set, cua.getBrowser() with no id is that session's in-app browser (key maws), since #13. For the agent this browser is a third surface of the computer-use tool, beside the Mac's screen and the user's Chrome.

What is wrong. An agent in such a session does not learn this unless it loads profiles_list. The one text that says it is MAWS_RULE (src/mcp/surface.mjs), which is written only into profiles_list's description. Under Claude Code's tool search profiles_list is deferred, so an agent can find and call js without ever reading it.

Seen. In a MAWS session with tool search on, an agent that was asked to open a local page in the session's in-app browser and to test a button there opened the page with MAWS's own pane tool, tested it in a separate headless browser, reported that it could not act inside the pane, and asked the person to click. Told to use cua_repl, it drove the pane correctly. MAWS_RULE had shipped two weeks before.

Why it is so today. Every text the agent reads before profiles_list points away from the in-app browser:

  • js's search hint with both surfaces on is "control macos apps and the user's chrome browser profiles: click, type, fill forms, read, screenshot" (BROWSER_HINTS, src/mcp/surface.mjs). Tool search matches on it.
  • The host notes with the computer surface on open with "Use when a macOS app's GUI is the only way" (COMPUTER_HEAD) and say nothing of a browser.
  • js's own rules end with a pointer to profiles_list's description, for Chrome (BROWSER_POINTER); jsRulesFor is not told whether a MAWS backend is configured.
  • The vendor's paragraph on an in-app browser is removed from js's description (BROWSER_EDITS, src/repl-host/instructions.mjs). That is right, since it describes another product's browser, but nothing replaces it.

Asked for, only when a MAWS backend is configured (inAppBrowser is true in modelTools):

  1. js's search hint names the in-app browser first, for example: "control macos apps, this session's MAWS in-app browser and the user's chrome profiles: click, type, fill forms, read, screenshot".
  2. js's rules carry the rule itself and not only a 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 unless the user names a Chrome profile. No profiles_list call is needed for it."
  3. The host notes gain one line saying the same, inside the 2,048 characters the plugin's tests hold them to.
  4. Optional: one line for the in-app browser in the browser documentation the first js call returns, in place of the removed vendor text.

Unchanged. With no MAWS backend configured every text is byte for byte what it is today.

Acceptance.

  • tools/list on a connection with a MAWS backend shows the new hint and the new rule on js; the initialize answer's instructions carry the new host note and stay within 2,048 characters.
  • The existing tests for a connection without a MAWS backend pass unchanged.
  • In a new MAWS session with tool search on, a prompt that names no tool and asks for a local page to be opened in the in-app browser and a button on it tested ends with the agent driving the in-app browser through js.

What MAWS does on its side, without waiting for this. MAWS adds a paragraph to its own MCP server's instructions for sessions that have the in-app browser ("… With cua_repl's js tool, cua.getBrowser() with no id is this browser, so open, click, type, reload and check pages there yourself instead of asking the user to …"), and its pane tool's answer for a browser page says the same. That reaches an agent that reads MAWS's texts; this ticket reaches the agent whose tool search lands on js.

Context. #13 (the adapter that shipped MAWS_RULE); docs/doperpowers/specs/2026-10-08-maws-in-app-browser-design.md.

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P2
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 13, 2026
  2. SSFSKIM commented on Nov 15, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: Taken by cursor235 (#235 lane) per design 1ea561bc:733

  3. added
    status:in-review
    and removed
    status:in-progress
    on Nov 15, 2026
  4. SSFSKIM commented on Nov 15, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: PR #385 opened, gate green

  5. removed
    status:in-review
    on Nov 17, 2026
  6. SSFSKIM commented on Nov 17, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Landed via PR #385 (cua 0.28.2)

  7. added a commit that references this issue on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions