Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ def do_update_working_checkpoint(self, args, response):
return StepOutcome({"result": "working key_info updated"}, next_prompt=next_prompt)

def _retry_or_exit(self, prompt):
self._empty_ct = getattr(self, '_empty_ct', 0) + 1
consecutive = getattr(self, '_empty_turn', -1) == self.current_turn - 1
self._empty_ct = getattr(self, '_empty_ct', 0) + 1 if consecutive else 1
self._empty_turn = self.current_turn
if self._empty_ct >= 3: return StepOutcome({}, should_exit=True)
return StepOutcome({}, next_prompt=prompt)

Expand Down