Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Feat: Interactive mode also makes human need to `submit`

Kilian Lieretbe954d47a3fe
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index 6463932a..2fa07dfe 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -1261,6 +1261,11 @@ class DefaultAgent(AbstractAgent):
self.logger.info("Detected ^D - switching back to AI mode")
self.human_step_out()
continue
+ if interactive and step_output.done and not isinstance(self.model, HumanModel):
+ # Human has to submit the solution
+ self.logger.info("Robot is done! Please submit the solution.")
+ self.human_step_in()
+ step_output.done = False
self._chook.on_run_done(trajectory=self.trajectory, info=self.info)
self.logger.info("Trajectory saved to %s", self.traj_path)