You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model router: unpinned agent-def delegations bypass the operator taxonomy — route defs that express no model intent #286
The semantic model router (ADR 0031/0042) is gated off for everyagent: delegation — maybeRouteModel returns early on args.Agent != "" under the precedence rule "the router fills the gap; it never overrides pinned intent." But a def with no model: key never pinned model intent — it pinned scope (prompt/catalog/hooks). Its model resolves via def.Model > --subagent-model > session model (internal/app/agentdefs.goresolveModel), so an unpinned def silently inherits the session model.
Impact (observed)
Two dev-pipeline sessions, same operator taxonomy (large → glm-5.2, medium → deepseek-v4-pro):
Kimi K3 session (2e4ccc75db19): the plain spec/QA review delegations routed to medium → deepseek-v4-pro, while the agent: software-architect / ux-reviewer / code-duplication-reviewer / library-reuse-reviewer delegations all inherited kimi-k3 — a def-based review panel gets zero routing.
GLM-5.2 session (a4ba66b5d9ae): the same agent: software-architect delegation inherited glm-5.2 and only looked routed.
The effective model of a specialist is an accident of which session model the user picked — the operator's routing taxonomy, written to control exactly this, never applies.
Design opening
The model: inherit sentinel already exists (builtinModelAliases), so absent-vs-inherit can carry different semantics with no new syntax:
absent model: → the def is routable: router > --subagent-model > session model;
The per-call agent+model factory (ADR 0035, buildAgentModelEngineFactory) rebuilds a specialist's scoped engine (catalog/prompt/hooks/memory) on an override model. Routing an unpinned def is the same seam driven by the router instead of an explicit arg. Needs: composition telling the Subagent tool which def names are unpinned (e.g. a WithRoutableAgents(set) option), maybeRouteModel consulting it, and the routed model threading through agentModelFactory — with the existing inline-MCP decline (fail-soft inherit) and the writable-specialist path (read-write+agent) staying unrouted.
At minimum, if the design is rejected: document loudly that unpinned defs inherit the session model and are never routed, and recommend pinning model: in defs.
Activity