rtk-ai/rtk

npm run dev Swallows Port Output, Preventing AI Coding Agents from Detecting Dev Server Startup

Open

#2,010 opened on May 21, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Rust (2,914 forks)batch import
area:clibughelp wantedpriority:high

Repository metrics

Stars
 (48,085 stars)
PR merge metrics
 (Avg merge 11d 1h) (45 merged PRs in 30d)

Description

npm run dev Swallows Port Output, Preventing AI Coding Agents from Detecting Dev Server Startup

Problem

When running npm run dev through RTK, the dev server's port number output is completely suppressed. The terminal shows no startup information such as Local: http://localhost:3000.

This prevents AI coding assistants (Claude Code, Cursor, GitHub Copilot Agent, etc.) that rely on stdout/stderr to determine project running status from detecting:

  • Whether the dev server has started successfully
  • Which port the server is listening on

Consequences

  • Port conflicts — the AI agent may attempt to start another dev server, occupying a different port or failing entirely
  • Unable to construct preview URLs — the agent cannot open or reference the running application
  • Incorrect suggestions — the agent assumes the project is not running and provides misleading guidance

Steps to Reproduce

  1. Run npm run dev in the project root
  2. Observe terminal output — no port information is printed
  3. Compare with running the underlying tool directly (e.g. npx vite / npx next dev) — port info is printed normally

Expected Behavior

After npm run dev starts, stdout should contain parseable port information, for example:

  ➜ Local:   http://localhost:5173/
  ➜ Network: http://192.168.1.100:5173/

At minimum, a single line containing localhost:<port> or 127.0.0.1:<port> should be emitted so that downstream tools and AI agents can extract the port via pattern matching.

Environment

  • RTK version: 0.37.0
  • Node: v18.20.4
  • OS: macOS
  • Package manager: npm

References

  • Vite: prints Local: http://localhost:xxxx/ to stdout on startup
  • Next.js: prints - Local: http://localhost:xxxx to stdout on startup
  • AI agents depend on stdout port information to determine dev server readiness and avoid duplicate launches

Contributor guide