Description
We host our enterprise config behind Cloudflare Access, discovered via the wellknown
auth type (<origin>/.well-known/opencode → remote_config). When the stored token
expires, opencode gets stuck and can't recover on its own:
- Access answers the unauthenticated request with its HTML login page and HTTP 200.
opencode's remote-config fetch accepts the 200, then fails to JSON-decode the HTML and
dies, so startup aborts with failed to decode remote config ... Decode error (200)
and a raw stack trace.
opencode auth login <url> can't fix it either: it bootstraps the project first, which
loads that same remote config with the expired token and crashes before the login flow
runs. The only workaround is rm ~/.local/share/opencode/auth.json, then re-login.
Seen since ~1.14.40 (when enterprise config moved behind Access)
Plugins
No response
OpenCode version
1.16.2
Steps to reproduce
opencode auth login <enterprise-url> to set up wellknown auth.
- Let the token expire (or put an invalid token in
auth.json).
- Run
opencode → fatal Decode error (200) with a stack trace.
- Run
opencode auth login <enterprise-url> to recover → it also crashes; you have to
delete auth.json first.
Screenshot and/or share link
No response
Operating System
macOS
Terminal
Ghostty
Description
We host our enterprise config behind Cloudflare Access, discovered via the
wellknownauth type (
<origin>/.well-known/opencode→remote_config). When the stored tokenexpires, opencode gets stuck and can't recover on its own:
opencode's remote-config fetch accepts the 200, then fails to JSON-decode the HTML and
dies, so startup aborts with
failed to decode remote config ... Decode error (200)and a raw stack trace.
opencode auth login <url>can't fix it either: it bootstraps the project first, whichloads that same remote config with the expired token and crashes before the login flow
runs. The only workaround is
rm ~/.local/share/opencode/auth.json, then re-login.Seen since ~1.14.40 (when enterprise config moved behind Access)
Plugins
No response
OpenCode version
1.16.2
Steps to reproduce
opencode auth login <enterprise-url>to set upwellknownauth.auth.json).opencode→ fatalDecode error (200)with a stack trace.opencode auth login <enterprise-url>to recover → it also crashes; you have todelete
auth.jsonfirst.Screenshot and/or share link
No response
Operating System
macOS
Terminal
Ghostty