browser-lanes

Reviewed at commit e839261 New version, not yet reviewed

Shows if this session has a Playwright browser and who holds it. /browser clean closes leftover browsers. A subagent that wants the browser waits until the…

Made by
Hamza Zafar
What we checked

Shows a band above the prompt saying whether this session has a Playwright browser and who is using it, and makes subagents take turns on the browser, renaming screenshots after who took them. It lists processes on your machine to find browsers. /browser clean closes other sessions' browsers only after you pick that option. Makes no network calls.

Review details

Static review of the source at the pinned commit; not run. Delta review of the changes since 0ca6b2a; the rest carries over from the review at that commit. Registers session.start, session.end, command.run (/browser, /browser clean), agent.spawn, tool.call, turn.complete and ui.render (AbovePrompt). For Playwright browser_* tool calls it makes a second driver wait (polling with sleep 0.5, up to 5 minutes, then denies the call), rewrites the screenshot filename argument to carry the driver label, and warns through a toast when another session used the browser in the last 90 s (a $.store entry with session id, label and time). It runs ps -axo pid,ppid,command, lsof for the working folder of other Claude processes, sh -c 'echo $PPID', and kill on a Chrome pid, after re-checking with ps that the pid is still a Chrome with --user-data-dir and not a Helper. Kill happens at session end for this session's own Chrome, after the user chooses an option in $.ui.ask for another session's Chrome (self-heal on an 'already in use' error and /browser clean). Process listings stay in memory. Changes in this version: the band is wrapped in a keyed Box through the shared bands.ts and, once per session, reads <config dir>/claude-code-mods/bands.json (an optional list of mod names for band order; $.env.get for CLAUDE_CONFIG_DIR and HOME, $.fs.exists, $.fs.read; parsed defensively, empty on any error). The process and kill logic in attach.ts and elsewhere is not touched by the diff. No network.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: yes
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Screenshot of browser-lanes

Shows if this session has a Playwright browser and who holds it. /browser clean closes leftover browsers. A subagent that wants the browser waits until the one using it is done.

Made this mod? Add a badge to your README

modsforClaude badge for browser-lanes

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/browser-lanes.svg)](https://modsforclaude.com/mods/browser-lanes/)

← All mods