From bdf6339d37464545e26f67736a6f29c6b1048ddc Mon Sep 17 00:00:00 2001 From: philipph-askui Date: Fri, 29 May 2026 08:51:31 +0200 Subject: [PATCH 1/2] fix: add auto-conversion of process_id param to int, to prevent tool error when agent calls it with str --- .../experimental/window_management/list_process_windows.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/askui/tools/store/computer/experimental/window_management/list_process_windows.py b/src/askui/tools/store/computer/experimental/window_management/list_process_windows.py index 850c8dcc..f5b3888d 100644 --- a/src/askui/tools/store/computer/experimental/window_management/list_process_windows.py +++ b/src/askui/tools/store/computer/experimental/window_management/list_process_windows.py @@ -46,6 +46,7 @@ def __init__(self, agent_os: AgentOs | None = None) -> None: ) def __call__(self, process_id: int) -> str: + process_id = int(process_id) get_window_list_result = self.agent_os.get_window_list(process_id) return ( f"The Process ID: {process_id} has the" From f2ea887cbd96bce395160beea4a2c86c27a982b2 Mon Sep 17 00:00:00 2001 From: philipph-askui Date: Fri, 29 May 2026 09:47:44 +0200 Subject: [PATCH 2/2] add explanation for explicit conversion --- .../experimental/window_management/list_process_windows.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/askui/tools/store/computer/experimental/window_management/list_process_windows.py b/src/askui/tools/store/computer/experimental/window_management/list_process_windows.py index f5b3888d..f114ec87 100644 --- a/src/askui/tools/store/computer/experimental/window_management/list_process_windows.py +++ b/src/askui/tools/store/computer/experimental/window_management/list_process_windows.py @@ -46,6 +46,9 @@ def __init__(self, agent_os: AgentOs | None = None) -> None: ) def __call__(self, process_id: int) -> str: + # the agent occassionally calls this tool with a string i/o an int + # this would lead to a tool error. to prevent this, we will convert to int + # manually here process_id = int(process_id) get_window_list_result = self.agent_os.get_window_list(process_id) return (