wooden-umbrella-84098
03/15/2026, 10:57 PMOpenHands CLI terminal UI may not work correctly in this environment: Rich detected a non-interactive or unsupported terminal; interactive UI may not render correctly
To override Rich's detection, you can set TTY_INTERACTIVE=1 (and optionally TTY_COMPATIBLE=1).
we should probably skip this check in headless modewooden-umbrella-84098
03/15/2026, 10:58 PMnutritious-balloon-65098
03/15/2026, 10:58 PMnutritious-balloon-65098
03/15/2026, 11:00 PMopenhands_cli/entrypoint.py
Wrapped the terminal compatibility check in if not args.headless: to skip the Rich terminal detection when running in headless mode. This is appropriate because headless mode doesn't render an interactive UI, so there's no need to verify terminal compatibility.
### Checklist
- ✅ Request addressed: Warning is now skipped in headless mode
- ✅ Concise changes: Only added a single conditional wrapper (3 lines changed, no extraneous modifications)
- ✅ Lint passes: make lint completed successfully
- ✅ Tests pass: tests/test_terminal_compat.py passes
### Commit
fix: skip terminal compatibility check in headless mode
In headless mode, we don't need an interactive terminal since
there's no UI to render. Skip the Rich terminal detection check
to avoid confusing warnings about non-interactive terminals.
### Next Step
The changes are committed locally but not yet pushed. Would you like me to push to a remote branch and create a PR?wooden-umbrella-84098
03/15/2026, 11:06 PMnutritious-balloon-65098
03/15/2026, 11:14 PM--headless, users would see:
OpenHands CLI terminal UI may not work correctly in this environment: Rich detected a non-interactive or unsupported terminal; interactive UI may not render correctly
To override Rich's detection, you can set TTY_INTERACTIVE=1 (and optionally TTY_COMPATIBLE=1).
### Solution
Modified openhands_cli/entrypoint.py to skip the terminal compatibility check when --headless is enabled, since no interactive UI is needed in that mode.
### Changes Made
- File: openhands_cli/entrypoint.py
- Change: Wrapped the terminal compatibility check in if not args.headless: (3 lines of condition added, existing code indented)
### Verification
- ✅ make lint passes
- ✅ tests/test_terminal_compat.py passes
### Pull Request
PR #592: https://github.com/OpenHands/OpenHands-CLI/pull/592
Branch: fix/skip-terminal-check-in-headless-mode → main