Skip to content

[Bug]: Using oh-my-opencode via bunx causes a new oh-my-openagent.json.bak.* backup file to be created on every OpenCode startup, even when no config changes were made. #3222

@MASON-PRINCE

Description

@MASON-PRINCE

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

When using oh-my-opencode with OpenCode on Windows, a new backup file named oh-my-openagent.json.bak.<timestamp> is created every time OpenCode starts.

This happens repeatedly even when I do not manually change the oh-my-openagent config file.

I expected the config file to remain unchanged unless a real migration or config update was needed.

Steps to Reproduce

  1. Install and configure oh-my-opencode for OpenCode.
  2. Use OpenCode with the plugin enabled.
  3. Make sure oh-my-openagent.json exists in the OpenCode config directory.
  4. Start OpenCode.
  5. Check the config directory.
  6. Notice that a new file like oh-my-openagent.json.bak.<timestamp> is created.
  7. Close OpenCode and start it again.
  8. Another new backup file is created.

Expected Behavior

A backup file should only be created when the plugin actually migrates or modifies the config.

If no config change is needed, OpenCode startup should not generate a new .bak file every time.

Actual Behavior

A new backup file is created on every startup, for example:

  • oh-my-openagent.json.bak.2026-04-08T02-43-59-438Z
  • oh-my-openagent.json.bak.2026-04-08T03-31-51-331Z

This keeps accumulating backup files even when the config appears unchanged.

Doctor Output

oMoMoMoMo Doctor

 ⚠ 2 issues found:

1. Comment checker unavailable
   Comment checker binary is not installed.
   Fix: Install @code-yeongyu/comment-checker
   Affects: comment-checker hook

2. GitHub CLI missing
   gh CLI is not installed.
   Fix: Install from https://cli.github.com/
   Affects: GitHub automation

Error Logs

No fatal error is shown.

The main issue is that a new `oh-my-openagent.json.bak.*` file is generated on every startup.

Configuration

{
  "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-opencode.schema.json",
  "agents": {
    "sisyphus": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    },
    "hephaestus": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    },
    "oracle": {
      "model": "openai/gpt-5.4",
      "variant": "high"
    },
    "explore": {
      "model": "opencode/gpt-5-nano",
      "variant": "medium"
    },
    "multimodal-looker": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    },
    "prometheus": {
      "model": "openai/gpt-5.4",
      "variant": "high"
    },
    "metis": {
      "model": "openai/gpt-5.4",
      "variant": "high"
    },
    "momus": {
      "model": "openai/gpt-5.4",
      "variant": "xhigh"
    },
    "atlas": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    },
    "sisyphus-junior": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    },
    "librarian": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    }
  },
  "categories": {
    "visual-engineering": {
      "model": "google/gemini-3.1-pro-preview",
      "variant": "high"
    },
    "ultrabrain": {
      "model": "openai/gpt-5.4",
      "variant": "xhigh"
    },
    "deep": {
      "model": "openai/gpt-5.4",
      "variant": "medium"
    },
    "quick": {
      "model": "openai/gpt-5.4-mini"
    },
    "unspecified-low": {
      "model": "openai/gpt-5.3-codex",
      "variant": "medium"
    },
    "unspecified-high": {
      "model": "openai/gpt-5.3-codex",
      "variant": "medium"
    },
    "writing": {
      "model": "google/gemini-3-flash-preview",
      "variant": "medium"
    },
    "artistry": {
      "model": "google/gemini-3.1-pro-preview",
      "variant": "high"
    }
  }
}

Additional Context

No response

Operating System

Windows

OpenCode Version

1.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions