mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 18:20:22 +00:00
fix: ignore stale store ownership in session child lists
This commit is contained in:
@@ -277,9 +277,18 @@ function resolveChildSessionKeys(
|
||||
}
|
||||
const spawnedBy = entry.spawnedBy?.trim();
|
||||
const parentSessionKey = entry.parentSessionKey?.trim();
|
||||
if (spawnedBy === controllerSessionKey || parentSessionKey === controllerSessionKey) {
|
||||
childSessionKeys.add(key);
|
||||
if (spawnedBy !== controllerSessionKey && parentSessionKey !== controllerSessionKey) {
|
||||
continue;
|
||||
}
|
||||
const latest = getLatestSubagentRunByChildSessionKey(key);
|
||||
if (latest) {
|
||||
const latestControllerSessionKey =
|
||||
latest.controllerSessionKey?.trim() || latest.requesterSessionKey?.trim();
|
||||
if (latestControllerSessionKey !== controllerSessionKey) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
childSessionKeys.add(key);
|
||||
}
|
||||
const childSessions = Array.from(childSessionKeys);
|
||||
return childSessions.length > 0 ? childSessions : undefined;
|
||||
|
||||
Reference in New Issue
Block a user