Bug
opencode-synced v0.9.0 hardcodes singular directory names in CONFIG_DIRS, but opencode creates and uses plural directory names. This causes the sync to silently skip directories that contain user content.
Evidence
Source (src/sync/paths.ts:54)
const CONFIG_DIRS = ['agent', 'command', 'mode', 'tool', 'themes', 'plugin'];
Actual opencode directory layout
~/.config/opencode/
├── agent/ ← empty (synced, but nothing to sync)
├── agents/ ← has content (NOT synced) ← BUG
├── command/ ← doesn't exist
├── commands/ ← has content (NOT synced) ← BUG
├── plugin/ ← doesn't exist
├── plugins/ ← has content (NOT synced) ← BUG
├── skills/ ← has content (NOT synced in v0.9.0)
Observed behavior
When running opencode_sync push with default settings, the contents of agents/, commands/, plugins/, and skills/ are silently skipped. Only the empty singular dirs (agent/) are synced.
Impact
Users lose their subagents, commands, and plugins on sync because the tool looks in the wrong directory. This is a silent data loss scenario — there's no warning or error.
Workaround
Add the plural dirs manually via extraConfigPaths:
Expected fix
Either:
- Add plural variants to
CONFIG_DIRS: ['agent', 'agents', 'command', 'commands', ...]
- Replace singular with plural to match what opencode actually creates
- Check both singular and plural and sync whichever exists
Environment
- opencode-synced: v0.9.0 (latest release)
- opencode: 1.18.3
- OS: macOS
Note: The main branch already adds skills/ and ~/.agents/ sync (gated by includeOpencodeSkills/includeAgentsDir), but the singular/plural mismatch for agent/commands/plugins persists and no release includes these fixes yet.
Bug
opencode-syncedv0.9.0 hardcodes singular directory names inCONFIG_DIRS, but opencode creates and uses plural directory names. This causes the sync to silently skip directories that contain user content.Evidence
Source (
src/sync/paths.ts:54)Actual opencode directory layout
Observed behavior
When running
opencode_sync pushwith default settings, the contents ofagents/,commands/,plugins/, andskills/are silently skipped. Only the empty singular dirs (agent/) are synced.Impact
Users lose their subagents, commands, and plugins on sync because the tool looks in the wrong directory. This is a silent data loss scenario — there's no warning or error.
Workaround
Add the plural dirs manually via
extraConfigPaths:{ "extraConfigPaths": [ "~/.config/opencode/agents", "~/.config/opencode/commands", "~/.config/opencode/plugins", "~/.config/opencode/skills" ] }Expected fix
Either:
CONFIG_DIRS:['agent', 'agents', 'command', 'commands', ...]Environment
Note: The
mainbranch already addsskills/and~/.agents/sync (gated byincludeOpencodeSkills/includeAgentsDir), but the singular/plural mismatch foragent/commands/pluginspersists and no release includes these fixes yet.