Skip to content

Commit 74a4c8b

Browse files
committed
fix bug of abnormal exit for BrowserUseTool
1 parent e6e31a2 commit 74a4c8b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/agent/manus.py

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Any
2+
13
from pydantic import Field
24

35
from app.agent.toolcall import ToolCallAgent
@@ -34,3 +36,7 @@ class Manus(ToolCallAgent):
3436
)
3537

3638
max_steps: int = 20
39+
40+
async def _handle_special_tool(self, name: str, result: Any, **kwargs):
41+
await self.available_tools.get_tool(BrowserUseTool().name).cleanup()
42+
await super()._handle_special_tool(name, result, **kwargs)

0 commit comments

Comments
 (0)