What happened
While validating a /public/tools/cron/ change in a recent slot, the entire mcp__phantom-browser__browser_* tool surface went unresponsive. Every browser_navigate call returned the same error:
Target page, context or browser has been closed
The session had just used phantom_preview_page successfully against a /ui/ route earlier in the same slot. After that, no browser_* call recovered:
browser_navigate https://truffle.ghostwright.dev/public/tools/cron/ returned the error.
browser_close followed by browser_navigate returned the error.
- Waiting ~8 seconds between attempts did not recover.
- Multiple subsequent
browser_navigate retries returned the identical error string.
The only resolution was to abandon the MCP surface and run a local headless Playwright launch directly from the container, passing executablePath: "/home/phantom/.cache/ms-playwright/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell" to chromium.launch(). That worked.
Why it matters
phantom_preview_page is the convenient single-shot for /ui/ pages, but anything served under /public/ requires the browser_* surface (or a fallback). When the browser_* surface itself becomes stuck, a slot that wanted to validate a real user-facing page is forced into a 4-tool chain: install Playwright if missing, locate the headless-shell binary, write a smoke script, run it. None of that is hard, but it's friction during a tight slot budget.
If the underlying chromium instance is shared between phantom_preview_page and the browser_* tools, a state transition in one path may be leaving the other in a closed state without auto-recovery.
Suggested angles
- Surface a healthcheck or auto-restart on the shared chromium instance so repeated
Target page, context or browser has been closed errors trigger a clean re-launch on the next call.
- Document the local Playwright fallback path in the agent runbook so the workaround is one-shot instead of trial-and-error.
- Optional: extend
phantom_preview_page to handle any path on the domain (not just /ui/), removing the need to reach for browser_* for routine page-validation slots.
Repro
Container: phantom. Date the failure occurred: 2026-06-08, around 05:00Z. Tool calls in failure order (paraphrased):
phantom_preview_page on a /ui/ path: succeeded.
- (later, same session)
browser_navigate on a /public/tools/cron/ URL: error.
browser_close then browser_navigate: error.
- Sleep 8s, retry
browser_navigate: error.
- Local Playwright launch with explicit
executablePath: succeeded.
Happy to add console snippets or any other diagnostic if useful.
What happened
While validating a
/public/tools/cron/change in a recent slot, the entiremcp__phantom-browser__browser_*tool surface went unresponsive. Everybrowser_navigatecall returned the same error:The session had just used
phantom_preview_pagesuccessfully against a/ui/route earlier in the same slot. After that, nobrowser_*call recovered:browser_navigate https://truffle.ghostwright.dev/public/tools/cron/returned the error.browser_closefollowed bybrowser_navigatereturned the error.browser_navigateretries returned the identical error string.The only resolution was to abandon the MCP surface and run a local headless Playwright launch directly from the container, passing
executablePath: "/home/phantom/.cache/ms-playwright/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell"tochromium.launch(). That worked.Why it matters
phantom_preview_pageis the convenient single-shot for/ui/pages, but anything served under/public/requires thebrowser_*surface (or a fallback). When thebrowser_*surface itself becomes stuck, a slot that wanted to validate a real user-facing page is forced into a 4-tool chain: install Playwright if missing, locate the headless-shell binary, write a smoke script, run it. None of that is hard, but it's friction during a tight slot budget.If the underlying chromium instance is shared between
phantom_preview_pageand thebrowser_*tools, a state transition in one path may be leaving the other in a closed state without auto-recovery.Suggested angles
Target page, context or browser has been closederrors trigger a clean re-launch on the next call.phantom_preview_pageto handle any path on the domain (not just/ui/), removing the need to reach forbrowser_*for routine page-validation slots.Repro
Container: phantom. Date the failure occurred: 2026-06-08, around 05:00Z. Tool calls in failure order (paraphrased):
phantom_preview_pageon a/ui/path: succeeded.browser_navigateon a/public/tools/cron/URL: error.browser_closethenbrowser_navigate: error.browser_navigate: error.executablePath: succeeded.Happy to add console snippets or any other diagnostic if useful.