Skip to content

[Bug]: Windows symlinked ~/.config directory causes bunx version mismatch and plugin name parsing issues #2271

@Eric-GoodBoy-Tech

Description

@Eric-GoodBoy-Tech

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

On Windows, when the entire ~/.config directory is symlinked to another location (which contains the ~/.config/opencode/ OpenCode configuration directory), the following issues occur:

  1. bunx cannot correctly identify the version number - Running bunx oh-my-opencode -v displays an incorrect/outdated version
  2. OpenCode cannot properly parse the plugin name - The plugin name only shows part of the symlinked directory path instead of oh-my-opencode
  3. Cannot install latest version - OpenCode fails to resolve and install oh-my-opencode@latest
  4. Plugin loading and other functionality remain normal - Despite the above issues, the plugin loads correctly and all features work as expected

Steps to Reproduce

  1. Move the entire .config directory to a custom location:

    # Example: Move to D:\configs\user-configs\.config
    Move-Item "$env:USERPROFILE\.config" "D:\configs\user-configs\.config"
  2. Create a directory symlink/junction from the original location to the new location:

    # Using PowerShell (Admin) for directory symlink
    New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.config" -Target "D:\configs\user-configs\.config" -Force
    
    # OR using mklink for directory junction
    mklink /J "%USERPROFILE%\.config" "D:\configs\user-configs\.config"
  3. Verify the symlink structure:

    Source: C:\Users\<username>\.config\ (symlink/junction)
    Target: D:\configs\user-configs\.config\
    └── opencode\
        └── opencode.json (plugin configuration)
    
  4. Configure the plugin in ~/.config/opencode/opencode.json:

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["oh-my-opencode@latest"]
    }
  5. Run bunx oh-my-opencode -v and observe incorrect version display

  6. Start OpenCode and observe plugin name display in UI

Expected Behavior

  • bunx oh-my-opencode -v should display the correct installed version regardless of symlinked config directory
  • OpenCode should display the full plugin name (oh-my-opencode) in the UI
  • OpenCode should be able to resolve and install oh-my-opencode@latest
  • Plugin should load normally with correct name display

Actual Behavior

  • bunx oh-my-opencode doctor displays an incorrect version (e.g., shows cached old version)
  • Plugin name in OpenCode UI only shows part of the symlinked directory path (e.g., configs\user-configs\.config\opencode instead of oh-my-opencode)
  • OpenCode cannot resolve oh-my-opencode@latest for installation
  • Plugin functionality works normally despite the display/version issues

Doctor Output

oMoMoMoMo Doctor

System Information
────────────────────────────────────────
  ✓ opencode    1.2.15
  ✓ oh-my-opencode 3.7.4
  ✓ loaded      3.7.4
  ✓ bun         1.3.10
  ✓ path        C:\Users\cxj43\AppData\Roaming\npm\opencode.cmd

Configuration
────────────────────────────────────────
  ✓ C:\Users\cxj43\.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 (Eric-GoodBoy-Tech)

MCPs
────────────────────────────────────────
  ✓ context7
  ✓ grep_app

Issues
────────────────────────────────────────
1. Loaded plugin is outdated
   Loaded 3.7.4, latest 3.10.0.
   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 10501ms

Error Logs

Configuration

Additional Context

Exactly,the OMO is now the latest version.

Operating System

Windows

OpenCode Version

1.2.15

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