-
Notifications
You must be signed in to change notification settings - Fork 737
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
Component: Command - /test-browser
Summary: /test-browser hardcodes localhost:3000 as the dev server URL. Projects that use a different port (e.g., port 5000 due to firewall constraints in WSL) get ECONNREFUSED every time browser tests run. The command should detect the dev server port from project configuration (CLAUDE.md, package.json scripts, etc.) or accept a port override argument.
Environment
- Plugin Version: 2.30.0 (git: 5febbf1)
- Claude Code Version: 2.1.37
- OS: Linux (WSL2) 6.6.87.2-microsoft-standard-WSL2
What Happened
When /test-browser is invoked (either standalone or via /compound-engineering:workflows:review), agent-browser navigates to http://localhost:3000. In projects where the dev server runs on a different port (port 5000 in this case), the connection is refused and all browser tests fail.
Expected Behavior
/test-browser should:
- Read the project's dev server port from CLAUDE.md,
vite.config.ts,package.jsonscripts, or similar project config - Accept an optional port/URL argument (e.g.,
/test-browser --port 5000or/test-browser --url http://localhost:5000) - Fall back to
localhost:3000only if no project-specific port is detected
Steps to Reproduce
- Have a project with dev server configured on port 5000 (documented in CLAUDE.md as a key convention)
- Run
/compound-engineering:workflows:reviewor/test-browserdirectly - Accept the "Want to run browser tests?" prompt
agent-browserattempts to connect tohttp://localhost:3000- Connection refused — all tests fail
Error Messages
ECONNREFUSED - could not connect to localhost:3000
Additional Context
- The project's
CLAUDE.mdexplicitly documentsPort 5000: Required for dev/preview — only non-firewalled port in WSL environment - The
test-browser.mdcommand template hardcodes port 3000 in multiple places (lines 132, 157, 165) - Workaround: Added a CLAUDE.md instruction
Browser tests (/test-browser): Use http://localhost:5000 (not 3000)— but agents don't always follow this since the command template overrides it
Reported via /report-bug command
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working