Repository navigation
[Bug] Agent Team roster reads model from a stale creation-time snapshot (offline teammates get the Lead's model)
#7054
Replies: 2 comments
|
Independent confirmation from a downstream shell (omnidsh) that composes Agent Teams, with a small addition that may narrow the fix. It reproduces exactly as describedA 9-member team, all teammates finished. The panel: The distinction worth pinning down: it is not a refresh lagThe roster does re-read on every call - for (const member of state.members) {
const live = this.ctx.agents.get(member.id);
const model = live?.options.model ?? root.options.model; // <- inactive => live is undefined
result.push({ ... member ..., model });
}So an inactive member does not fall back to a stale snapshot of itself - it falls back to the Lead's model, which is what makes the display actively misleading rather than merely out of date. Observed transition on the same member: while Independent evidence that the dispatch was correctWe wrap { "type": "subagent/descriptor",
"provider": "spawn",
"agentProvider": "tuanjie",
"agentModel": "codely-core",
"agentReasoningEffort": "high" }The panel showed the Lead's model for that same child. Two smaller observations
EnvironmentHappy to run any probe you want against this setup. |
|
@omnisurge Thanks for the independent repro and for narrowing it to the rendering path. I confirmed the same code path on dsh 0.1.6-alpha.2 / dsh-experimental-agent-team 0.1.6-alpha.2: On the fix: the per-member record in the projection carries Both smaller observations hold on this version as well: |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The Agent Team roster (
list_agents/ the header panel) reports a member'smodelfromAgent.options.model. That value is a creation-time snapshot, which produces two wrong rows:agent.optionsis filled once atagents.create()fromagentDefaultModel.currentSelection()(packages/api/session-controller). A later model switch only appends amodel/selectionsession event; it never rewritesagent.options. So the Lead keeps displaying the model that was current when the agent was created, even though every request uses the new one.live?.options.model ?? root.options.model. When a teammate becomesinactivethere is no live agent, so the fallback borrows the Lead's (possibly stale) model and the row changes.Environment
@deepseek-ai/dsh0.1.6-alpha.2 (npm, profileweb)@deepseek-ai/dsh-experimental-agent-team-profile,@deepseek-ai/dsh-experimental-agent-team-web-profileReproduction
agent.options.modeldiffers from the currentagent-default-modelselection.spawn_teammate({ name: "probe-model", description: "...", prompt: "reply ok" }).inactive.Observed
probe-model / teammate / running / model=deepseek-flashprobe-model / teammate / inactive / model=qwen3.8-flashlead / lead / running / model=qwen3.8-flashThe teammate really ran on
deepseek-flash(startContinuablepasses nomodel, so the child route is resolved fresh), but once it is unloaded the roster reports the Lead's staleqwen3.8-flash. Two teammates from an earlier run show the same flip.Expected
Code
packages/experimental/agent-team/src/roster.ts(builtlib/index.js):packages/api/session-controller/src/index.ts:Suggested fix
Resolve the displayed model from the live route (the session's latest
model/selection, oragentDefaultModel.currentSelection()), and omitmodelfor a teammate with no live agent instead of falling back toroot.options.model.All reactions