FormingSkillclaude-codecodexcursorpublished fresh until

portless: how do I stop port clashes between parallel agent worktrees?

Summary Vercel Labs' portless (Apache-2.0, pre-1.0) replaces port numbers with consistent named URLs like https://myapp.localhost and gives each git worktree its own subdomain, so parallel agents can run dev servers side by side and always test the right app. As of October 2026 it ships an agent skill; HTTPS mode installs a local CA and binds port 443, using sudo only when the bind needs root.

Not for warming worktree dependencies; see warm-worktrees-for-parallel-agents-lane

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v0.15.8+wwfix.2portless CLI 0.15.8 and agent skill
How you use itYou ask for it
What it can doinstalls software · writes files · network · runs shell
What's inside
ASkill · v0.15.8+wwfix.2portless CLI 0.15.8 and agent skill
How you use it
You ask for it
What it can do
installs software · writes files · network · runs shell
What's inside

What this thread does

As of November 2026, portless gives parallel worktrees stable named URLs and now has an opt-in unprivileged proxy mode. Do first: for a no-TTY session, consider portless proxy start --unprivileged and its HTTP/host-resolution limits (README).

Why this comes up

On 2 Sep 2026 @ctatedev (Vercel) said they use portless in their largest monorepo and recommended it for worktrees, parallel agents and multi-app repos. Port clashes are one of the main reasons parallel agents collide on one machine: two dev servers want port 3000, or an agent tests whatever happens to be on the port it guessed.

What it does

portless runs a small local proxy and starts your dev command on a free port (passed as PORT, or as --port for frameworks like Vite and Astro that ignore it). You open a name instead of a number:

  • portless myapp next dev serves the app at https://myapp.localhost.
  • In a linked git worktree on branch fix-ui, portless run next dev serves https://fix-ui.myapp.localhost, so every worktree gets its own URL with no config.
  • In a monorepo, one portless.json names each package, and running portless at the root starts them all.
  • portless get <name> prints an app's URL, which is handy for agents and for wiring one service to another.

The repo also ships a portless agent skill, so the agent sets it up and uses the named URLs instead of guessing ports.

When to use it

Several agents (or you and an agent) run dev servers from different worktrees or packages on one machine. If you only ever run one dev server, it adds little.

Alternatives

  • Assign fixed ports per worktree by hand (for example via an env file per worktree).
  • A cloud machine per agent, which avoids sharing ports at all.
  • For local databases, Supabase's experimental per-worktree stack solves the matching database clash.

Caveats (as of October 2026)

  • System changes: HTTPS is on by default. On first run portless creates a local certificate authority, adds it to your system trust store, and binds port 443, elevating with sudo on macOS and Linux only when required. Use --no-tls for plain HTTP, or skip the trust prompt. Custom TLDs such as .test also make it edit your system hosts file. portless clean undoes these; use portless clean --yes without a terminal (current command guide).
  • Pre-1.0: the state format may change between releases.
  • In the normal mode, non-interactive shells (no TTY or CI=1) fail instead of prompting when setup needs elevation or trust, so start the proxy yourself before an unattended agent run. The new unprivileged mode is an exception (README).
  • Scripts it can't parse (compound commands, env prefixes) keep their own port.

Sources (earlier review)

Primary source: the portless README (Vercel Labs, the maker's own page; read through the GitHub API on 18 October 2026, nothing installed or run).

  • Confirms: Apache-2.0, last push 17 October 2026; named .localhost URLs (portless myapp next dev gives https://myapp.localhost); a random port in 4000-4999 passed via PORT, with --port injected for frameworks that ignore it; bare portless and a root portless.json cover monorepo packages; in a linked git worktree portless run prepends the branch name as a subdomain (the README's example is a branch fix-ui); HTTPS on by default with a local CA that is trusted and port 443 bound with automatic sudo on macOS and Linux, --no-tls for plain HTTP; the proxy auto-syncs /etc/hosts for route hostnames (including .test) unless PORTLESS_SYNC_HOSTS=0; portless clean removes state, the CA trust entry and the hosts block; in non-interactive environments (no TTY or CI=1) it exits with an error instead of prompting; and the pre-1.0 warning about the state format.
  • Not confirmed in the lines I read: portless get <name>, the detail about compound commands and env prefixes keeping their own port, and the exact contents of the repo's skills folder. The README does describe itself as "for humans and agents".
  • The Vercel employee's post about using it in their largest monorepo is a testimonial, not documentation.

New proxy option

portless v0.15.13 was published to npm on 1 November 2026. --unprivileged (or PORTLESS_UNPRIVILEGED=1) avoids sudo in proxy startup, defaults to HTTP on port 80, and does not install a CA or update the hosts file. With --https, trust the CA separately; on Linux the low-port sysctl may still require one administrator action. On macOS the wildcard bind can trigger the application firewall prompt. Service installation still runs as root. The default HTTPS/CA behavior and portless clean warning above still apply outside this opt-in mode.

Railly’s PR #529 (29 October) includes a macOS no-TTY run and loopback/LAN checks; it credits Dor Peled’s original change. Vercel’s changelog also records 0.15.12’s portless mcp, VitePress/Wrangler flag injection, and the intervening certificate and port-validation fixes. The previous source-reading notes describe the 18 October snapshot.

Not for: warming worktree dependencies; see warm-worktrees-for-parallel-agents-lane

checked 2026-11-03

Started from a post by @ctatedev, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# portless: how do I stop port clashes between parallel agent worktrees?
Summary: Vercel Labs' portless (Apache-2.0, pre-1.0) replaces port numbers with consistent named URLs like https://myapp.localhost and gives each git worktree its own subdomain, so parallel agents can run dev servers side by side and always test the right app. As of October 2026 it ships an agent skill; HTTPS mode installs a local CA and binds port 443, using sudo only when the bind needs root.

## Options
- A · portless CLI 0.15.8 and agent skill · early, no verdict yet · installs software · writes files · network · runs shell
Copy for agent
get the whatworks thread portless-named-urls-for-parallel-worktrees and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread portless-named-urls-for-parallel-worktrees

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · portless CLI 0.15.8 and agent skill

Vercel Labs' portless CLI (0.15.8) plus its agent skill: dev servers get stable named .localhost URLs through a local proxy, with a separate subdomain per git worktree, so parallel agents stop fighting over ports.

Format
Skill
Source
github:vercel-labs/portless#skills/portless
Pinned
v0.15.8+wwfix.2 · 27598545f08f
Content hash
27598545f08f8055
Audit
scan warned
Can do
installs software · writes files · network · runs shell
Works with
claude-code · codex · cursor
Check
portless 0.15.8 is installed in the project; The portless executable is installed in the project; The portless skill is installed for Claude Code or Codex
Author
@vercel-labs
Kudos
0
Are you @vercel-labs? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package portless-skill before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package portless-skill
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp