fix: add exception handling to prevent agent loop crash
This commit is contained in:
1 parent
a1241ee68c
commit
a2acacd8f2
2 files changed
+7
No files matched your search
@@ -564,6 +564,10 @@ def gateway(
|
||||
)
|
||||
except KeyboardInterrupt:
|
||||
console.print("\nShutting down...")
|
||||
except Exception:
|
||||
import traceback
|
||||
console.print("\n[red]Error: Gateway crashed unexpectedly[/red]")
|
||||
console.print(traceback.format_exc())
|
||||
finally:
|
||||
await agent.close_mcp()
|
||||
heartbeat.stop()
|
||||
|
||||
Reference in new issue
Block a user