File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2315,6 +2315,19 @@ def test_find_session_by_title(self):
23152315 self .assertEqual (Tui ._find_session_by_title ("fix bugs" ), dash )
23162316 self .assertIsNone (Tui ._find_session_by_title ("nothing here" ))
23172317
2318+ def test_start_agent_clears_todos (self ):
2319+ """A new top-level run drops any todo list left over from a
2320+ previous run so a finished task's todos don't stay pinned into
2321+ the next task."""
2322+ tui , _ = make_tui ()
2323+ self .assertTrue (tui .session .todos ) # make_tui seeds a todo list
2324+ with (
2325+ mock .patch .object (tui , "_run_agent" ),
2326+ mock .patch .object (tui , "_run_live" , return_value = False ),
2327+ ):
2328+ tui ._start_agent ("next task" )
2329+ self .assertEqual (tui .session .todos , [])
2330+
23182331
23192332if __name__ == "__main__" :
23202333 unittest .main ()
You can’t perform that action at this time.
0 commit comments