Why Subagent Model Configuration Doesn't Take Effect in AI Coding Tools
This article explains why a subagent model setting can be saved without errors yet still fail to change routing behavior. It shows that the authorization allowlist is an admission control mechanism, not a default value, and that a missing agent options field causes the subagent to inherit the parent session model. It also covers why desktop and web builds mount subagent configuration on nested agent preset rows, how to collect evidence from config files, session events, projection caches, and plugin source code, and how to fix and verify the configuration in a new session.
1. Symptom: The Config Is Saved, but Behavior Doesn’t Change
In the plugin settings of a desktop AI coding tool, you assign a model to a subagent. The save succeeds with no errors. You restart the host, create a new session, and re-check the config file — everything looks correct. But when you ask the main agent to delegate to a subagent and have it report its own model, the answer is usually the parent session’s model name, or simply “I can’t confirm which model I’m using.”
Both answers are misleading. The first looks like the configuration never took effect; the second looks like the configuration was never read. In reality, either can happen even when the configuration is completely correct.
Three factors make this issue hard to diagnose:
- The write succeeds: the setting is visible in the plugin UI and present in the config file, with no “unsaved” warning.
- The events are complete: the session event stream does record the subagent’s model selection policy, and the content looks correct, which rules out the “config was never read” hypothesis.
- Self-reporting is unreliable: a running subagent typically has no access to its own routing information, so reporting the parent model name or “I can’t confirm” is normal behavior.
The conclusion is clear: you cannot use a subagent’s self-description to judge whether routing took effect. You must rely on the host-side config parsing result and the session events.
2. The Short Answer
The authorization allowlist is not a default value. The allowlist is only consulted when a routing field is explicitly passed in; what actually determines a subagent’s default routing is a separate set of agent options fields. If that field is missing, the subagent inherits the parent session model. In addition, desktop and web builds attach subagent configuration to a nested row under the agent preset, so an identically named setting at the host level does not take effect — and does not raise an error.
3. The Full Mechanism Chain
Broken down, the model decision for a single subagent call goes through roughly four steps:
- Call initiation: the main agent requests a delegation, possibly with an explicit routing field, possibly without one.
- Allowlist validation: only when an explicit routing field is present is the authorization list used to decide whether the model is permitted. A failed check produces an error or a fallback; a passed check adopts the explicit value.
- Default routing resolution: with no explicit field, the default model is read from the agent options. If that field is missing, it falls back to the parent session model.
- Runtime injection: the resolved result is written into the subagent’s runtime context. Note that what gets injected is the routing result; this does not guarantee the subagent “knows” which model it is using.
The key is the separation between steps 2 and 3: the allowlist is admission control; the agent options are the default value. Configuring the former as if it were the latter is the most common root cause of this class of problem.
4. Evidence Gathering, Ordered by Strength
Gather evidence from easiest to hardest, and from authoritative to inferred:
- Config file layer: confirm the target field actually exists, rather than confirming only the allowlist field.
- Session event layer: inspect the recorded subagent model selection policy event to determine whether a value was passed explicitly or the default was used.
- Projection cache layer: the UI renders from a projection result, so when the cache is stale the UI may disagree with disk; force a refresh before drawing conclusions.
- Source code layer: treat the plugin source inside the host installation package as authoritative, and check the field read order and fallback branches item by item.
- Label inferences separately: anything that cannot be proven directly by the first four items should be explicitly marked as an inference, to avoid contaminating the conclusion.
A practical decision table:
| Symptom | More likely cause |
|---|---|
| Explicit routing field present in the event | The caller passed it explicitly; the allowlist applies |
| No explicit field in the event and the parent model is used | The default routing field is missing |
| UI shows it as configured but the event doesn’t change | The config was written to a level that doesn’t take effect |
5. Fix
The fix has three steps, and the order cannot be reversed:
- Add the missing default routing field: explicitly declare the subagent’s default model in the agent options, not just the allowlist.
- Correct the config level: write the configuration to the nested row under the agent preset, not to the identically named row at the host level.
- Verify with a new session: after the change you must create a new session, because the old session’s parsing result is already cached.
Illustrative config structure (field names are generalized):
{"agentPreset": {"id": "subagent-default","rows": [{"agentOptions": { "model": "<target model identifier>" },"allowedModels": ["<target model identifier>"]}]}}
6. Patch Targets and Coverage
Four common pitfalls:
- Level mismatch: host-level configuration doesn’t take effect, with no warning.
- Patching by identifier hits the wrong target: when multiple presets share the same name, matching by id alone may modify the wrong object, so validate the parent path as well.
- Changing only the allowlist: admission control and default value get conflated, and behavior stays the same.
- Reusing an old session to verify: you read a cached result and wrongly conclude the fix didn’t work.
On coverage, desktop and web builds differ in where configuration is mounted, so when migrating configuration across the two you need to re-place it rather than copy it wholesale.
7. How to Verify It Really Took Effect
Don’t ask the subagent “what model are you.” Use three pieces of objective evidence instead:
- After creating a new session, check whether the model selection policy event contains the expected default routing.
- Introduce an explicit parameter in an event and confirm the allowlist validation path is triggered.
- Run a reverse check with a model that is not on the allowlist, and confirm it is rejected or falls back.
Two additional advanced traps:
- Reasoning effort reset across routing changes: when switching routes, some reasoning effort parameters are reset to defaults, which shows up as “the model is right but the behavior style changed.”
- Different fallbacks for context window and max output: the two have different fallback strategies, and an insufficient window may truncate rather than error, so check them separately.
8. Subagents vs. Forked Subagents
- Subagent: an independent context, suited to parallel, disposable exploration tasks.
- Forked subagent: inherits part of the parent context, suited to tasks that need to continue the current reasoning chain.
Selection rule: choose the former when you need isolation and parallelism, the latter when you need context continuity. Mixing them leads to context bloat or missing information.
9. Troubleshooting Order Quick Reference
Config existence → config level → default routing field → session events → projection cache refresh → source code check → re-verify in a new session.
10. Summary
The essence of this class of problem is that two concepts — admission control and default value — get mixed up, compounded by silent failures from multiple config mount points. Building the habit of “evidence from events and source code, verification in a new session” turns these invisible problems into engineering problems you can locate and reproduce.
