Skip to content

feat(cli): clearer remote errors and a live status line - #117

Merged
harlan-zw merged 2 commits into
mainfrom
fix/remote-error-ux
Aug 21, 2026
Merged

feat(cli): clearer remote errors and a live status line#117
harlan-zw merged 2 commits into
mainfrom
fix/remote-error-ux

Conversation

@harlan-zw

@harlan-zwharlan-zw commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Agent-authored (opencode).

Description

Every network failure printed the same string:

HTTP_TRANSPORT: the remote request could not be completed

Wifi off, DNS dead, TLS rejected, timed out: identical output, no next step. Same story server side. A 5xx got you the remote service returned HTTP 500 and a spent 429 said nothing about how long to wait.

Transport errors now name the cause and the recovery:

HTTP_TRANSPORT: the skilld.dev address could not be resolved. Check the network connection, then retry the command.
HTTP_TRANSPORT: the request to skilld.dev timed out. Retry the command. A slow network can cause this.

A 5xx says to retry in a minute. A final 429 states the wait, read from Retry-After whether the server sent a problem body or only the header.

The network commands also sat silent while they worked. On a human terminal they now show Searching… 3s on stderr, erased before any real output lands. Agents, CI, pipes, and --json see nothing.

Wiring that up surfaced an old deadlock: main held a StderrLock for its whole body, so the status thread writing through the Stderr handle blocked forever. It passes the unguarded handle now.

Legacy Windows conhost is untested; the erase sequence assumes Windows Terminal or newer.

Transport failures now say whether DNS, the connection, TLS, or a timeout
failed, name the host, and state the recovery step. Server 5xx fallbacks
say to retry in a minute. Final rate limits state the Retry-After wait.
Network commands show a TTY-only status line on stderr with elapsed time.
It starts after output-mode detection, erases before any command output,
and stays silent for Agents, CI, pipes, and --json.
@harlan-zw

Copy link
Copy Markdown
CollaboratorAuthor

Checked by hand, since CI cannot cover it:

  • pty run: status line renders, erases before output, exit 0, 3/3 runs
  • piped run and --json run: zero status bytes on stderr
  • no-network pty run: status line, erase, then the classified DNS error

@harlan-zw
harlan-zw merged commit d767481 into mainAug 21, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@harlan-zw