Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix: wait for killed process after shell timeout to prevent fd leaks
Nikolas de Horc86dbc9f45e4
diff --git a/nanobot/agent/tools/shell.py b/nanobot/agent/tools/shell.pyindex 18eff649c..ceac6b7bb 100644--- a/nanobot/agent/tools/shell.py+++ b/nanobot/agent/tools/shell.py@@ -81,6 +81,12 @@ class ExecTool(Tool):)except asyncio.TimeoutError:process.kill()+ # Wait for the process to fully terminate so pipes are+ # drained and file descriptors are released.+ try:+ await asyncio.wait_for(process.wait(), timeout=5.0)+ except asyncio.TimeoutError:+ passreturn f"Error: Command timed out after {self.timeout} seconds"output_parts = []