Repository navigation
Commit 358f94b
committed
fix(session): prevent concurrent prompt() from creating duplicate user messages
Two prompt() calls can hit the same session at the same time. Both
call createUserMessage() and the loop picks the wrong one, so
subagents end up running on the parent model instead of their own.
Added a Set to track active sessions and queue the second caller.
Fixes anomalyco#6636
Relates: anomalyco#11699, anomalyco#6928, anomalyco#87001 parent 802ccd3 commit 358f94b
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
159 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
160 | 176 | | |
161 | 177 | | |
162 | 178 | | |
| |||
0 commit comments