Bug
Relative paths in extraConfigPaths and extraSecretPaths are resolved against the current working directory (process.cwd()) instead of the OpenCode config root (~/.config/opencode/). This means none of the extra paths actually get synced unless the user happens to launch OpenCode from the right directory.
Steps to reproduce
- Configure
opencode-synced.jsonc with relative paths:
{
"extraConfigPaths": [
"skills/",
"SOUL.md",
"commands/"
]
}
-
Run opencode_sync push from any directory
-
Check the repo — the extra paths are missing. The extra-manifest.json shows incorrect source paths like /Users/username/skills instead of /Users/username/.config/opencode/skills.
Root cause
In dist/sync/paths.js, buildExtraPathPlan calls normalizePath on each entry:
const allowlist = (inputPaths ?? []).map((entry) => normalizePath(entry, locations.xdg.homeDir, platform));
normalizePath calls expandHome then path.resolve. For relative paths (no ~/ prefix), expandHome returns them unchanged, and path.resolve resolves them against process.cwd() — not against configRoot.
Expected behavior
Relative paths in extraConfigPaths/extraSecretPaths should resolve relative to the OpenCode config directory (e.g. ~/.config/opencode/), so that "skills/" maps to ~/.config/opencode/skills/.
Workaround
Use absolute paths with ~/ prefix:
{
"extraConfigPaths": [
"~/.config/opencode/skills/",
"~/.config/opencode/SOUL.md",
"~/.config/opencode/commands/"
]
}
Environment
- opencode-synced: 0.9.0
- OS: macOS 26.3 (arm64)
- OpenCode: v1.2.10