From 0566ea8b6b0f5e301ea125736e89568047105dd1 Mon Sep 17 00:00:00 2001 From: Asim Raza Date: Sun, 24 May 2026 10:50:26 +0500 Subject: [PATCH] fix(agents): omit `model: inherit` so non-Claude tools don't see a bad model id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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 #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 #167 --- CLAUDE.md | 2 +- understand-anything-plugin/agents/architecture-analyzer.md | 1 - understand-anything-plugin/agents/article-analyzer.md | 1 - understand-anything-plugin/agents/assemble-reviewer.md | 1 - understand-anything-plugin/agents/domain-analyzer.md | 1 - understand-anything-plugin/agents/file-analyzer.md | 1 - understand-anything-plugin/agents/graph-reviewer.md | 1 - understand-anything-plugin/agents/knowledge-graph-guide.md | 1 - understand-anything-plugin/agents/project-scanner.md | 1 - understand-anything-plugin/agents/tour-builder.md | 1 - 10 files changed, 1 insertion(+), 10 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9ab3dc7a..13b831e9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,7 +26,7 @@ An open-source tool combining LLM intelligence + static analysis to produce inte ## Agent Pipeline - Agents write intermediate results to `.understand-anything/intermediate/` on disk (not returned to context) -- Agent models: all set to `inherit` for cross-platform compatibility (Claude Code, Cursor, opencode, etc.) +- Agent model field is omitted from frontmatter so each platform falls back to its configured default — `inherit` was a Claude Code-only keyword that opencode (and similar tools) treated as a literal model id and rejected with `ProviderModelNotFoundError` (see #167) - `/understand` auto-triggers `/understand-dashboard` after completion - Intermediate files cleaned up after graph assembly diff --git a/understand-anything-plugin/agents/architecture-analyzer.md b/understand-anything-plugin/agents/architecture-analyzer.md index 58c005c1..569a291c 100644 --- a/understand-anything-plugin/agents/architecture-analyzer.md +++ b/understand-anything-plugin/agents/architecture-analyzer.md @@ -3,7 +3,6 @@ name: architecture-analyzer description: | Analyzes a codebase's file structure, summaries, and import relationships to identify logical architectural layers and assign every file to exactly one layer. -model: inherit --- # Architecture Analyzer diff --git a/understand-anything-plugin/agents/article-analyzer.md b/understand-anything-plugin/agents/article-analyzer.md index 013a8dd3..6b928e3d 100644 --- a/understand-anything-plugin/agents/article-analyzer.md +++ b/understand-anything-plugin/agents/article-analyzer.md @@ -2,7 +2,6 @@ name: article-analyzer description: | Analyzes markdown files using pre-parsed structural data and LLM inference to extract knowledge graph nodes and edges (entities, claims, implicit relationships, topic clustering). -model: inherit --- # Article Analyzer Agent diff --git a/understand-anything-plugin/agents/assemble-reviewer.md b/understand-anything-plugin/agents/assemble-reviewer.md index ff611e48..8768d1c8 100644 --- a/understand-anything-plugin/agents/assemble-reviewer.md +++ b/understand-anything-plugin/agents/assemble-reviewer.md @@ -3,7 +3,6 @@ name: assemble-reviewer description: | Reviews the output of merge-batch-graphs.py for semantic issues the script cannot catch. Recovers dropped nodes/edges and fills cross-batch gaps. -model: inherit --- # Assemble Reviewer diff --git a/understand-anything-plugin/agents/domain-analyzer.md b/understand-anything-plugin/agents/domain-analyzer.md index bd25bb82..be38e06f 100644 --- a/understand-anything-plugin/agents/domain-analyzer.md +++ b/understand-anything-plugin/agents/domain-analyzer.md @@ -2,7 +2,6 @@ name: domain-analyzer description: | Analyzes codebases to extract business domain knowledge — domains, business flows, and process steps. Produces a domain-graph.json that maps how business logic flows through the code. -model: inherit --- # Domain Analyzer Agent diff --git a/understand-anything-plugin/agents/file-analyzer.md b/understand-anything-plugin/agents/file-analyzer.md index 6b2a1838..effd4b54 100644 --- a/understand-anything-plugin/agents/file-analyzer.md +++ b/understand-anything-plugin/agents/file-analyzer.md @@ -4,7 +4,6 @@ description: | Analyzes batches of source files to produce knowledge graph nodes and edges. Extracts file structure, functions, classes, and relationships using a two-phase approach: structural extraction script followed by LLM semantic analysis. -model: inherit --- # File Analyzer diff --git a/understand-anything-plugin/agents/graph-reviewer.md b/understand-anything-plugin/agents/graph-reviewer.md index 53640143..34796224 100644 --- a/understand-anything-plugin/agents/graph-reviewer.md +++ b/understand-anything-plugin/agents/graph-reviewer.md @@ -3,7 +3,6 @@ name: graph-reviewer description: | Validates knowledge graphs for correctness, completeness, and quality. Runs systematic checks and renders approval or rejection decisions. -model: inherit --- # Graph Reviewer diff --git a/understand-anything-plugin/agents/knowledge-graph-guide.md b/understand-anything-plugin/agents/knowledge-graph-guide.md index 296b90ee..52daa6d5 100644 --- a/understand-anything-plugin/agents/knowledge-graph-guide.md +++ b/understand-anything-plugin/agents/knowledge-graph-guide.md @@ -5,7 +5,6 @@ description: | with an Understand-Anything knowledge graph. Guides users through graph structure, node/edge relationships, layer architecture, tours, and dashboard usage. -model: inherit --- You are an expert on Understand-Anything knowledge graphs. You help users navigate, query, and understand the graph files produced by the `/understand` and `/understand-domain` skills. diff --git a/understand-anything-plugin/agents/project-scanner.md b/understand-anything-plugin/agents/project-scanner.md index 2cedacc0..0343c95c 100644 --- a/understand-anything-plugin/agents/project-scanner.md +++ b/understand-anything-plugin/agents/project-scanner.md @@ -3,7 +3,6 @@ name: project-scanner description: | Scans a codebase directory to produce a structured inventory of all project files, detected languages, frameworks, import maps, and estimated complexity. -model: inherit --- # Project Scanner diff --git a/understand-anything-plugin/agents/tour-builder.md b/understand-anything-plugin/agents/tour-builder.md index ce12d1b6..2240e7d0 100644 --- a/understand-anything-plugin/agents/tour-builder.md +++ b/understand-anything-plugin/agents/tour-builder.md @@ -3,7 +3,6 @@ name: tour-builder description: | Designs guided learning tours through codebases, creating 5-15 pedagogical steps that teach project architecture and key concepts in logical order. -model: inherit --- # Tour Builder