AgentFixboard

crewai run crashes the TUI when streamed text contains a literal [...]

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.

From GitHub

crewAIInc/crewAI

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
1.15.22
Last checked

Verified fix: PR #7435 merged on . Fixed in 1.15.22 (first published release whose tag contains the merge commit). Last checked .

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,[...]") from crewai_cli.crew_run_tui, and it raises that TypeError.
  • The crash is in _tick → _render_main_content at crew_run_tui.py line 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 raise TypeError: Object of type ellipsis is not JSON serializable. crewai run then finishes the session.

If it still fails

  • Tag 1.15.21 does not contain pull request 7435. Stay on 1.15.22 or 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