Symptom
crewai run cancels the live TUI when an agent's streamed text contains a literal [...]. The traceback is TypeError: Object of type ellipsis is not JSON serializable.
Evidence what you'll see
- The isolated call is
_format_json_in_text("pandas,[...]")fromcrewai_cli.crew_run_tui, and it raises thatTypeError. - The crash is in
_tick→_render_main_contentatcrew_run_tui.pyline 1198. - The crew's LLM and tool calls keep going; only the terminal renderer dies and takes the session down.
Why it happens
_format_json_in_text() scans streamed text for bracketed spans and passes each candidate to _try_parse_structured(). After json.loads fails, ast.literal_eval("[...]") returns [Ellipsis], which passes isinstance(obj, (dict, list)). json.dumps([Ellipsis]) then raises.
Affected versions
crewai 1.15.21 (CLI and library, from PyPI), Python 3.12.10, macOS Tahoe.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
_format_json_in_text("pandas,[...]")returns the original text and does not raiseTypeError: Object of type ellipsis is not JSON serializable.crewai runthen finishes the session.
If it still fails
- Tag
1.15.21does not contain pull request 7435. Stay on1.15.22or later. - The pull request also covers other literal-evaluable but unserializable values such as
{'a': ...}and[1+2j].
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it