mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
feat: Add configurable stuck/loop detection (#11799)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: chuckbutkus <chuck@all-hands.dev>
This commit is contained in:
@@ -895,7 +895,7 @@ class AgentController:
|
||||
|
||||
# Synchronize spend across all llm services with the budget flag
|
||||
self.state_tracker.sync_budget_flag_with_metrics()
|
||||
if self._is_stuck():
|
||||
if self.agent.config.enable_stuck_detection and self._is_stuck():
|
||||
await self._react_to_exception(
|
||||
AgentStuckInLoopError('Agent got stuck in a loop')
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user