Skip to content

feat(conductor): inherit model selection when spawning subagents - #489

Closed
Kailigithub wants to merge 1 commit into
lsdefine:mainfrom
Kailigithub:feat/issue-456-subagent-model-inherit
Closed

feat(conductor): inherit model selection when spawning subagents#489
Kailigithub wants to merge 1 commit into
lsdefine:mainfrom
Kailigithub:feat/issue-456-subagent-model-inherit

Conversation

@Kailigithub

Copy link
Copy Markdown
Contributor

Summary

Subagents spawned by the conductor now inherit the conductor agent's current model selection instead of always defaulting to model index 0.

Problem

When the user switches models via /llms in the conductor session, spawned subagents still used model 0 (the default). This causes inconsistency between the conductor and subagent capabilities, costs, and fallback strategies.

Solution

Added a 3-line check in start_subagent(): if the conductor agent is initialized, call agent.next_llm(conductor_agent.llm_no) on the new subagent before starting its runner thread.

The guard if conductor_agent is not None ensures backward compatibility — if subagents are created before the conductor agent is ready, they still fall back to model 0.

Testing

  • python3 -m py_compile frontends/conductor.py — passes
  • Behavior verified: conductor_agent.llm_no is an integer attribute on GenericAgent instances, next_llm() accepts integers

Closes #456

…awning subagents

When a subagent is spawned via the conductor, it now inherits the
conductor agent's current model selection (llm_no) instead of always
defaulting to model index 0.

This ensures subagents use the same model as the main session, which
is the expected behavior when the user has switched models via /llms.
If the conductor agent hasn't been initialized yet, the subagent
falls back to the default model (index 0).

Closes lsdefine#456
@Kailigithub

Copy link
Copy Markdown
Contributor Author

Closing this PR — it's been CONFLICTING for 44 days with no review activity, and I don't want to leave stale work in the queue. The underlying change (subagent model inheritance via start_subagent()) is small and well-scoped; happy to reopen on a fresh branch rebased onto current main if the change is still wanted, otherwise the diff is preserved locally on branch feat/issue-456-subagent-model-inherit and can be cherry-picked at any time.

@Kailigithub Kailigithub closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: subagent 默认模型应继承当前窗口模型

1 participant