-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Prerequisites
- I will write this issue in English (see our Language Policy)
- I have searched existing issues to avoid duplicates
- I am using the latest version of oh-my-opencode
- I have read the documentation or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer
Bug Description
After the #1745 fix (shipped in v3.5.2), the auto-updater treats all exact-versioned plugin entries as "user-pinned" and skips auto-update. Since the installer (bunx oh-my-opencode install) always writes an exact version (e.g., oh-my-opencode@3.5.2), every user who installed via the official installer is stuck on their install-time version with no auto-update.
The core issue is that isPinned in plugin-entry.ts cannot distinguish between:
- Installer-pinned:
addPluginToOpenCodeConfig(version)writesoh-my-opencode@3.5.2automatically - User-pinned: user manually edits
opencode.jsonto lock a specific version
Both produce the same format (oh-my-opencode@X.Y.Z), so the auto-updater skips both.
Steps to Reproduce
- Install oh-my-opencode via
bunx oh-my-opencode install(writesoh-my-opencode@3.5.2toopencode.json) - New version is released (e.g., 3.7.1)
- Restart opencode — toast shows "v3.7.1 available. Restart to apply."
- Restart opencode again — same toast, version still
3.5.2 - Check
~/.cache/opencode/package.json— still"oh-my-opencode": "3.5.2", confirmingbun installwas never triggered
Expected Behavior
Users who installed via the official installer should receive auto-updates. Only users who manually edit opencode.json to pin a specific version should be excluded from auto-update.
Actual Behavior
The auto-updater detects the update, shows a toast notification ("Restart to apply"), but never actually updates the config or runs bun install. Restarting has no effect. The relevant code path:
// background-update-check.ts
if (pluginInfo.isPinned) {
await showUpdateAvailableToast(ctx, latestVersion, getToastMessage)
log(`User-pinned version detected (${pluginInfo.entry}), skipping auto-update.`)
return // exits without calling updatePinnedVersion() or bun install
}// plugin-entry.ts
const isPinned = pinnedVersion !== "latest"
// "oh-my-opencode@3.5.2" → isPinned = true (same result for installer and user)Additionally, the toast message "Restart to apply" is misleading — restarting does nothing because the config file was never modified.
Doctor Output
oMoMoMoMo Doctor
System Information
────────────────────────────────────────
✓ opencode 1.2.6
✓ oh-my-opencode 3.5.2
✓ loaded 3.5.2
✓ bun 1.3.9
✓ path /Users/jhin/.opencode/bin/opencode
Configuration
────────────────────────────────────────
✓ /Users/jhin/.config/opencode/opencode.json (valid)
Tools
────────────────────────────────────────
✓ LSP 2/4 installed
✓ ast-grep CLI installed
✓ ast-grep napi installed
✗ comment-checker not found
✓ gh CLI installed
MCPs
────────────────────────────────────────
✓ context7
✓ grep_app
Issues
────────────────────────────────────────
1. Loaded plugin is outdated
Loaded 3.5.2, latest 3.7.1.
Fix: Update: cd ~/.config/opencode && bun update oh-my-opencode
Affects: plugin features
2. Comment checker unavailable
Comment checker binary is not installed.
Fix: Install @code-yeongyu/comment-checker
Affects: comment-checker hook
Summary
────────────────────────────────────────
2 passed, 0 failed, 2 warnings
Total: 4 checks in 894msError Logs
No errors in logs — the auto-updater silently skips the update and only shows a toast.Configuration
{
"plugin": [
"oh-my-opencode@3.5.2",
"opencode-antigravity-auth@1.5.1"
]
}Additional Context
Timeline of related issues:
| Issue | Date | Effect |
|---|---|---|
| #402 | Jan 2 | Requested auto-update → implemented (overwrites all versions) |
| #1745 | Feb 11 | Reported overwrite bug → fixed by skipping isPinned=true |
| This issue | Feb 17 | Side effect: installer-pinned users also skipped → no auto-update for anyone |
Evidence from source code:
tui-installer.ts/cli-installer.ts:addPluginToOpenCodeConfig(version)always writes exact versionplugin-entry.ts:isPinned = pinnedVersion !== "latest"— no way to distinguish installer vs userbackground-update-check.ts:if (pluginInfo.isPinned) { return }— skips update entirely
Possible solutions:
- Installer writes
"oh-my-opencode"(unpinned) instead of"oh-my-opencode@X.Y.Z" - Installer writes
"oh-my-opencode@latest"— already treated as unpinned byisPinnedlogic - Add metadata (e.g.,
"installer_managed": trueinoh-my-opencode.json) to distinguish intent
Operating System
macOS
OpenCode Version
1.2.6