Sub-Agent Model Routing Configuration Guide: Why Your Sub-Agent Keeps Using the Parent Model

    This guide explains how to correctly configure model routing for sub-agents after the desktop release of an AI coding tool. It clarifies the difference between model allowlists and default routing, explains why restarting or recreating sessions won't fix the issue, covers nested configuration pitfalls in desktop and web interfaces, and provides a step-by-step troubleshooting approach, routing priority rules, and configuration governance recommendations.

    As AI coding tools evolve from single-conversation systems into multi-agent architectures, developers can let the main session handle task decomposition while different sub-agents take on code analysis, test generation, documentation, or issue localization. After the desktop version’s official release, many users want to assign different models to different sub-agents to balance response speed, reasoning capability, and resource consumption.

    However, a common failure mode looks like this: the configuration appears complete, but runtime behavior doesn’t match expectations at all. Users have filled in the model name in the sub-agent settings, restarted the app, created a new session, and re-saved the configuration, yet the sub-agent still uses the model from its parent session. This is usually not because the model is unavailable, nor because the configuration failed to save. It happens because two different concepts are being confused: “which models are allowed” versus “which model is used by default.”

    1. Two Different Concepts: An Allowlist Is Not a Default

    In a multi-agent system, model configuration typically includes at least two semantically distinct types of fields.

    The first is authorization scope, i.e., the model allowlist. It expresses:

    When the caller explicitly specifies a model, is the system allowed to use it?

    For example, a sub-agent’s selectable model set might look like:

    1. {
    2. "allowedModels": [
    3. "model-fast",
    4. "model-reasoning"
    5. ]
    6. }

    This configuration only shows that the two models are within the authorized scope; it does not mean the sub-agent will necessarily select either one at startup. An allowlist answers “can it be used?”, not “who is used by default?”

    The second is the default route: the model the system should select when the sub-agent does not explicitly specify one. For example:

    1. {
    2. "agentOptions": {
    3. "model": "model-reasoning"
    4. }
    5. }

    This answers “who is used when no explicit instruction is given?” Only when the default routing field is correctly set — and the model also satisfies the authorization conditions — will the sub-agent reliably use the intended model.

    The logic can be summarized as:

    1. Model explicitly specified
    2. └─> First check whether the model is in the allowlist
    3. ├─ Yes: execute the call
    4. └─ No: reject or fall back
    5. Model not explicitly specified
    6. └─> Look up the sub-agent's default route
    7. ├─ Configured: use the default model
    8. └─ Not configured: inherit the parent session's model or use the system default

    Therefore, filling in allowedModels alone does not change the sub-agent’s default model. If the call chain does not explicitly pass a model routing field, the system can naturally continue inheriting the parent session’s configuration.

    2. Why Restarting and Creating New Sessions Doesn’t Help

    When configuration doesn’t take effect, many users try restarting the desktop app, closing and reopening the project, creating a new session, and repeatedly confirming that the configuration was saved. These operations help with cache problems, but they cannot fix a missing piece in the configuration semantics.

    If the root cause is “only the allowlist was configured, with no default route,” then:

    1. Restarting won’t automatically add the missing field;
    2. A new session won’t change the default inheritance rule;
    3. Repeatedly saving the same field won’t affect a different configuration item;
    4. The sub-agent will continue inheriting the parent session’s model according to the existing priority.

    In other words, whether configuration takes effect must be judged on two levels:

    • Persistence level: has the configuration been written?
    • Routing level: does the runtime read the correct field?

    Most troubleshooting only verifies the first point without confirming the second. The UI showing “saved” does not mean the runtime will use that field. Especially when there are multiple layers of presets, nested agents, and inheritance, save success and routing hit are two independent issues.

    3. Nested Configuration Pitfalls in Desktop and Web Clients

    Another easily overlooked issue is that sub-agent configuration may not live under the host configuration row where it visually appears to be.

    In the desktop or web preset interface, the common hierarchy looks like:

    1. Agent preset
    2. ├── Main agent
    3. │ ├── Basic parameters
    4. │ └── Tool configuration
    5. └── Sub-agent
    6. ├── Basic parameters
    7. └── Tool configuration
    8. └── Sub-agent model routing

    The configuration that actually affects the sub-agent’s behavior lives in the nested entry corresponding to the “sub-agent,” not in the outermost row for the host agent. If you write the configuration at the host level, the interface may still save it successfully and the system may not raise an error, but the runtime reads a different copy of the configuration.

    This class of problem has three typical characteristics:

    1. The configuration interface shows no anomaly

    Fields can be filled in and the save button executes normally, so users easily conclude the configuration is complete. But the interface layer only edits data; it doesn’t guarantee that the data is mounted onto the correct runtime entity.

    2. Updating by identifier may hit the wrong object

    If the system allows updating configuration by id or a similar identifier, you must confirm that the identifier corresponds to the sub-agent instance — not to a same-named host agent, template node, or an outdated preset copy.

    When multiple levels exist, relying on a single short identifier can be ambiguous. A safer approach is to simultaneously confirm:

    • The agent type;
    • The parent preset;
    • The nested path;
    • Whether it is the currently enabled version;
    • Whether there are same-named or duplicate identifiers.

    3. Misconfiguration may not trigger an explicit error

    Configuration systems usually validate only field formats, not business semantics. For example, the system can confirm that model is a string, but it may not confirm that the field is located under the correct sub-agent node. Therefore, “no error” does not prove that “the model routing is configured correctly.”

    To avoid blind restarts and random changes, locate the problem in the following order.

    Step 1: Confirm the actual executor

    First determine who is actually making the model call:

    • The main agent;
    • A specific sub-agent;
    • A temporary agent spawned by a tool call;
    • An agent instance inherited from a preset.

    If you haven’t even confirmed the actual executor, subsequent changes may act on the wrong object.

    Step 2: Inspect the full configuration path

    Don’t just check whether a field exists; record its complete hierarchy. For example:

    1. Preset name
    2. / Sub-agent node
    3. / Tools and agent configuration
    4. / agentOptions
    5. / model

    Focus on confirming that the model routing field is inside the sub-agent node, not in the host node or a shared template node.

    Step 3: Check authorization and default routing separately

    You can build a simple checklist:

    Check item Question to answer
    Model allowlist Is the target model allowed to be called?
    Default route If no model is explicitly specified, is the target model selected?
    Explicit parameters Was a model field passed when the sub-agent was created?
    Inheritance Does the sub-agent inherit the parent session’s model by default?
    Configuration scope Is the field located in the sub-agent node that actually runs?
    Version status Is the current session using the latest preset?

    Only when all these conditions hold simultaneously is model selection predictable.

    Step 4: Verify with a minimal task

    Don’t test with a complex engineering task right away. Design a minimal experiment where the sub-agent performs one simple, identifiable piece of work, and observe in the run log:

    • Which agent was actually created;
    • Whether a model route was passed;
    • Whether a model fallback occurred;
    • Whether the sub-agent inherited the parent session’s configuration;
    • Whether the final model called matches expectations.

    The value of a minimal experiment is reducing variables. If multiple tools, multiple sub-agents, and multiple levels of callbacks are enabled at the same time, it’s hard to tell which layer overrode the configuration.

    5. Model Routing Priority Should Be Explicit

    A robust multi-agent system should clearly define model selection priority. A common ordering is:

    1. Explicit model for a single call
    2. >
    3. Sub-agent-specific default model
    4. >
    5. Agent preset default model
    6. >
    7. Parent session model
    8. >
    9. System-level default model

    Different implementations may differ, however, so don’t rely solely on intuition. Developers should confirm the actual priority through run logs or configuration documentation.

    Pay particular attention to the distinction between “explicit routing” and “default routing”:

    1. {
    2. "agentOptions": {
    3. "model": "model-fast"
    4. },
    5. "allowedModels": [
    6. "model-fast",
    7. "model-reasoning"
    8. ]
    9. }

    Here the sub-agent defaults to the fast model while remaining allowed to switch to the reasoning model for specific tasks. If only allowedModels is kept, the sub-agent may still inherit the parent session’s model; if the default model is not in the allowlist, the result may be rejection, fallback, or silent substitution.

    6. Recommendations for Configuration Governance

    From a long-term maintenance perspective, model configuration should not rely solely on manual operations in a graphical interface; an auditable configuration management approach should be established.

    1. Give fields explicit semantics

    Configuration names should distinguish:

    • allowedModels: the set of models allowed;
    • defaultModel or a similarly named field: the default model;
    • requestedModel: the model requested for a single call;
    • fallbackModel: the model used when the primary model is unavailable.

    Even if the actual field names differ, keep the semantics clear; don’t mix authorization, defaults, and fallbacks together.

    2. Perform structural validation after saving

    After saving, inspect the final configuration rather than only the UI prompt. Ideally, the system should offer a configuration preview or export capability so users can confirm:

    1. {
    2. "agent": {
    3. "type": "subagent",
    4. "agentOptions": {
    5. "model": "model-reasoning"
    6. },
    7. "allowedModels": [
    8. "model-reasoning"
    9. ]
    10. }
    11. }

    If the target field appears at the host node, or does not appear in the final configuration at all, the change was applied to the wrong object.

    3. Protect identifiers and nested paths

    Configuration update interfaces should display the object name, type, and full path, rather than only an easily duplicated short identifier. For automated patch operations, output a summary of the target object before and after the change to avoid modifying a same-named node by mistake.

    4. Record model fallback reasons

    When the target model is not on the allowlist, is unavailable, or the default route is missing, the system should explicitly log the fallback reason. Compared with “the task still ran but used a different model,” observability makes it much easier to detect hidden configuration errors.

    7. How to Evaluate the Real Value of the Desktop Release

    From a technical perspective, the value of the desktop release is not just a more complete interface or additional local interaction methods. What truly matters is whether it makes multi-agent configuration, model routing, tool invocation, and runtime state more transparent, stable, and verifiable.

    When evaluating such a product, focus on the following aspects:

    1. Clear configuration semantics: Are authorization lists, default models, and fallback models clearly differentiated?
    2. Manageable nested agents: Can users accurately locate the sub-agent’s real configuration location?
    3. Observable runtime state: Can users see the actual executor and the final model?
    4. Helpful error messages: Do errors indicate missing fields, incorrect paths, or permission mismatches?
    5. Portable configuration: Does it stay consistent across sessions, projects, and devices?
    6. Controllable fallback behavior: When something goes wrong, does the system silently switch, or clearly inform the user?
    7. Reliable automation: When updating via configuration patches or scripts, does it avoid hitting the wrong node?

    If these aspects are handled well, the desktop version becomes more than an interaction entry point — it can serve as a management center for multi-agent development workflows. Conversely, if the number of features increases while configuration layers remain opaque, default routes remain invisible, and errors go unreported, users will conclude that “the settings don’t work.”

    Conclusion

    In summary, a sub-agent always using the parent session’s model should first be treated as a model routing and configuration scope problem, not a simple caching issue. When troubleshooting, simultaneously verify the authorization allowlist, the default route, the nested configuration path, and runtime inheritance relationships. Only by establishing a clear configuration priority and verifying it through minimal experiments and run logs can you truly confirm that the model settings have taken effect.