Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions run_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3087,6 +3087,17 @@ def close(self) -> None:
except Exception:
pass

# 6. Free conversation history. Mirrors _release_evicted_agent_soft's
# soft-eviction clear — close() is the hard teardown for true session
# boundaries (/new, /reset, session expiry), so the message list won't
# be reused. Drops the reference proactively rather than waiting for
# the agent object itself to be collected, which matters when a caller
# still holds the closed agent (e.g. a draining background task).
try:
self._session_messages = []
except Exception:
pass

def _hydrate_todo_store(self, history: List[Dict[str, Any]]) -> None:
"""
Recover todo state from conversation history.
Expand Down
Loading