Skip to main content
← Back to list
01Issue
BugShippedSwamp CLI
Assigneesstack72

Relationships

#1486 swamp auth server-login ignores SWAMP_SERVE_URL

Opened by keeb · 7/31/2026· Shipped 7/31/2026

swamp auth server-login is the only remote-capable command that ignores the SWAMP_SERVE_URL environment variable. With the variable exported, the command still fails with error: Missing required option "--server", forcing the user to re-type the server URL they have already configured for the session.

Steps to reproduce

export SWAMP_SERVE_URL=wss://[HOST-1]
swamp auth server-login

Actual:

Usage:   swamp auth server-login --server <url>
...
  error: Missing required option "--server".

Expected: the login flow starts against wss://[HOST-1], the same way swamp workflow run and swamp model method run pick the server up from the environment.

Cause

src/cli/commands/auth_server_login.ts declares --server <url:string> with { required: true } and reads options.server directly in both handleStaticToken() and handleOAuthFlow(). It never calls resolveServeUrl() from src/cli/remote_run.ts, which is what every other remote-capable command uses to fall back to SWAMP_SERVE_URL (model method run, workflow run, access check/grant/group/can-i/reload, worker verify).

Suggested fix

Drop required: true, resolve the URL through resolveServeUrl(options.server), and raise a UserError such as --server is required (or set SWAMP_SERVE_URL) when neither is present — the wording src/cli/commands/access_can_i.ts:74 already uses. Mention the env var in the option description for consistency with the other commands.

Environment

  • swamp 20260206.200442.0-sha
  • Linux
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 4 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

7/31/2026, 4:23:26 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/31/2026, 2:53:19 PM

Sign in to post a ripple.