Repository navigation
Commit 06a20aa
fix(server): held queues release agent and scheduled messages once the thread completes a run
A provider failure, a restart or a stop holds a thread's queue until someone
resumes it or sends a client message. Threads fed by agents, MCP tools or
scheduled tasks never get either, so every message that arrived while they
were busy stayed held forever (the issue triager held 165 issue dispatches,
oldest a day old) while messages that found the thread idle ran past them.
A hold now waits only for messages a person wrote. When a run on the thread
completes, held messages from agents, the server or scheduled tasks are
released and run in order. A run that completes after a stop request releases
nothing, and held user messages still wait for the user.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 44d508f commit 06a20aa
4 files changed
Lines changed: 351 additions & 15 deletions
File tree
- apps/server/src/orchestration-v2
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
744 | 758 | | |
745 | 759 | | |
746 | 760 | | |
| |||
2195 | 2209 | | |
2196 | 2210 | | |
2197 | 2211 | | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
2198 | 2258 | | |
2199 | 2259 | | |
2200 | 2260 | | |
| |||
5539 | 5599 | | |
5540 | 5600 | | |
5541 | 5601 | | |
5542 | | - | |
5543 | | - | |
5544 | | - | |
5545 | | - | |
5546 | | - | |
5547 | | - | |
5548 | | - | |
5549 | | - | |
5550 | | - | |
| 5602 | + | |
| 5603 | + | |
5551 | 5604 | | |
5552 | 5605 | | |
5553 | 5606 | | |
| |||
13083 | 13136 | | |
13084 | 13137 | | |
13085 | 13138 | | |
13086 | | - | |
13087 | | - | |
13088 | | - | |
13089 | | - | |
| 13139 | + | |
| 13140 | + | |
| 13141 | + | |
| 13142 | + | |
| 13143 | + | |
| 13144 | + | |
| 13145 | + | |
| 13146 | + | |
| 13147 | + | |
| 13148 | + | |
| 13149 | + | |
13090 | 13150 | | |
13091 | 13151 | | |
13092 | 13152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| |||
5183 | 5186 | | |
5184 | 5187 | | |
5185 | 5188 | | |
| 5189 | + | |
| 5190 | + | |
| 5191 | + | |
| 5192 | + | |
| 5193 | + | |
| 5194 | + | |
| 5195 | + | |
| 5196 | + | |
| 5197 | + | |
| 5198 | + | |
| 5199 | + | |
5186 | 5200 | | |
5187 | 5201 | | |
5188 | 5202 | | |
| |||
6899 | 6913 | | |
6900 | 6914 | | |
6901 | 6915 | | |
| 6916 | + | |
6902 | 6917 | | |
6903 | 6918 | | |
6904 | 6919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
0 commit comments