fix(install): keep model: in opencode agents, strip only tools array - #9
Merged
Conversation
…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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #8. opencode accepts
model:as a valid subagent field (config loads fine with it) — only the YAML-arraytools:form breaks opencode's config. #8 also strippedmodel, diverging from TLDR'sbin/lib/opencode-agent.js, whose tests deliberately preservemodel:. This stripstools:only and renames the helper tostripOpencodeAgentToolsto match TLDR. Claude Code keeps both fields.Verified: 223/223 tests pass; a temp opencode install writes eapcrew agents with
model: haikuintact and notools:array — consistent with TLDR's tldrcrew.