Skip to content

Commit 727658c

Browse files
codeQL fix
1 parent 63e2221 commit 727658c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/backend/v4/orchestration/human_approval_manager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ async def _complete(self, messages: list[Message]) -> Message:
132132
await asyncio.sleep(delay)
133133
continue
134134
raise
135+
# If we get here, all retry attempts have been exhausted without a successful response.
136+
raise RuntimeError(
137+
f"Agent failed to complete after {max_retries} attempts due to repeated errors."
138+
)
135139

136140
async def plan(self, magentic_context: MagenticContext) -> Any:
137141
"""

0 commit comments

Comments
 (0)