Commit 6f9fdd1
committed
fix(session): restore subagent mode from messages
Restore the mode recorded in session message history without validating it against the visible primary-agent list. Hidden subagents are intentionally omitted from that list, but existing session messages can still record them as the active mode; filtering restored modes left state.current_mode stuck on a stale primary agent, affecting both UI display and subsequent message routing.1 parent 3798e7f commit 6f9fdd1
2 files changed
Lines changed: 3 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 177 | + | |
181 | 178 | | |
182 | 179 | | |
183 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
| |||
163 | 161 | | |
164 | 162 | | |
165 | 163 | | |
166 | | - | |
167 | | - | |
168 | 164 | | |
169 | 165 | | |
170 | | - | |
| 166 | + | |
171 | 167 | | |
172 | 168 | | |
173 | 169 | | |
174 | | - | |
175 | | - | |
176 | 170 | | |
177 | 171 | | |
178 | 172 | | |
| |||
188 | 182 | | |
189 | 183 | | |
190 | 184 | | |
191 | | - | |
192 | | - | |
193 | | - | |
| 185 | + | |
194 | 186 | | |
195 | 187 | | |
0 commit comments