Skip to content

fix: avoid Rich markup parsing for CLI errors - #423

Open
ekkoitac wants to merge 1 commit into
bytedance:mainfrom
ekkoitac:fix/issue-422-rich-markup-error
Open

fix: avoid Rich markup parsing for CLI errors#423
ekkoitac wants to merge 1 commit into
bytedance:mainfrom
ekkoitac:fix/issue-422-rich-markup-error

Conversation

@ekkoitac

@ekkoitac ekkoitac commented Jul 1, 2026

Copy link
Copy Markdown

Fixes #422

Summary

  • print Rich Text error messages as renderables instead of converting them through f-strings
  • print generated tracebacks with markup=False, so bracket-like exception text is shown literally
  • add a CLI regression test for an exception message containing [/'A', 1, /'B']

Validation

  • uv run --all-extras pytest tests/test_cli.py::TestCli::test_run_prints_markup_like_errors_without_rich_crash -q
  • uv run --all-extras pytest tests/test_cli.py -q
  • uv run --all-extras ruff check trae_agent/cli.py tests/test_cli.py
  • uv run --all-extras python -m py_compile trae_agent/cli.py tests/test_cli.py
  • make test (63 passed, 17 skipped; skipped tests require external Google, Ollama, or OpenRouter services)

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: CLI crashes with Rich MarkupError when error text contains bracket-like output

2 participants