Compare commits
6
Commits
main
..
known-good
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50e67a621a | ||
|
|
c5637b8cff | ||
|
|
ded5d4d8ed | ||
|
|
d5d6c76a93 | ||
|
|
79a0fd8ed0 | ||
|
|
206ab0943c |
+3
-11
@@ -378,7 +378,6 @@ class AgentLoop:
|
||||
)
|
||||
self._unified_session = unified_session
|
||||
self._running = False
|
||||
self._shutting_down = False
|
||||
self._mcp_servers = mcp_servers or {}
|
||||
self._mcp_stacks: dict[str, MCPConnection] = {}
|
||||
self._mcp_connecting = False
|
||||
@@ -1225,11 +1224,11 @@ class AgentLoop:
|
||||
# it into session history now makes it visible in the
|
||||
# next conversation turn.
|
||||
#
|
||||
# During gateway shutdown (self._shutting_down is True),
|
||||
# skip this so the pending markers survive and
|
||||
# During gateway shutdown (self._running is False), skip
|
||||
# this so the pending markers survive and
|
||||
# recover_stale_sessions() can notify the user and
|
||||
# re-trigger the interrupted turn on next startup.
|
||||
if not self._shutting_down:
|
||||
if self._running:
|
||||
try:
|
||||
key = self._effective_session_key(msg)
|
||||
session = self.sessions.get_or_create(key)
|
||||
@@ -1319,7 +1318,6 @@ class AgentLoop:
|
||||
def stop(self) -> None:
|
||||
"""Stop the agent loop."""
|
||||
self._running = False
|
||||
self._shutting_down = True
|
||||
logger.info("Agent loop stopping")
|
||||
|
||||
async def _process_message(
|
||||
@@ -2153,12 +2151,6 @@ class AgentLoop:
|
||||
sender_id=chat_id,
|
||||
chat_id=chat_id,
|
||||
content=last_user_msg["content"],
|
||||
# The message already exists in session history
|
||||
# (persisted before the crash); skip persisting it
|
||||
# again so recovery does not duplicate it.
|
||||
metadata={
|
||||
turn_continuation.SKIP_USER_PERSIST_META: True
|
||||
},
|
||||
)
|
||||
)
|
||||
logger.info(
|
||||
|
||||
Reference in New Issue
Block a user