Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

fixbug: Werewolf game has ended, but the team is still running idle

yingfengdd8ff37c4228
diff --git a/metagpt/team.py b/metagpt/team.py
index cf8346259..2288f9748 100644
--- a/metagpt/team.py
+++ b/metagpt/team.py
@@ -126,6 +126,9 @@ class Team(BaseModel):
self.run_project(idea=idea, send_to=send_to)
while n_round > 0:
+ if self.env.is_idle:
+ logger.debug("All roles are idle.")
+ break
n_round -= 1
self._check_balance()
await self.env.run()