Launch a single browser with puppeteer.launch() and then call browser.createBrowserContext() for each isolated session rather than launching separate browser processes
Open pages within each context using context.newPage(); pages within a context share cookies and storage with each other but are fully isolated from other contexts
When the session is done, call context.close() to destroy the context and all its pages; this also clears all cookies and storage for that context
The default context (browser.defaultBrowserContext()) cannot be closed; only explicitly created contexts can be disposed
For parallel test execution, create one context per test worker and close it in the test teardown step
Known gotchas
browser.createBrowserContext() is Puppeteer's equivalent of an incognito window: cookies, localStorage, and service workers do not bleed across contexts
Extensions loaded at browser launch run in the default context and are not automatically available in new contexts — extension-dependent automation must use the default context or reload the extension
Closing the parent browser also closes all contexts and pages; always check that you are not accidentally closing the browser while a context is still in use
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp