Skip to content

Revert "fix(server): honor OPENCODE_SERVER_USERNAME for serve and --server" - #59444

Merged
neriousy merged 2 commits into
devfrom
revert-59379-server-username
Oct 27, 2026
Merged

neriousy merged 2 commits into
devfrom
revert-59379-server-username

Conversation

@neriousy

@neriousy neriousy commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Reverts #59379


Added by the opencode bot (AI-generated).

Related: #45856, #36990

Public API: removes username from ServerOptions and stops honouring OPENCODE_SERVER_USERNAME in serve/--server (not backwards compatible for custom usernames)

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cleanly reverts #59379. The changed files match their state before that commit, and I checked from source that opencode serve once again accepts only the opencode username: with OPENCODE_SERVER_USERNAME=alice, alice:pw gets 401 and opencode:pw gets 200. The auth and server-connection tests pass. I couldn't run the type checks here because the typecheck script needs bun check.

Public API: removes the optional username from ServerOptions, and OPENCODE_SERVER_USERNAME is ignored again by serve and --server (the Basic auth username is fixed to opencode). This is not backwards compatible for anyone who started relying on a custom username after #59379: they need to switch back to opencode.

The bug from #45856 (configured Basic Auth username ignored, so the server returns 401) comes back with this revert. A line in the description on why it's being reverted, and whether a replacement fix is planned, would help.

Related: #45856, #36990

Sign up for free to 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