GeezerVison is showing github.com — docs: stop promising OPENCODE_SERVER_USERNAME — the v2 username is always opencode by dezren39 · Pull Request #313 · developing-today-forks/opencode
Conversation
dezren39
commented
Oct 23, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes #103
Problem
The docs promise that the basic-auth username for serve/web can be overridden with OPENCODE_SERVER_USERNAME, but nothing in this v2 codebase reads that variable: the username is hardcoded to opencode in the server auth config (packages/server/src/auth.ts), the server process (packages/server/src/process.ts), the --server client auth (packages/cli/src/services/server-connection.ts) and the standalone service (packages/cli/src/services/standalone.ts). The v2 command spec in packages/cli/src/commands/commands.ts defines no --username flag either. A CLI test even set the variable, making the dead setting look supported.
As the issue's own evidence notes, the fixed username is the deliberate v2 behaviour — developing-today/openchamber's vscode integration already documents that "OpenCode 2 accepts only the opencode username; OPENCODE_SERVER_USERNAME is ignored."
Solution (direction 2 from the issue: align docs and test with v2)
packages/web/src/content/docs/server.mdx — the Authentication section now states the username is always opencode and cannot be changed.
packages/web/src/content/docs/web.mdx — same correction.
packages/web/src/content/docs/cli.mdx — removed the OPENCODE_SERVER_USERNAME row from the environment-variable table and both --username flag rows (attach and run tables); the three affected tables were re-padded by prettier, which is the only other change in that file. Translations are left to the usual docs locale-sync flow, matching how earlier docs fixes in this repo handled them.
packages/cli/test/standalone.test.ts — dropped the unused OPENCODE_SERVER_USERNAME: "custom" env entry; the test asserted only HTTP 200, which the variable never influenced.
After this change, a grep for OPENCODE_SERVER_USERNAME in the English docs and packages/cli finds nothing — the variable is no longer promised anywhere it is not honoured.
Verification
git grep OPENCODE_SERVER_USERNAME over the English docs and packages/cli: no matches (remaining hits are translations only).
bun test test/standalone.test.ts in packages/cli: 1 pass — the test passes unchanged without the dead variable.
prettier --check on all four changed files: clean.
bun typecheck in packages/cli: (see PR checks; run locally before merge where the sandbox allows).
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-10-23T05:48:15.150757Z |
137dd9d |
PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 28 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
⚙️ Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
a5f34dde-1374-42f9-b298-fc00bfdb5689
📥 Commits
-
Reviewing files that changed from the base of the PR and between c1d3d9a and 137dd9d.
📒 Files selected for processing: 4
-
packages/cli/test/standalone.test.ts
packages/web/src/content/docs/cli.mdx
packages/web/src/content/docs/server.mdx
packages/web/src/content/docs/web.mdx
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
-
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 137dd9d775
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
### Authentication
|
|
|
|
|
|
Set `OPENCODE_SERVER_PASSWORD` to protect the server with HTTP basic auth. The username defaults to `opencode`, or set `OPENCODE_SERVER_USERNAME` to override it. This applies to both `opencode serve` and `opencode web`.
|
|
|
Set `OPENCODE_SERVER_PASSWORD` to protect the server with HTTP basic auth. The username is always `opencode`; it cannot be changed. This applies to both `opencode serve` and `opencode web`.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update localized pages with the authentication correction
Users routed to any of the 17 localized versions still see OPENCODE_SERVER_USERNAME and --username documented as supported in the corresponding cli.mdx, server.mdx, and web.mdx files (for example, French server.mdx:39). The deferred locale-sync will not correct them because .github/workflows/docs-locale-sync.yml:22 disables the job, so this fix leaves non-English users following credentials that the server rejects; update the localized counterparts as part of this change.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Merging per the standing sweep directive, with the infrastructure caveat recorded here:
- GitHub Actions has produced zero workflow runs repo-wide since 2026-10-23T00:13Z (verified fresh via the Actions API: newest run is close-prs at 00:13:24Z, and no runs exist for this PR's head SHA). This is the same stall noted on PR fix(cli): honor OPENCODE_DISABLE_EMBEDDED_WEB_UI in the web UI handler #312. The only reported check is CodeRabbit (pass); the PR is CLEAN/MERGEABLE.
- Local verification in the sweep sandbox: the diff is docs prose + table-row removals (prettier re-padding of the three affected tables is the only other change in cli.mdx) plus dropping the dead env entry from the standalone test;
bun test test/standalone.test.ts passes (1 pass); prettier --check is clean on all four files; a grep for OPENCODE_SERVER_USERNAME over the English docs and packages/cli finds nothing. A full local bun typecheck for packages/cli did not complete in the sandbox (tsgo exceeded the run's time budget with no errors reported before termination); the only TypeScript change removes an argument for a parameter that has a default, and the test file exercising it passes.
- If Actions recovers and flags anything on main from this change, it will be fixed in a follow-up.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 23, 2026
This was referenced Nov 24, 2026
Reviewers
1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|