Skip to content

Your lightweight open-source personal agent.

fix(cli): respect sys.stdout.isatty() in commands.py

wood3n2e419f9ba27e
diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.py
index 7892df0ee..cfa681b75 100644
--- a/nanobot/cli/commands.py
+++ b/nanobot/cli/commands.py
@@ -145,7 +145,7 @@ def _make_console() -> Console:
def _render_interactive_ansi(render_fn) -> str:
"""Render Rich output to ANSI so prompt_toolkit can print it safely."""
ansi_console = Console(
- force_terminal=True,
+ force_terminal=sys.stdout.isatty(),
color_system=console.color_system or "standard",
width=console.width,
)