Prerequisites
Bug Description
Running OMO v3.17.5 on Windows 11.
Every time opencode starts, the plugin makes another oh-my-openagent.json.bak.<timestamp> next to my config and never actually writes the migrated file.
The plugin log shows:
Failed to write migrated config to ...\oh-my-openagent.json: {"code":"EPERM","fd":5,"syscall":"fsync","errno":-1}
On Windows, fsync requires the handle to have GENERIC_WRITE access, meaning our read-only fd gets ACCESS_DENIED (node EPERM).
Because the throw happens before renameSync, the rename never runs, the orphan .tmp is left behind, and the migration retriggers on every launch, producing another backup file.
Steps to Reproduce
On a Windows machine:
- Install plugin: add
"oh-my-openagent@3.17.5" to opencode.json plugins.
- Put any model in
MODEL_VERSION_MAP in the config — e.g. set an agent's model to openai/gpt-5.3-codex in oh-my-openagent.json.
- Launch opencode. Quit. Launch again. Quit. Repeat.
- Look in
~\.config\opencode\: a new oh-my-openagent.json.bak.<timestamp> shows up after every launch, as well as a leftover oh-my-openagent.json.tmp. The original json is never updated.
Expected Behavior
The migration to succeed
Actual Behavior
Migration retriggers on every launch, producing another backup file.
Doctor Output
oMoMoMoMo Doctor
⚠ 1 issue found:
1. GitHub CLI missing
gh CLI is not installed.
Fix: Install from https://cli.github.com/
Affects: GitHub automation
Error Logs
Failed to write migrated config to ...\oh-my-openagent.json: {"code":"EPERM","fd":5,"syscall":"fsync","errno":-1}
Pull Request
Fixed via #3644
Operating System
Windows
OpenCode Version
1.14.25
Prerequisites
Bug Description
Running OMO v3.17.5 on Windows 11.
Every time opencode starts, the plugin makes another
oh-my-openagent.json.bak.<timestamp>next to my config and never actually writes the migrated file.The plugin log shows:
Failed to write migrated config to ...\oh-my-openagent.json: {"code":"EPERM","fd":5,"syscall":"fsync","errno":-1}On Windows, fsync requires the handle to have GENERIC_WRITE access, meaning our read-only fd gets ACCESS_DENIED (node EPERM).
Because the throw happens before renameSync, the rename never runs, the orphan .tmp is left behind, and the migration retriggers on every launch, producing another backup file.
Steps to Reproduce
On a Windows machine:
"oh-my-openagent@3.17.5"toopencode.jsonplugins.MODEL_VERSION_MAPin the config — e.g. set an agent's model toopenai/gpt-5.3-codexinoh-my-openagent.json.~\.config\opencode\: a newoh-my-openagent.json.bak.<timestamp>shows up after every launch, as well as a leftoveroh-my-openagent.json.tmp. The original json is never updated.Expected Behavior
The migration to succeed
Actual Behavior
Migration retriggers on every launch, producing another backup file.
Doctor Output
Error Logs
Pull Request
Fixed via #3644
Operating System
Windows
OpenCode Version
1.14.25