Skip to content

[Framework] .opencode symlinks (agents/commands/skills/rules) are inert on Windows #93

Description

@striderZA

Problem

.opencode/agents, .opencode/commands, .opencode/skills, .opencode/rules are committed as git symlinks (mode 120000 in the index) pointing at ../.agents/*. On Windows, git defaults to core.symlinks=false unless the user has enabled Developer Mode/admin rights and explicitly set git config core.symlinks true before cloning. Under the default config, these paths check out as ~16-19 byte plain text files containing the literal string ../.agents/agents (etc.), not directories.

Verified on this machine (core.symlinks=false):

$ git ls-files -s .opencode/agents
120000 4c8a5fc... 0	.opencode/agents   # correct symlink blob in the index
$ cat .opencode/agents
../.agents/agents                       # but checked out as plain text, not a real symlink

Impact

OpenCode's agent/skill/command auto-discovery reads from .opencode/* (README.md, docs/pi-workflow.md). On a stock Windows clone, OpenCode finds zero agents, skills, or commands -- the framework is silently non-functional. Pi is unaffected (reads .agents/ and .pi/extensions/ directly).

Proposed fix

  1. Document the requirement prominently (README quick start + docs/pi-compatibility.md): git config --global core.symlinks true and Windows Developer Mode, set before cloning; re-clone or git checkout -- .opencode after enabling if already cloned.
  2. Add a setup/postinstall check (Node script) that detects stub symlink files (small text files matching ^\.\./\.agents/) under .opencode/ and either warns loudly or materializes real directory junctions (fs.symlink(..., 'junction') on win32) as a fallback so OpenCode works out of the box.
  3. Cover this with a regression check in tests/agents/validate.mjs or a small tools/ script that CI/Windows contributors can run to self-diagnose.

Acceptance criteria

  • Docs updated with explicit Windows symlink setup steps
  • A repo script exists that detects + repairs inert .opencode/* stub files on Windows
  • Running that script on this machine turns .opencode/agents etc. into working directories mirroring .agents/agents

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcross-platformCross-platform compatibility (Windows/macOS/Linux)framework-reviewIdentified during comprehensive framework reviewpriority-criticalMust fix immediately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions