ShouldReportRecoveryFailure returns true exactly once per recovery-failure streak — when a toolset that was previously started and working fails to restart (e.g. because the server revoked the OAuth token in the background). Unlike ShouldReportFailure (which fires for both initial and recovery fail
()
| 254 | // (those are silent pending prompts and the dialog appears naturally on |
| 255 | // the first interactive turn). |
| 256 | func (s *StartableToolSet) ShouldReportRecoveryFailure() bool { |
| 257 | s.mu.Lock() |
| 258 | defer s.mu.Unlock() |
| 259 | return s.recoveryStreak.shouldReport() |
| 260 | } |
| 261 | |
| 262 | // Unwrap returns the underlying ToolSet. |
| 263 | func (s *StartableToolSet) Unwrap() ToolSet { |