fix(agent): skip subagent sessions during idle compaction (#6339)

Refs: NAN-304
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-20 22:26:49 +08:00
1 parent 14d9e6ed0d
commit 688976bcb9
2 files changed
+58 -1

No files matched your search

+6 -1
View File
@@ -71,7 +71,12 @@ class AutoCompact:
active_keys = set(active_session_keys)
for info in await self.sessions.state.list_sessions():
key = info.get("key", "")
if not key or is_dream_session(key) or key in self._archiving:
if (
not key
or is_dream_session(key)
or key.startswith("subagent:")
or key in self._archiving
):
continue
if key in active_keys or not self._is_expired(info.get("updated_at"), now):
continue