improve max steps failure description (#1296)

This commit is contained in:
LawyZheng 2024-12-02 12:18:58 +08:00 committed by GitHub
parent 0b2252ddf7
commit 6c1b2a6328
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1960,8 +1960,9 @@ class ForgeAgent:
step=step,
page=page,
)
if not failure_reason:
failure_reason = f"Max steps per task ({max_steps_per_run}) exceeded"
failure_reason = (
f"Reached the maximum steps ({max_steps_per_run}). Possible failure reasons: {failure_reason}"
)
await self.update_task(
task,