The agent's browser
The agent tests web pages in a browser of its own, apart from the browser and the profile in daily use.
The agent opens pages, clicks, fills forms and takes screenshots in a browser that kcode starts for the session. It never drives the Mac’s everyday browser.
What it needs
A Chrome-family browser must be installed: Chrome, Chromium, Edge, Brave or Arc. kcode starts it without a window on the agent’s first browser call. Each session has one browser, and it ends with the session.
A clean profile
The browser runs on a new, throwaway profile. Its cookies and storage are deleted when the session ends. The profile is not the everyday browser’s, so it starts with no sign-ins.
browser_host.profile in ~/.kcode/config.toml names a saved profile instead. kcode keeps it in its own data folder, and its sign-ins last from one session to the next. The setting takes effect when kcode restarts.
Watching and helping
/browser opens a tile that shows the page live. A click in the tile is a click on the page, so a link or a button can be pressed by hand while the agent works in the same browser. Closing the tile leaves the browser running.
The agent’s page loads, clicks and form fills run without a prompt, so a site signed in to in this browser is a site the agent can act on.
A dev server in a worktree
Each worktree has its own port and address, so the agent tests one branch’s pages while another branch’s server keeps running.