Commit 7cf5cc8
fix(agents): reconcile stale restart-aborted subagent runs instead of resurrecting them
restore reconciliation only treated a run as stale-unended when abortedLastRun
was not true, so restart-aborted runs were exempted from the shared liveness
policy and auto-recovered no matter how old. After long gateway downtime this
resurrected hours-old aborted subagent runs. Drop the exemption so the existing
isStaleUnendedSubagentRun window (2h or run timeout+grace) applies to aborted
runs too; fresh restart-aborted runs are not yet stale and still recover.
Fixes #90766
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>1 parent f05e987 commit 7cf5cc8
2 files changed
Lines changed: 53 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | 193 | | |
195 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
728 | 770 | | |
729 | 771 | | |
730 | 772 | | |
731 | 773 | | |
732 | 774 | | |
733 | | - | |
| 775 | + | |
734 | 776 | | |
735 | 777 | | |
736 | 778 | | |
737 | 779 | | |
738 | 780 | | |
739 | 781 | | |
740 | | - | |
741 | | - | |
| 782 | + | |
| 783 | + | |
742 | 784 | | |
743 | 785 | | |
744 | 786 | | |
| |||
748 | 790 | | |
749 | 791 | | |
750 | 792 | | |
751 | | - | |
| 793 | + | |
752 | 794 | | |
753 | | - | |
754 | | - | |
| 795 | + | |
| 796 | + | |
755 | 797 | | |
756 | 798 | | |
757 | 799 | | |
758 | 800 | | |
759 | 801 | | |
760 | 802 | | |
761 | 803 | | |
762 | | - | |
| 804 | + | |
763 | 805 | | |
764 | 806 | | |
765 | 807 | | |
| |||
0 commit comments