fix: ensure tmux capture-pane gets full output with -S - -E - flags

This commit is contained in:
marko-kraemer 2025-05-20 15:31:50 +02:00
parent 714a70c822
commit e83e22ef5e
1 changed files with 3 additions and 3 deletions

View File

@ -154,7 +154,7 @@ class SandboxShellTool(SandboxToolsBase):
break
# Get current output and check for common completion indicators
output_result = await self._execute_raw_command(f"tmux capture-pane -t {session_name} -p")
output_result = await self._execute_raw_command(f"tmux capture-pane -t {session_name} -p -S - -E -")
current_output = output_result.get("output", "")
# Check for prompt indicators that suggest command completion
@ -164,7 +164,7 @@ class SandboxShellTool(SandboxToolsBase):
break
# Capture final output
output_result = await self._execute_raw_command(f"tmux capture-pane -t {session_name} -p")
output_result = await self._execute_raw_command(f"tmux capture-pane -t {session_name} -p -S - -E -")
final_output = output_result.get("output", "")
# Kill the session after capture
@ -274,7 +274,7 @@ class SandboxShellTool(SandboxToolsBase):
return self.fail_response(f"Tmux session '{session_name}' does not exist.")
# Get output from tmux pane
output_result = await self._execute_raw_command(f"tmux capture-pane -t {session_name} -p")
output_result = await self._execute_raw_command(f"tmux capture-pane -t {session_name} -p -S - -E -")
output = output_result.get("output", "")
# Kill session if requested