Summary
oma link opencode generates an invalid OpenCode project configuration for OpenCode 1.17.8.
Symptoms
After running oma link opencode, OpenCode fails to bootstrap the project with:
Failed to finish bootstrap instance Error: ConfigInvalidError
Root Cause
Two issues were observed:
- The generated
.opencode/agents/*.md files contain:
OpenCode's current config schema does not accept tools as an array in agent frontmatter. This causes ConfigInvalidError.
oma link opencode copies the plugin bridge to:
.opencode/plugins/oma/oma.ts
but does not register it in .opencode/opencode.jsonc. On OpenCode 1.17.8, the plugin was not auto-discovered; opencode debug info reported:
Expected Behavior
oma link opencode should generate OpenCode-compatible config:
- Omit invalid
tools: [] from generated OpenCode agent frontmatter.
- Explicitly register the local plugin in
.opencode/opencode.jsonc, for example:
Verification
After removing tools: [] and adding the explicit plugin registration:
opencode debug config --print-logs --log-level DEBUG
opencode debug info --print-logs --log-level DEBUG
both succeed, and opencode debug info lists:
file:///.../.opencode/plugins/oma/oma.ts
A local patch was also validated with the targeted test suites:
bunx vitest run platform/agent-composer.test.ts __tests__/opencode-plugin.test.ts
Result: 2 test files passed, 39 tests passed.
Environment
- oh-my-agent: 10.3.2
- OpenCode: 1.17.8
- OS: Windows
Summary
oma link opencodegenerates an invalid OpenCode project configuration for OpenCode 1.17.8.Symptoms
After running
oma link opencode, OpenCode fails to bootstrap the project with:Root Cause
Two issues were observed:
.opencode/agents/*.mdfiles contain:OpenCode's current config schema does not accept
toolsas an array in agent frontmatter. This causesConfigInvalidError.oma link opencodecopies the plugin bridge to:but does not register it in
.opencode/opencode.jsonc. On OpenCode 1.17.8, the plugin was not auto-discovered;opencode debug inforeported:Expected Behavior
oma link opencodeshould generate OpenCode-compatible config:tools: []from generated OpenCode agent frontmatter..opencode/opencode.jsonc, for example:{ "$schema": "https://opencode.ai/config.json", "plugin": ["./plugins/oma/oma.ts"] }Verification
After removing
tools: []and adding the explicit plugin registration:both succeed, and
opencode debug infolists:A local patch was also validated with the targeted test suites:
Result: 2 test files passed, 39 tests passed.
Environment