Commit 429d29e
committed
fix(agents,gateway): three subagent announce delivery failures in loopback token-auth setups
Rebased onto current main. Three narrow fixes for subagent completion announces
failing to deliver over loopback gateway-client + token auth:
- Fix 1 (gateway/call.ts): add an explicit `requireDeviceIdentity` opt-in so
subagent completion calls retain device identity for operator-scope checks,
instead of inferring it from the presence of scopes (which also fired for
ordinary direct-local shared-token calls). Narrows the guard per review.
- Fix 2 (embedded-agent-runner): after the sessions-yield abort-settle soft
timeout, keep waiting (bounded by a hard cap) for the session file lock to
release so the next turn does not hit a stale lock — without blocking forever
if the settle itself stalls.
- Fix 3 (embedded-agent-runner): also strip the sessions_yield context marker
during abort cleanup so a subsequent announce re-run does not re-yield and get
rejected as "did not produce a visible reply".
Fixes #77807.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>1 parent 9826acd commit 429d29e
4 files changed
Lines changed: 82 additions & 1 deletion
File tree
- src
- agents
- embedded-agent-runner/run
- gateway
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
50 | 75 | | |
51 | 76 | | |
52 | 77 | | |
| |||
193 | 218 | | |
194 | 219 | | |
195 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
196 | 234 | | |
197 | 235 | | |
198 | 236 | | |
| |||
238 | 276 | | |
239 | 277 | | |
240 | 278 | | |
241 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
242 | 282 | | |
243 | 283 | | |
244 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
230 | 235 | | |
231 | 236 | | |
232 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1023 | 1023 | | |
1024 | 1024 | | |
1025 | 1025 | | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
1026 | 1042 | | |
1027 | 1043 | | |
1028 | 1044 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
94 | 104 | | |
95 | 105 | | |
96 | 106 | | |
| |||
493 | 503 | | |
494 | 504 | | |
495 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
496 | 516 | | |
497 | 517 | | |
498 | 518 | | |
| |||
0 commit comments