fix: update playwright prompt and workflows to use host.docker.internal#29825
Closed
fix: update playwright prompt and workflows to use host.docker.internal#29825
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b0a70e17-1c06-4a55-ab50-bb3376ea6ae7 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b0a70e17-1c06-4a55-ab50-bb3376ea6ae7 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
May 2, 2026 20:08
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the playwright prompt and all related workflow files to instruct agents to use
host.docker.internalinstead oflocalhost(or the previous dynamic bridge IP approach) when navigating to local web services with Playwright browser tools.Problem
The Playwright MCP server runs inside a Docker container. When agents start a local documentation server (e.g.
npm run dev) and then try to navigate to it with Playwright usinglocalhostor the agent container's bridge IP (e.g.172.30.0.20:4321), the connection times out because:localhostis the Docker host's localhost, not the agent container'sReference run: https://github.com/github/gh-aw/actions/runs/25259515081/job/74064550688
Solution
Use
host.docker.internalas the hostname for Playwright navigation URLs, which is Docker's standard mechanism for cross-container host access.Changes
actions/setup/md/playwright_prompt.md: Added actionable instruction text explaining that Playwright is containerized and agents should usehost.docker.internalinstead oflocalhostfor browser navigation.github/workflows/shared/docs-server-lifecycle.md: Replaced the bridge IP detection approach withhost.docker.internal, removed the bridge IP lookup bash snippet, simplified the "Playwright Browser Access" section.github/workflows/unbloat-docs.md: Updated playwright URL example.github/workflows/visual-regression-checker.md: Updated agent prompt URL.github/workflows/daily-multi-device-docs-tester.md: Replaced bridge IP lookup + variable substitution withhost.docker.internal.github/workflows/docs-noob-tester.md: Replaced bridge IP detection step and file-based URL approach withhost.docker.internalpkg/cli/workflows/test-copilot-playwright-screenshots.md: Updated playwright navigation URLpkg/cli/workflows/test-claude-playwright-screenshots.md: Updated playwright navigation URL