Files
agent-harness/agent-planning/tools/shell.py
2026-07-19 20:13:54 +02:00

13 lines
334 B
Python

import subprocess
def run_bash(command: str) -> str:
"""Run a bash command and return its output."""
result = subprocess.run(
command, shell=True, text=True, capture_output=True
)
output = result.stdout
if result.stderr:
output += f"\nSTDERR:\n{result.stderr}"
return output or "(no output)"