Commit 43ff3e8
authored
fix: prevent A2A on_message trigger infinite loop (#666)
- Fix 1 (P0): Add role filter to on_message query — only match
'assistant' and 'user' messages, exclude 'tool_call' and 'system'
- Fix 2 (P1): Exclude trigger internal sessions (source_channel='trigger')
from on_message message scanning
- Fix 3 (P1): Add per-agent on_message hourly rate limiter (30/hr cap)
with auto-disable and warning log
- Fix 4 (P2): Default max_fires=100 and expires_at=7d for on_message
triggers created via set_trigger tool
- Cleanup: Remove unused MAX_AGENT_CHAIN_DEPTH dead code1 parent aa83f60 commit 43ff3e8
3 files changed
Lines changed: 48 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8396 | 8396 | | |
8397 | 8397 | | |
8398 | 8398 | | |
| 8399 | + | |
| 8400 | + | |
| 8401 | + | |
| 8402 | + | |
| 8403 | + | |
| 8404 | + | |
8399 | 8405 | | |
8400 | 8406 | | |
8401 | 8407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
| |||
118 | 131 | | |
119 | 132 | | |
120 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
121 | 156 | | |
122 | 157 | | |
123 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
373 | 379 | | |
374 | 380 | | |
375 | 381 | | |
| |||
0 commit comments