Changes made in this fork (sendhil/opencode) on top of upstream
(anomalyco/opencode).
Use this file to track what needs attention during upstream merges and which changes are safe to drop if upstream adopts the same fix.
- Files:
packages/opencode/src/session/prompt.ts - Safe to drop on rebase: No — unless upstream adopts the same fix
- Description: Skill content injected via slash commands (e.g.
/brainstorming …) was displayed as the user's message in the TUI. Now markedsynthetic: trueon template-generated text parts so they're hidden from the UI but still sent to the LLM. A single visible part shows the slash command invocation the user typed. - Detect:
cmd.source === "skill"branch inresolvePromptParts/ template-resolution path ofprompt.ts. If upstream adds the same gating, drop this commit.
- Files:
packages/opencode/src/cli/upgrade.ts,packages/opencode/src/installation/index.ts,packages/opencode/src/storage/db.ts+ tests - Safe to drop on rebase: No — needed for running dev builds alongside stable installs
- Description: Adds
isEphemeralBuild(),usesSharedDatabase(), andshouldCheckForUpdates()helpers on theInstallationmodule. Builds whose version starts with0.0.0-OR contains-forkshare the same SQLite database as the latest/beta channels and skip autoupdate checks, so running a locally built binary doesn't fork session history. The-forkrecognition lets us overrideOPENCODE_VERSION(e.g.OPENCODE_VERSION=1.15.6-fork) at build time so external tools that parseopencode --version(e.g. Cmux's>=1.14.50fork-support gate) still see a SemVer-shaped string while keeping local-build semantics intact. SeeLOCAL_BUILD.mdfor the env-var setup.
- Files:
LOCAL_BUILD.md,.claude/skills/local-build/SKILL.md,.gitignore
- Files:
.claude/skills/upstream-merge/SKILL.md
These lived on the fork at one point but have since been removed.
- Reason: Verified on
upstream/devtip — fenced code blocks, diffs, and markdown all render correctly on light themes without our patch. Either upstream fixed it via the markdown-renderable flip (#27421) or the underlying renderer changed. Re-add if regression observed; the fix is trivial (movefgattribute beforecontenton<code>,<markdown>,<diff>).
- Reason: Not actively used; the cf-mitigated retry portion of our original patch is now upstream. The readability extraction + per-session cache was a token optimization for webfetch-heavy sessions; not worth the ongoing rebase cost.
- Reason: Upstream renamed
bash.ts→shell.tsas part of a tool framework refactor (PR #23244 onanomalyco/opencode); thebash.txtfile targeted by the trim no longer exists. Residualtask.txt/todowrite.txtsavings were marginal.
- Reason: Upstream still aliases
/clearto/new(which navigates home and starts a fresh session). The fork's "preserve session, wipe messages" variant was nice-to-have;/newcovers the common case.
- Reason: Upstream
packages/opencode/src/session/llm.tsalready performs the two-part system-prompt split that our patch implemented (rejoinssystem.length > 2 && system[0] === headerafter theexperimental.chat.system.transformplugin hook).