fix(agents): omit model: inherit so non-Claude tools don't see a bad model id#200
Conversation
…d model id `model: inherit` is a Claude Code-specific keyword that means "use the parent session's model." Other tools that read the same agent frontmatter (opencode, codex, etc.) don't understand it and instead try to use `inherit` as a literal model id, which the configured provider rejects. Reproduction (from Lum1104#167): opencode + deepseek runs `/understand`, the project-scanner subagent dispatches with `model: inherit`, deepseek returns `ProviderModelNotFoundError`, and the pipeline halts on every subagent dispatch. With the field omitted, each platform falls back to its own configured default: - Claude Code: user's default subagent model - opencode / codex / etc.: globally configured model Note for Claude Code Opus users: subagents will no longer auto-inherit the Opus session model. If you want the previous behavior, set your default subagent model globally — that single setting now controls all nine agents. Closes Lum1104#167
|
@Lum1104 friendly ping when you get a chance — small agent config fix so Cursor/opencode don't choke on |
|
Hi, I was wondering how to do the update if we let install.sh to remove this line. Since git pull won't work after that. |
|
Good catch — you're right, that's exactly why I went with the source-side approach rather than install-time rewriting. If If we ever wanted to bring back per-platform transformation, the only way to keep
That's more moving parts than the current symlink design buys us, though, and it adds a re-render step every update. The merged approach trades the Claude-Code Opus auto-inheritance behavior for one global subagent-model setting, which I think is the better deal for a multi-platform plugin — but happy to do the rendering pass as a follow-up if you'd rather restore the old Claude Code behavior without breaking other tools. |
Summary
Fixes #167 (
ProviderModelNotFoundErrorwhen running/understandon opencode + deepseek and similar setups).model: inheritis a Claude Code-specific keyword meaning "use the parent session's model." Other tools that read the same agent frontmatter (opencode, codex, etc.) don't understand it — they treatinheritas a literal model id and forward it to whatever provider the user has configured, which rejects it.Reproduction (from the issue):
Maintainer already acknowledged: "Oops, seems deepseek thought
inheritis a model name…."Approach
Omit the
model:field from all 9 agent frontmatters. With the field absent, each platform falls back to its own configured default:This is the smallest change that unblocks non-Claude users without requiring install-time file rewriting (which would break the current symlink-based install flow in
install.sh).Trade-off worth flagging
Claude Code users running an Opus session previously had subagents auto-inherit Opus. After this change, subagents follow Claude Code's default-subagent-model setting instead — a single global config now controls all 9 agents. That's a behavior change worth surfacing in release notes; for users who want the old behavior, configuring the default subagent model globally restores it.
If you'd rather preserve
model: inheritfor Claude Code and strip it only for other platforms, that's a bigger change (install.sh would need to copy + transform agent files rather than symlink), and I'm happy to do that as a follow-up if you'd prefer.Files changed
understand-anything-plugin/agents/architecture-analyzer.mdmodel: inheritunderstand-anything-plugin/agents/article-analyzer.mdmodel: inheritunderstand-anything-plugin/agents/assemble-reviewer.mdmodel: inheritunderstand-anything-plugin/agents/domain-analyzer.mdmodel: inheritunderstand-anything-plugin/agents/file-analyzer.mdmodel: inheritunderstand-anything-plugin/agents/graph-reviewer.mdmodel: inheritunderstand-anything-plugin/agents/knowledge-graph-guide.mdmodel: inheritunderstand-anything-plugin/agents/project-scanner.mdmodel: inheritunderstand-anything-plugin/agents/tour-builder.mdmodel: inheritCLAUDE.mdTest plan
model: inherit(grepreturns clean)Closes #167