Skip to content

fix(install): keep model: in opencode agents, strip only tools array - #9

Merged
0p9b merged 1 commit into
mainfrom
fix/opencode-keep-model
Jul 15, 2026
Merged

fix(install): keep model: in opencode agents, strip only tools array#9
0p9b merged 1 commit into
mainfrom
fix/opencode-keep-model

Conversation

@0p9b

@0p9b 0p9b commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Follow-up to #8. opencode accepts model: as a valid subagent field (config loads fine with it) — only the YAML-array tools: form breaks opencode's config. #8 also stripped model, diverging from TLDR's bin/lib/opencode-agent.js, whose tests deliberately preserve model:. This strips tools: only and renames the helper to stripOpencodeAgentTools to match TLDR. Claude Code keeps both fields.

Verified: 223/223 tests pass; a temp opencode install writes eapcrew agents with model: haiku intact and no tools: array — consistent with TLDR's tldrcrew.

…array

Follow-up to #8. opencode accepts `model:` as a valid subagent field (its config
loads fine with it), so only the YAML-array `tools:` form actually breaks the
config. #8 also stripped `model`, which diverged from TLDR's opencode-agent.js
— whose tests deliberately preserve `model:`. Strip `tools:` only and rename the
helper to stripOpencodeAgentTools to match TLDR. Claude keeps both fields.

223/223 tests pass; verified eapcrew agents install into opencode with `model:`
intact and no `tools:` array.
@0p9b
0p9b merged commit 89cfc6b into main Jul 15, 2026
@0p9b
0p9b deleted the fix/opencode-keep-model branch July 15, 2026 00:21
0p9b added a commit that referenced this pull request Jul 15, 2026
…ettingsFiles (#10)

Two runtime bugs found while deep-testing eapcrew across hosts.

1. opencode crew subagents that pin `model: haiku` fail to spawn with
   "Model not found: haiku/." when opencode has no Anthropic provider authed
   (only the builder agents, which carry no `model:`, spawn). This re-applies
   the `model:` strip that #9 removed: #9 assumed keeping `model:` was safe
   (opencode accepts it as a field and its config loads) — but at spawn time the
   unresolved Anthropic alias errors. installNativeAssets now strips `model:` in
   addition to the tools array when writing eapcrew agents into opencode, so they
   inherit opencode's default model. Claude Code still keeps both fields.

2. eap_doctor listed ~/.claude/settings.json twice when cwd == home (the home
   and cwd candidate paths collided with no dedup). Dedup the candidate list.
   Cosmetic — events/ok were already correct.

223/223 tests pass. Verified: opencode eapcrew agents emit no `tools:`/`model:`;
eap_doctor returns a single settingsFiles entry from cwd=home.

Co-authored-by: ZeroPointNineBar <273573444+ZeroPointNineBar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant