fix(browser): require managed runtime ownership for tab cap cleanup

This commit is contained in:
pandego
2026-03-01 14:14:54 +01:00
committed by Peter Steinberger
parent 9b938f2bf6
commit 22ec577d80
2 changed files with 22 additions and 1 deletions

View File

@@ -139,7 +139,13 @@ function createProfileContext(
};
const enforceManagedTabLimit = async (keepTargetId: string): Promise<void> => {
if (profile.driver !== "openclaw" || !profile.cdpIsLoopback || state().resolved.attachOnly) {
const profileState = getProfileState();
if (
profile.driver !== "openclaw" ||
!profile.cdpIsLoopback ||
state().resolved.attachOnly ||
!profileState.running
) {
return;
}