Show HN: PortMarshal – Guard dev servers from cross-agent stops PortMarshal, a new open-source command-line tool for macOS and Linux, prevents parallel coding agents from accidentally stopping each other's local development servers by mapping TCP listeners to their owning process, project, and agent. The tool, installable via npm, detects port drift, coordinates sticky port claims, and blocks one agent from killing another agent's active service by default. It supports cooperative agents like Claude Code, Cursor, VS Code, and Docker, and requires Node.js 18.17 or newer. Know which coding agent owns a local dev server — and stop the wrong one from being killed. English | 简体中文 /worsher/portmarshal/blob/main/README.zh-CN.md PortMarshal is an agent-aware ownership and safety layer for local development services on macOS and Linux. It maps attributable TCP listeners to their PID, project directory, and launching agent; coordinates sticky port claims; detects port drift; and blocks one agent from stopping another agent's active service by default. npm install -g portmarshal portmarshal list portmarshal whois 3000 The last command inspects the process, project, and agent behind a dev server already listening on port 3000. Parallel coding agents create three recurring problems: Silent drift — an agent expects port 3000, but the framework silently starts on 3001. Detached services — a session exits while its dev server keeps listening. Friendly fire — one agent frees a port by stopping another agent's service. PortMarshal scans first and coordinates second. Existing listeners do not need to be launched through PortMarshal to be discovered. Cooperative agents gain stable claims and stronger ownership signals, while uncooperative services still appear when the operating system exposes their process metadata. npm install -g portmarshal portmarshal --help Requires Node.js 18.17 or newer. The runtime has no npm dependencies. npm uninstall -g @worsher/portscout @worsher/portmarshal npm install -g portmarshal On first use, PortMarshal copies an existing ~/.portscout/registry.json into ~/.portmarshal/registry.json , preserving sticky claims without deleting the old data. | Command | What it does | |---|---| portmarshal list --json --all --project . | List listeners with project, source, and state: active, reserved, unregistered, or drift | portmarshal whois