f7: deeper phone-home / branding sweep#63
Merged
Conversation
Catches user-visible OpenCode brand strings, OpenCode-product upsells,
and one real phone-home leak that the medium pass deferred.
Per the zone matrix:
- OpenCode -> BrowserCode in user-visible strings only. Internal
identifiers (env vars, Effect service IDs, x-opencode-* headers,
third-party provider User-Agents, OpenCodeHttpApi Effect class,
`opencode` as wire-protocol service name in HttpApi.make) untouched.
- opencode -> bcode in CLI invocations shown to users (tips, toasts,
ACP terminal-auth, MCP auth toast, MCP Client.name).
What changed:
* System prompts: codex / kimi / gpt / beast / copilot-gpt-5 / gemini /
trinity now identify as BrowserCode (was "You are OpenCode"). Same
wording previously applied to anthropic.txt / default.txt: name
BrowserCode first, acknowledge OpenCode lineage, point at the
BrowserCode repo for fork-specific features. anthropic.txt's
objectivity section also reflows from OpenCode -> BrowserCode.
* OpenAPI route descriptions (config, experimental, global, instance,
project, pty, session): 20 sites of "the OpenCode X" -> "the
BrowserCode X". Visible at `GET /doc` and in SDK type descriptions.
* TUI sidebar/footer wordmark: "Open|Code" two-tone branding watermark
-> "Browser|Code". The "Getting started" panel rewritten away from
"OpenCode includes free models".
* TUI tips-view: 14 random-tip strings updated. Renamed `opencode` CLI
invocations to `bcode`, replaced upstream config-path examples
(`~/.config/opencode/tui.json`, `opencode.json`) with bcode-flavored
paths. Removed: tips advertising `docker run ghcr.io/anomalyco/opencode`,
`/opencode` GitHub commands, and the "/connect with OpenCode Zen"
recommendation (we don't earn upsells from OpenCode and shouldn't
steer users to them by default).
* TUI permission dialogs (both TUI and non-TUI `bcode run` paths):
"until OpenCode is restarted" -> "until BrowserCode is restarted";
"Tell OpenCode what to do differently" -> "BrowserCode".
* OAuth callback HTML pages (mcp/oauth-callback.ts + plugin/codex.ts):
titles + body text say BrowserCode. Visible in the user's browser
after an MCP-server or Codex provider auth flow.
* MCP wire identity: Client({ name: "opencode" }) -> "bcode" (3 sites
in mcp/index.ts) so MCP servers see us as bcode in client-handshake
logs; client_name: "OpenCode" -> "BrowserCode" in oauth-provider.ts
(visible on third-party OAuth consent screens); toast "Run: opencode
mcp auth ..." -> `bcode mcp auth`; the `cmd === "opencode"` BUN_BE_BUN
check now matches both "bcode" and "opencode" so user MCP configs
invoking either binary work.
* ACP agent identity (acp/agent.ts): agentInfo.name and terminal-auth
command/label updated. ACP clients like Zed display the BrowserCode
name and invoke `bcode auth login` for terminal auth.
* TUI app.tsx "Successfully updated to OpenCode v..." -> "BrowserCode
v...". Visible after `bcode upgrade`.
* `bcode models` provider sort: removed the `a.startsWith("opencode")`
boost that put OpenCode's providers first. Now plain alphabetical.
* `bcode providers login` (= `bcode auth login`): dropped the
`opencode: 0` priority bias and the `opencode: "recommended"` hint
in the provider picker. "Configure it in opencode.json" prose in two
amazon-bedrock / generic-credential prompt blocks -> "bcode.json".
Positional-arg description "opencode auth provider" -> "well-known
auth provider URL".
* Phone-home removed: server/shared/ui.ts previously fell back to
proxying every web UI request to https://app.opencode.ai when the
embedded UI bundle was missing (dev or OPENCODE_DISABLE_EMBEDDED_WEB_UI).
BrowserCode now 404s in that case. Removed: UI_UPSTREAM, upstreamURL,
requestBody, proxyResponseHeaders, and the HTTP proxy code path.
`services.client` is kept in the function signature so the router
call-site doesn't need to change on every sync.
* repo_clone tool description + /init command template now say
BrowserCode; agent.ts reference-scout prompt's "OpenCode materializes
this configured repository" -> "BrowserCode".
* session/retry.ts: the FreeUsageLimitError upsell message stops saying
"Subscribe to OpenCode Go ... $5/month"; replaced with a neutral
"Free usage limit reached on this provider." sentinel. GO_UPSELL_URL
stays empty so the TUI DialogRetryAction GO-treatment path stays dark
(unchanged behavior, just wording).
* PWA manifest (ui/src/assets/favicon/site.webmanifest, symlinked from
app/public/site.webmanifest): name + short_name -> BrowserCode.
Picked up when the web UI is rebuilt (we don't currently rebuild;
this is for the eventual upstream-side rebuild).
* config.ts deprecation log "tui keys in opencode config are deprecated"
-> "in bcode config". "Server configuration for opencode serve" ->
"bcode serve".
Deliberately NOT changed:
* @opencode-ai/* workspace package names — Red zone.
* @opencode/... Effect service IDs — Red zone.
* x-opencode-* HTTP headers — Red zone (wire protocol).
* OPENCODE_* env vars — Red zone (user-configurable interface).
* --user-agent=opencode/... for third-party provider compat — Red.
* HttpApi.make("opencode") service name + OpenCodeHttpApi Effect class
— wire-protocol service name registered on the router; renaming
would fork the entire HTTP API namespace.
* .well-known/opencode remote-config-server endpoint — wire protocol;
third-party servers serve config at this conventionally-named path.
Renaming would break interop with anyone running OpenCode-style
remote-config servers.
* opencode.ai/zen, opencode.ai/go upsell URLs inside dialog-provider
Zen/Go connect dialogs — only shown when user explicitly picks
OpenCode as a provider; in that path they need the URL to get a key.
* dialog-retry-action.tsx GO_URL constant — already neutralized at the
message level via empty GO_UPSELL_URL; dead code.
* acp/README.md, control-plane/dev/README.md — dev docs, not bundled.
* Renaming default theme opencode.json -> bcode.json and channel-DB
filename opencode-{channel}.db -> bcode-{channel}.db — deferred.
Theme rename cascades through ~6 theme.tsx sites and breaks users'
`tui.json` `"theme": "opencode"`; channel db only fires for
non-`latest` channels we don't ship. Both increase sync conflict
surface for little user-facing payoff.
Verification:
* `bun run typecheck` 6/6 clean (16.3s).
* Single-platform build at OPENCODE_VERSION=0.1.3-f7-deeper-dryrun
succeeds; `./bcode --help` boots, renders BrowserCode banner, lists
commands as `bcode <cmd>`.
There was a problem hiding this comment.
1 issue found across 35 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/opencode/src/session/retry.ts">
<violation number="1" location="packages/opencode/src/session/retry.ts:87">
P2: This message literal change breaks the existing `session.retry.retryable` expectation for `free_tier_limit`; update downstream assertions/consumers or keep a shared constant to avoid contract drift.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Cubic flagged that the inline literal change in retry.ts:87 ("Subscribe
to OpenCode Go ... $5/month" -> "Free usage limit reached on this
provider.") broke retry.test.ts:257 which asserted on the upstream
literal byte-for-byte.
Right fix: shared const, so test and impl reference one symbol and
future BrowserCode-side neutral edits don't need synchronized test
updates. Mirrors the existing GO_UPSELL_MESSAGE / GO_UPSELL_URL
pattern. Added FREE_TIER_ACTION_MESSAGE; test now uses
SessionRetry.FREE_TIER_ACTION_MESSAGE.
The schema-decoding.test.ts inline literal stays — that's a
schema-shape decode/encode round-trip with arbitrary string values,
not an assertion on retry.ts behavior.
Verified: bun typecheck 6/6 clean; retry.test.ts 31/31 pass;
schema-decoding.test.ts 25/25 pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Deeper sweep of remaining
OpenCodebrand strings, OpenCode-product upsells, and one real phone-home leak (https://app.opencode.aiweb-UI proxy fallback) that the F7 medium pass deferred (PR #12). Per the zone matrix:OpenCode→BrowserCodein user-visible strings only. Internal identifiers (env vars, Effect service IDs,x-opencode-*headers, third-party provider User-Agents,OpenCodeHttpApiEffect class, the"opencode"wire-protocol service name inHttpApi.make) untouched.opencode→bcodein CLI invocations shown to users (tips, toasts, ACP terminal-auth, MCP auth toast, MCPClient.name).35 files, +102 / −143.
What changed
User-visible identity & instructions
codex,kimi,gpt,beast,copilot-gpt-5,gemini,trinity): "You are OpenCode" → "You are BrowserCode" with the same fork-acknowledgement wording previously applied toanthropic.txtanddefault.txt.anthropic.txt's objectivity-section "OpenCode" reflowed to "BrowserCode".tips-view: 14 random-tip strings updated (CLI commandsopencode <cmd>→bcode <cmd>, paths~/.config/opencode/tui.json→~/.config/bcode/tui.json). Removed three: thedocker run ghcr.io/anomalyco/opencodetip, the/opencodeGitHub-PR commands (we don't have an equivalent GitHub App), and the "/connect with OpenCode Zen" recommendation.bcode runpaths): "until OpenCode is restarted" → "until BrowserCode is restarted"; "Tell OpenCode what to do differently" → "BrowserCode".mcp/oauth-callback.ts+plugin/codex.ts): titles + body text say BrowserCode.bcode upgrade.Third-party wire identity
Client({ name: "opencode" })→"bcode"(3 sites) so MCP servers log us asbcode.client_name: "OpenCode"→"BrowserCode"(shown on third-party consent screens).bcode mcp auth.cmd === "opencode"BUN_BE_BUN check accepts both"bcode"and"opencode"so user MCP configs invoking either binary work.agentInfo.nameandterminal-authcommand/label updated. ACP clients (Zed) now display BrowserCode and invokebcode auth loginfor terminal auth.Server / API surface
config,experimental,global,instance,project,pty,session): "the OpenCode X" → "the BrowserCode X". Visible atGET /doc.server/shared/ui.tspreviously fell back to proxying every web UI request tohttps://app.opencode.aiwhen the embedded UI bundle was missing. BrowserCode now 404s in that case. Removed:UI_UPSTREAM,upstreamURL,requestBody,proxyResponseHeaders, and the HTTP proxy code path.services.clientis kept in the signature so the router call-site doesn't change on every upstream sync.Free-usage / provider upsells
bcode modelsno longer sorts OpenCode's providers first.bcode auth login/providers login: removedopencode: 0priority bias andopencode: "recommended"hint. Positional-arg description "opencode auth provider" → "well-known auth provider URL".session/retry.tsFreeUsageLimitError sentinel message no longer reads "Subscribe to OpenCode Go ... $5/month"; replaced with a neutral string.GO_UPSELL_URLstays empty so the TUIDialogRetryActionGO-treatment path stays dark (unchanged behavior).providers.tsprompt blocks →bcode.json.Misc
repo_clonetool description,/initcommand template, agent.ts reference-scout prompt → BrowserCode.packages/ui/src/assets/favicon/site.webmanifest(symlinked frompackages/app/public/site.webmanifest): name + short_name → BrowserCode. Picked up when the web UI is rebuilt.config.tsdeprecation log "tui keys in opencode config" → "in bcode config"; "Server configuration for opencode serve" → "bcode serve".Deliberately NOT changed
@opencode-ai/*workspace package names — Red zone.@opencode/...Effect service IDs — Red zone.x-opencode-*HTTP headers,OPENCODE_*env vars — Red zone (wire/config).--user-agent=opencode/...for third-party provider compat — Red.HttpApi.make("opencode")registered service name +OpenCodeHttpApiEffect class — wire-protocol service name; renaming forks the whole HTTP API namespace..well-known/opencoderemote-config endpoint — wire protocol; renaming breaks interop with OpenCode-style remote-config servers.opencode.ai/zen,opencode.ai/goupsell URLs inside thedialog-providerZen/Go connect dialogs — only shown when a user explicitly picks OpenCode as a provider; in that path they need the URL.dialog-retry-action.tsxGO_URLconstant — dead code; message-level neutralization already in place.acp/README.md,control-plane/dev/README.md— dev docs, not bundled.opencode.json→bcode.json) and channel-DB filename — deferred; high sync-conflict surface for low payoff. Theme rename breaks usertui.json"theme": "opencode"; channel db only fires for non-latestchannels we don't ship.Verification
bun run typecheck6/6 clean (16.3s).OPENCODE_VERSION=0.1.3-f7-deeper-dryrun bun run --cwd packages/opencode build -- --singlesucceeds../bcode --helpboots, renders BrowserCode banner, lists commands asbcode <cmd>.EXCEPTIONS.md(in the agent's memory repo, not this PR per the F2 convention) will be updated post-merge with per-row deferral rationale.