Skip to content

docs(mcp): document ephemeral tab IDs and screenshot-after-open-browser#329

Merged
danshapiro merged 1 commit into
mainfrom
docs/mcp-browser-ephemeral-tips
May 7, 2026
Merged

docs(mcp): document ephemeral tab IDs and screenshot-after-open-browser#329
danshapiro merged 1 commit into
mainfrom
docs/mcp-browser-ephemeral-tips

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

Summary

Agents using the Freshell MCP tool were hitting two avoidable pitfalls:

  1. Stale tab/pane IDs — IDs from open-browser, new-tab, and split-pane become invalid after server restarts or session reconnects. Agents were reusing old IDs, causing "tab not found" errors.

  2. Silent browser failures — After open-browser, agents assumed the page loaded successfully. Network errors, CORS issues, and blank pages went undetected because no screenshot was taken to confirm.

Changes

Three places in server/mcp/freshell-tool.ts (all documentation/template strings, no code logic):

  • Key gotchas: added two new bullets — tab IDs are ephemeral, always screenshot after open-browser
  • open-browser playbook: added a screenshot call after open-browser showing the exact command
  • Screenshot guidance: added confirmation-first guidance and stale-ID recovery note

Test plan

  • String-only change; no logic affected
  • Lint passes (pre-existing zod locale warnings unrelated)

Agents were reusing stale tab/pane IDs across session boundaries,
causing 'tab not found' errors. Also, agents were not confirming
that browser pages loaded successfully after open-browser, leading
to silent failures (blank pages, CORS errors, network issues).

Add two key gotchas to INSTRUCTIONS:
- Tab and pane IDs are ephemeral — don't reuse across reconnects
- Always screenshot after open-browser to confirm page load

Update the open-browser playbook to include a screenshot step,
and add confirmation guidance to the screenshot section.
@danshapiro danshapiro merged commit 851eef0 into main May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant