Problem
crates/stella-tools/src/subagent.rs:257 sets agent_id: slug(description) — a pure function of the model-supplied description. Two siblings described 'research X' / 'research X' get the same id; with PR #1836 their SubAgent::Started/Finished event pairs interleave under one id on the parent stream, so the TUI renders indistinguishable rows (model.rs:845-885) and any consumer that pairs by agent_id mis-correlates. Thread names collide too (stella-cli/src/subagent.rs:358).
Fix
Suffix an ordinal (research-x, research-x-2) minted per turn/dispatch group, deterministic given call order (no randomness — replay/invariant 7 discipline). Update the thread name the same way.
Verify
Witness: two spawns with identical descriptions in one step carry distinct agent_ids on their Started events.
Constraints
Land after PR #1836 (same files).
Problem
crates/stella-tools/src/subagent.rs:257setsagent_id: slug(description)— a pure function of the model-supplied description. Two siblings described 'research X' / 'research X' get the same id; with PR #1836 theirSubAgent::Started/Finishedevent pairs interleave under one id on the parent stream, so the TUI renders indistinguishable rows (model.rs:845-885) and any consumer that pairs by agent_id mis-correlates. Thread names collide too (stella-cli/src/subagent.rs:358).Fix
Suffix an ordinal (
research-x,research-x-2) minted per turn/dispatch group, deterministic given call order (no randomness — replay/invariant 7 discipline). Update the thread name the same way.Verify
Witness: two spawns with identical descriptions in one step carry distinct agent_ids on their Started events.
Constraints
Land after PR #1836 (same files).