Windows terminal flickering when using React/Ink TUI

Author: infi-oneCreated Jul 13, 2026Updated Jul 13, 2026

Description

When running oh in interactive mode on Windows, the entire terminal screen flickers continuously during model processing — even when there is no new text being output. The flickering occurs on both Git Bash and Windows Terminal, with Windows Terminal actually being worse.

Root Cause

The interactive mode uses a React/Ink TUI (Node.js frontend, found in openharness/_frontend/) that:

  1. Renders at every state change — every model token, tool execution event, and progress update triggers a full-screen re-render via Ink/React.
  2. No idle pause — the render loop runs continuously even when no new content is arriving (e.g., while waiting for the model to generate the next token, the spinner animation keeps redrawing).
  3. Windows terminal ANSI handling — Windows terminals (Git Bash, Windows Terminal) handle Node.js TUI ANSI escape sequences poorly, causing visible flicker.

The --print / -p flag works fine because it uses pure text streaming without the React TUI.

Environment

  • OS: Windows 10.0.26200
  • Shell: Git Bash (bash.exe), also tested on Windows Terminal
  • OpenHarness version: 0.1.9
  • Python: 3.14.6

Steps to Reproduce

  1. Run oh in interactive mode on Windows
  2. Enter any prompt
  3. Observe continuous screen flickering during model response generation

Expected Behavior

Smooth terminal output without flickering, similar to the --print mode.

Suggested Fix

Add a --no-tui or --raw flag to the interactive mode that uses the simple OutputRenderer (from openharness/ui/output.py) instead of the React/Ink frontend. This would give users on terminals with poor TUI support a flicker-free interactive experience.

Affected files:

  • openharness/ui/react_launcher.py — entry point for React TUI
  • openharness/ui/app.pyrun_repl() vs run_print_mode() dispatch
  • openharness/cli.py — CLI argument parsing

Workaround

Use oh -p "your prompt" for one-shot queries, which bypasses the TUI entirely.