fix(browser): remove premature browser cleanup after subagent invocation (#24753)

This commit is contained in:
Gaurav
2026-04-07 05:17:31 +08:00
committed by GitHub
parent ad98294352
commit e116aa34f4
4 changed files with 56 additions and 11 deletions

View File

@@ -742,7 +742,7 @@ describe('BrowserAgentInvocation', () => {
);
});
it('should call cleanupBrowserAgent with correct params', async () => {
it('should not call cleanupBrowserAgent (cleanup is handled by BrowserManager.resetAll)', async () => {
const invocation = new BrowserAgentInvocation(
mockConfig,
mockParams,
@@ -750,11 +750,7 @@ describe('BrowserAgentInvocation', () => {
);
await invocation.execute(new AbortController().signal, vi.fn());
expect(cleanupBrowserAgent).toHaveBeenCalledWith(
expect.anything(),
mockConfig,
'persistent',
);
expect(cleanupBrowserAgent).not.toHaveBeenCalled();
});
});