Skip to content

Built-in browser

Each session can show web pages in a browser pane beside its terminal and code. The agent in the session can drive the same pages: it opens your dev server, clicks through what it just built and reads the console, and you watch it happen in the window.

  • Select the globe button in the session header, next to the terminal and code buttons.
  • Or run Show browser pane from the command palette.
  • Or select Open on a dev server to open its page.

A session with no page yet shows an address field. Type localhost:3000 or a full URL and press Enter. Press ⌘L (Ctrl+L on Linux and Windows) to select the address, and ⌘R (Ctrl+R) to reload the page, also from inside the page.

The toolbar has Back, Forward, Reload, the address, Device size, Open in the system browser, and Close browser, which closes every tab and hides the pane. Go back in the browser, Go forward in the browser, Reload the browser page and Close browser are also in the command palette. See panes to place the browser beside the terminal or code, or to move it into its own window.

A session’s browser has tabs in a strip above the address bar. + opens a tab and × closes one. Closing the last tab closes the browser and hides its pane. A link that asks for a new window opens a new tab.

While the browser pane has the keyboard:

  • ⌘T opens a tab and ⌘W closes it.
  • ⌘⇧[ and ⌘⇧] move to the previous and next tab.
  • ⌘1 to ⌘8 jump to a tab, and ⌘9 to the last tab.

On Linux and Windows use Ctrl for ⌘. The app’s other shortcuts, such as ⌘K, also work while the page has the focus.

Select Device size in the toolbar, the monitor button beside the address, and pick a device. The page then renders at that size, centred in the pane, and the button shows the size. If the device is larger than the pane, the page is scaled down to fit. Rotate turns the device sideways. Fill the pane goes back to the full pane.

The menu starts with these devices:

Device Size in CSS pixels
Small phone 375 × 667
Phone 393 × 852
Large phone 430 × 932
Tablet 820 × 1180
Large tablet 1024 × 1366

To change the list, open Settings, go to Browser, and edit Browser devices. Each device has a name, a width and a height in CSS pixels in portrait, a scale (device pixels for each CSS pixel), and Mobile. Mobile gives the device touch input and a mobile user agent. Clear it for a device such as a desktop monitor at a fixed size. Changes save after a short pause. Reset to defaults goes back to the five built-in devices. The list syncs to your other devices with your other settings.

A project can have its own list, for example a kiosk or a set of devices that its customers use. Edit the project, switch on Use a separate list for this project under Browser devices, and edit the list. Sessions of that project offer only that list. Switch it off to go back to your list from Settings. The project’s list syncs with the project.

A device also gets touch input, the pixel density of the device and the user agent of Chrome on Android, so the page acts as it does on a phone or a tablet. Your mouse clicks and drags arrive as touches. The page reloads when you change between Fill the pane, a phone and a tablet, because a page reads the user agent and touch support when it loads. A turn or a change between two phones does not reload it.

The device applies to every tab of the session and to the tabs that you open later. It holds until you close the browser. You can also use Set the browser’s device size and Rotate the browser’s device in the command palette.

The pages render with the browser engine of the desktop app, Chromium. A page that looks right here can still look different in Safari on an iPhone.

A session keeps its pages while you look at other sessions or hide the pane, so an agent can keep working on them. A green dot on the globe button marks a session with a page open that is not on screen.

Cookies and storage are kept across restarts, separate from the rest of the app, so a login to your dev server holds. Each project has its own cookies: the sessions of a project share a login, and an agent in another project cannot use it. After an update to this version, log in once more in each project.

Only http and https pages load. Requests for the camera, notifications or location are refused.

The browser runs on your device, but for a session on a remote host, localhost means that host. Type localhost:3000 in such a session and the page loads from port 3000 on the host, over your existing ssh connection. The address field says which host localhost points to.

The page keeps the localhost address, so its cookies, redirects and hot reload work as they would in a browser on the host. Sessions of one project on the same host share cookies; sessions on different hosts, or of different projects, do not.

If ssh cannot forward the port, the page shows a 502 error with ssh’s message.

The web version of mocante cannot show a page itself. Its browser pane lists the pages that the desktop app shows for the session. Click a page to open it in a new tab of your own browser. Open on a dev server also opens the page in a new tab.

A page on localhost runs on the session’s host. To open it from another device, give the host a Hostname that the device can reach, such as its Tailscale name. Edit the host on the Hosts screen to set it. mocante then opens localhost:3000 as <hostname>:3000. Until the host has a hostname, the page shows in the list but does not open.

The agent reaches the browser through mocante’s MCP tools. Install them for your agent with Install agent MCP server… in the palette. See agent tools for the full list.

The tools act on the browser of the agent’s own session. A typical run looks like this:

  1. The agent opens a URL.
  2. It reads an outline of the page: headings, text, links, buttons and fields.
  3. It clicks, types into fields, and presses keys.
  4. It waits for the result, then reads the console or takes a screenshot to check it.

Each screenshot the agent takes also appears in the session’s shared files.

To check a layout on a phone or a tablet, the agent sets the device size, the same as Device size does. It picks a device by its name in the session’s list, or gives a width and a height. You see the page change size in the pane. Its screenshots then have the size of the device. Ask for it, for example “Check the sign-up page on a phone”.

Password values are hidden from the outline.

If you switch on Ask before an agent drives the browser in Settings › Agents, mocante asks you to approve when an agent drives the session’s browser. It is off by default. The request shows in a bar under the session header, and as a desktop notification when the session is not on screen. Allow it once, or for the rest of the session; see agent tools. You can also answer with Approve permission, Approve permission for this session or Deny permission in the palette.

Running JavaScript in the page is a separate approval, and shows the code the agent wants to run. An approval for the session holds until the session is removed or you revoke it.

When an agent uses the browser, the session’s browser pane opens, and the keyboard stays in the pane you are in. When the agent closes the browser, the pane hides again. To keep the pane closed, open Settings, go to Agents, and switch off Show the browser an agent drives. A page that is not on screen can fail to give a screenshot.

When an agent drives a browser you cannot see, a notice with a button to show it appears. After an agent drives the browser, the address bar carries an agent mark.

  • Notices and context menus can be hidden behind the page. The page hides while the command palette or a dialog is open.
  • The agent cannot use the browser while no desktop app is connected.
  • Dev servers to open a running server with one click.
  • Agent tools for every tool an agent can call.
  • Links for links that open outside mocante.