Skip to content

Expired well-known token aborts TUI startup with generic error #49011

Description

@sroemeschke-cloudflare

Description

An expired well-known token aborts TUI startup. The logs identify ConfigRemoteAuthError, but the TUI only shows:

Error: Unexpected server error. Check server logs for details.

The process then exits with status 0. The same failure occurs with --pure.

Expected: show an actionable expired-auth message with the login command. If startup must abort, exit nonzero.

Related: #31649 and #31661 added ConfigRemoteAuthError formatting and allowed URL login to bypass instance bootstrap. The TUI startup path still appears to collapse that error into a generic server failure.

Plugins

None; reproduced with --pure

OpenCode version

1.18.30

Steps to reproduce

  1. Configure well-known authentication whose protected remote_config returns an HTML login page when its token expires. Reproduced with Cloudflare Access.
  2. Let the token expire.
  3. Run opencode --pure --print-logs --log-level DEBUG.
  4. Observe ConfigRemoteAuthError, the generic TUI error, and exit status 0.

Workaround: opencode providers login <origin>

Screenshot and/or share link

Redacted log excerpt:

timestamp=2026-09-14T16:13:37.035Z level=DEBUG run=<REDACTED> message="fetching remote config" url=https://****.***/.well-known/opencode
timestamp=2026-09-14T16:13:37.493Z level=ERROR run=<REDACTED> ref=<REDACTED> error="ConfigRemoteAuthError: ConfigRemoteAuthError"
Error: Unexpected server error. Check server logs for details.
timestamp=2026-09-14T16:13:37.526Z level=INFO run=<REDACTED> message="disposing all instances"

Captured with opencode --pure --print-logs --log-level DEBUG. Tokens, headers, keys, hostnames, and local paths omitted.

Operating System

macOS 26.4.1, arm64

Terminal

iTerm2 3.7.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions