.86217969640660:06c6a084a8bfc89a4056d4e11182afef_69859519996d44662aa1452a.69859581996d44662aa145ac.69859581e025b4dd455ac9c6:Trae CN.T(2026/2/6 15:17:21)#372
Open
xzccreat wants to merge 2 commits intobytedance:mainfrom
Conversation
|
|
maharab549
pushed a commit
to maharab549/trae-agent
that referenced
this pull request
Mar 1, 2026
* feat: add i18n support and add Chinese * fix: resolve conflicts * Update en.json with cancle settings * Update zh.json with settngs cancle --------- Co-authored-by: johnny0120 <15564476+johnny0120@users.noreply.github.com> Co-authored-by: Willem Jiang <willem.jiang@gmail.com> Co-authored-by: Willem Jiang <143703838+willem-bd@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Rich MarkupError in CLI Error Handling
Problem
The Trae Agent CLI was crashing with
rich.errors.MarkupErrorwhen exception messages contained special characters like square brackets ([,]). This occurred because rich was trying to parse these characters as markup tags when printing error messages.Root Cause
In
trae_agent/cli.py, error messages were being printed using:When exception
econtained brackets, rich would try to parse them as markup, causing crashes like:MarkupError: closing tag '[/section]' doesn't match any open tagSolution
Added
markup=Falseparameter toconsole.print()calls when printingTextobjects containing exception messages:Changes Made
trae_agent/cli.pyconsole.print(error_text)was calledTesting
Verification
Run the provided test scripts:
Both should complete without errors, proving the fix is working correctly.
Backward Compatibility
This fix ensures the CLI remains stable when handling exceptions with special characters in their messages.