feat: inject oh-my-opencode-slim roles into Agent-tool description#18
Open
mortonbaker wants to merge 1 commit into
Open
feat: inject oh-my-opencode-slim roles into Agent-tool description#18mortonbaker wants to merge 1 commit into
mortonbaker wants to merge 1 commit into
Conversation
Claude (as orchestrator via this bridge) was unaware of the slim pantheon subagents because the captured Agent-tool description only documents the four Claude Code SDK built-ins. The schema's subagent_type is `type: string` with no enum, and the inbound translation layer already passes unknown values through unchanged — so the only missing piece was telling Claude those roles exist. Reads ~/.config/opencode/oh-my-opencode-slim.json at module load, walks the active preset, and appends each non-orchestrator role to the Agent description with its bound model. Falls back to the unmodified description if config is missing/malformed or the marker shifts upstream. - typecheck: clean - npm test: 109/109 pass - verified compiled dist injects roles: oracle, librarian, explorer, designer, fixer, observer all listed with model bindings This unlocks orchestrator-on-Claude-opus + specialists-on-MiniMax, which keeps high-judgment work on Claude while routing high-volume read/edit tasks through the cheaper MiniMax quota.
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.
Summary
When the bridge is used together with
oh-my-opencode-slim, Claude (as orchestrator) can't spawn slim pantheon subagents (@explorer,@fixer,@oracle, etc.) — even though opencode's task tool would dispatch them correctly. The reason is that the captured Agent-tool description hardcodes only the four Claude Code SDK built-ins, so the model self-restricts.This PR makes the Agent-tool description preset-aware:
~/.config/opencode/oh-my-opencode-slim.jsonsubagent_typevalues through unchanged (AGENT_TYPE_CLAUDE_TO_OPENCODElookup →if (mapped)guard), so no other change neededThe schema's
subagent_typeistype: "string"with no enum, so the API accepts any value — the description is the only gate.Test plan
npm run typecheckcleannpm test— 109/109 pass (no upstream tests broken)dist/; verified Agent description now includesexplorer/fixer/designerbound tominimax-coding-plan/MiniMax-M2.7-highspeed, plusoracle/observerbound to their preset modelsMotivation
This unlocks orchestrator-on-Claude + specialists-on-MiniMax — high-judgment work stays on Claude, high-volume read/edit goes through the cheaper MiniMax quota. Big cost saving for users on the Claude Max + MiniMax Max-Highspeed stack.