diff --git a/CHANGELOG.md b/CHANGELOG.md index bedc878..561bef3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improve ripgrep tool status output. - Added ask_human tool to allow human operator to answer questions asked by the agent. - Handle keyboard interrupt (ctrl-c.) +- Disable PAGERs for shell commands so agent can work autonomously. ## [0.6.4] - 2024-12-19 diff --git a/ra_aid/proc/interactive.py b/ra_aid/proc/interactive.py index eab81e5..365d130 100644 --- a/ra_aid/proc/interactive.py +++ b/ra_aid/proc/interactive.py @@ -52,6 +52,10 @@ def run_interactive_command(cmd: List[str]) -> Tuple[bytes, int]: os.remove(path) try: + # Disable pagers by setting environment variables + os.environ['GIT_PAGER'] = '' + os.environ['PAGER'] = '' + # Run command with script for TTY and output capture os.system(f"script -q -c {shlex.quote(shell_cmd)} {shlex.quote(output_path)}")