Skip to content

Commit 42c080f

Browse files
authored
clean todolist on the new run.
1 parent 4139e5c commit 42c080f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

python_agent_harness/tui.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,10 @@ def _start_agent(
10091009
self.round_user_text = text
10101010
self._round_times.append(time.time())
10111011
self._run_start = time.time()
1012+
# A new top-level run starts here: drop any todo list left over
1013+
# from a previous run so a finished task's todos don't stay
1014+
# pinned into the next task.
1015+
self.session.clear_todos()
10121016
# A new top-level run starts here: invalidate any worker still
10131017
# unwinding from a previous run — from this point on it is stale
10141018
# and must never touch shared state. Bump before clearing the

0 commit comments

Comments
 (0)