Issue
It's probably something wrong in my configuration because I haven't seen anyone else reporting this, but whenever I use the TUI, I eventually, after probably twenty or thirty messages, run into this error and crash. So, my workaround has been using it in non-TUI mode, and I've found that this happens whether I use Claude 4.5, 4.6, Gemini 3, or Gemini 2 and a half as architect.
╭──────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────╮
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/worker.py:370 in _run │
│ │
│ 367 │ │ │ self.state = WorkerState.RUNNING │
│ 368 │ │ │ app.log.worker(self) │
│ 369 │ │ │ try: │
│ ❱ 370 │ │ │ │ self._result = await self.run() │
│ 371 │ │ │ except asyncio.CancelledError as error: │
│ 372 │ │ │ │ self.state = WorkerState.CANCELLED │
│ 373 │ │ │ │ self._error = error │
│ │
│ ╭───────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────────╮ │
│ │ app = TUI(title='TUI', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) │ │
│ │ error = MarkupError("closing tag '[/dim]' at position 52 doesn't match any open tag") │ │
│ │ self = │ │
│ │ worker_failed = WorkerFailed('Worker raised exception: MarkupError("closing tag '[/dim]' at position 52 doesn't match any open tag")') │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/worker.py:354 in run │
│ │
│ 351 │ │ Returns: │
│ 352 │ │ │ Return value of the work. │
│ 353 │ │ """ │
│ ❱ 354 │ │ return await ( │
│ 355 │ │ │ self._run_threaded() if self._thread_worker else self._run_async() │
│ 356 │ │ ) │
│ 357 │
│ │
│ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ self = │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/worker.py:341 in _run_async │
│ │
│ 338 │ │ ): │
│ 339 │ │ │ return await self._work() │
│ 340 │ │ elif inspect.isawaitable(self._work): │
│ ❱ 341 │ │ │ return await self._work │
│ 342 │ │ elif callable(self._work): │
│ 343 │ │ │ raise WorkerError("Request to run a non-async function as an async worker") │
│ 344 │ │ raise WorkerError("Unsupported attempt to run an async worker") │
│ │
│ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ self = │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/cecli/tui/app.py:504 in _stream_chunk │
│ │
│ 501 │ async def _stream_chunk(self, text: str): │
│ 502 │ │ """Stream a chunk to the current response (async helper).""" │
│ 503 │ │ output_container = self.query_one("#output", OutputContainer) │
│ ❱ 504 │ │ await output_container.stream_chunk(text) │
│ 505 │ │
│ 506 │ async def _end_response(self): │
│ 507 │ │ """End the current LLM response (async helper).""" │
│ │
│ ╭─────────────────────────────────────────── locals ────────────────────────────────────────────╮ │
│ │ output_container = OutputContainer(id='output') │ │
│ │ self = TUI(title='TUI', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) │ │
│ │ text = '/dim]"\n )' │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/cecli/tui/widgets/output.py:114 in stream_chunk │
│ │
│ 111 │ │ │ │ # Output each wrapped line │
│ 112 │ │ │ │ for wrapped in wrapped_line.split("\n"): │
│ 113 │ │ │ │ │ if wrapped.strip(): │
│ ❱ 114 │ │ │ │ │ │ self.output(wrapped, render_markdown=True) │
│ 115 │ │
│ 116 │ async def end_response(self): │
│ 117 │ │ """End the current LLM response.""" │
│ │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮ │
│ │ line = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ self = OutputContainer(id='output') │ │
│ │ text = '/dim]"\n )' │ │
│ │ wrapped = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ wrapped_line = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ ╰────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/cecli/tui/widgets/output.py:321 in output │
│ │
│ 318 │ │ │ │ return │
│ 319 │ │ │
│ 320 │ │ # Call the actual write method │
│ ❱ 321 │ │ self.write(text) │
│ 322 │ │ │
│ 323 │ │ # Log the write using the plain text │
│ 324 │ │ self._write_history.append(plain_text) │
│ │
│ ╭────────────────────────────────────── locals ──────────────────────────────────────╮ │
│ │ check_duplicates = True │ │
│ │ nl_check = False │ │
│ │ nl_last = False │ │
│ │ nl_penultimate = False │ │
│ │ plain_text = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ render_markdown = True │ │
│ │ self = OutputContainer(id='output') │ │
│ │ text = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/widgets/_rich_log.py:215 in write │
│ │
│ 212 │ │ │ ) │
│ 213 │ │ │ return self │
│ 214 │ │ │
│ ❱ 215 │ │ renderable = self._make_renderable(content) │
│ 216 │ │ auto_scroll = self.auto_scroll if scroll_end is None else scroll_end │
│ 217 │ │ │
│ 218 │ │ console = self.app.console │
│ │
│ ╭─────────────────────────────────── locals ───────────────────────────────────╮ │
│ │ animate = False │ │
│ │ content = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ expand = False │ │
│ │ scroll_end = None │ │
│ │ self = OutputContainer(id='output') │ │
│ │ shrink = True │ │
│ │ width = None │ │
│ ╰──────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/widgets/_rich_log.py:162 in _make_renderable │
│ │
│ 159 │ │ else: │
│ 160 │ │ │ if isinstance(content, str): │
│ 161 │ │ │ │ if self.markup: │
│ ❱ 162 │ │ │ │ │ renderable = Text.from_markup(content) │
│ 163 │ │ │ │ else: │
│ 164 │ │ │ │ │ renderable = Text(content) │
│ 165 │ │ │ │ if self.highlight: │
│ │
│ ╭───────────────────────────────── locals ──────────────────────────────────╮ │
│ │ content = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ self = OutputContainer(id='output') │ │
│ ╰───────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/rich/text.py:287 in from_markup │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/rich/markup.py:167 in render │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
MarkupError: closing tag '[/dim]' at position 52 doesn't match any open tag
Version and model info
Model: anthropic/claude-opus-4-6, Edit format: architect
Loaded 55 messages and 8 files
cecli v0.97.2
Main model: anthropic/claude-opus-4-6 with architect edit format
Editor model: vertex_ai/gemini-2.5-pro with editor-diff-fenced edit format
Weak model: vertex_ai/gemini-2.5-pro
Git repo: .git with 57 files
Repo-map: using 4096 tokens, files refresh
~/.cecli.conf.yml
architect: true
model: anthropic/claude-opus-4-6
editor-model: vertex_ai/gemini-2.5-pro
weak-model: vertex_ai/gemini-2.5-pro
alias:
ARCHITECT: Max Effort (The "Deep Thinker" for planning)
- "c4.6-max:anthropic/claude-opus-4-6"
RESEARCHER: High Effort (The Default for complex logic)
- "c4.6-high:anthropic/claude-opus-4-6"
DEV: Medium Effort (Balanced speed/cost for daily work)
- "c4.6-mid:anthropic/claude-opus-4-6"
Standard Gemini Aliases
- "g2.5p:vertex_ai/gemini-2.5-pro"
check-model-accepts-settings: false
show-model-warnings: true
--- History & Context ---
check-update: false
debug: true
watch-files: false
auto-commits: true
auto-save: true
auto-load: true
use-enhanced-map: true
cache-prompts: true
enable-context-compaction: true
context-compaction-max-tokens: 64000
editor: nvim
multiline: true
--- Interface ---
tui: true
vim: false
tui-config:
colors:
primary: "#00ff5f"
secondary: "#888888"
accent: "#00ff87"
foreground: "#ffffff"
background: "hsl(315,100%,6%)"
success: "#00aa00"
warning: "#ffd700"
error: "#ff3333"
surface: "transparent"
panel: "transparent"
input-cursor-foreground: "#00ff87"
other:
dark: true
input-cursor-text-style: "underline"
key_bindings:
newline: "shift+enter"
submit: "enter"
completion: "tab"
stop: "escape"
editor: "ctrl+o"
history: "ctrl+r"
cycle_forward: "tab"
cycle_backward: "shift+tab"
focus: "ctrl+f"
cancel: "ctrl+c"
clear: "ctrl+l"
quit: "ctrl+q"
--- TUI ----
mcp-servers:
mcpServers: {}
--- File Management ---
env-file: ~/.cecli.env
#--- READ-ONLY FILES ---
read:
- .cecli_rules.md
- .cecli_project_rules.md
Issue
It's probably something wrong in my configuration because I haven't seen anyone else reporting this, but whenever I use the TUI, I eventually, after probably twenty or thirty messages, run into this error and crash. So, my workaround has been using it in non-TUI mode, and I've found that this happens whether I use Claude 4.5, 4.6, Gemini 3, or Gemini 2 and a half as architect.
╭──────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────╮
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/worker.py:370 in _run │
│ │
│ 367 │ │ │ self.state = WorkerState.RUNNING │
│ 368 │ │ │ app.log.worker(self) │
│ 369 │ │ │ try: │
│ ❱ 370 │ │ │ │ self._result = await self.run() │
│ 371 │ │ │ except asyncio.CancelledError as error: │
│ 372 │ │ │ │ self.state = WorkerState.CANCELLED │
│ 373 │ │ │ │ self._error = error │
│ │
│ ╭───────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────────╮ │
│ │ app = TUI(title='TUI', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) │ │
│ │ error = MarkupError("closing tag '[/dim]' at position 52 doesn't match any open tag") │ │
│ │ self = │ │
│ │ worker_failed = WorkerFailed('Worker raised exception: MarkupError("closing tag '[/dim]' at position 52 doesn't match any open tag")') │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/worker.py:354 in run │
│ │
│ 351 │ │ Returns: │
│ 352 │ │ │ Return value of the work. │
│ 353 │ │ """ │
│ ❱ 354 │ │ return await ( │
│ 355 │ │ │ self._run_threaded() if self._thread_worker else self._run_async() │
│ 356 │ │ ) │
│ 357 │
│ │
│ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ self = │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/worker.py:341 in _run_async │
│ │
│ 338 │ │ ): │
│ 339 │ │ │ return await self._work() │
│ 340 │ │ elif inspect.isawaitable(self._work): │
│ ❱ 341 │ │ │ return await self._work │
│ 342 │ │ elif callable(self._work): │
│ 343 │ │ │ raise WorkerError("Request to run a non-async function as an async worker") │
│ 344 │ │ raise WorkerError("Unsupported attempt to run an async worker") │
│ │
│ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
│ │ self = │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/cecli/tui/app.py:504 in _stream_chunk │
│ │
│ 501 │ async def _stream_chunk(self, text: str): │
│ 502 │ │ """Stream a chunk to the current response (async helper).""" │
│ 503 │ │ output_container = self.query_one("#output", OutputContainer) │
│ ❱ 504 │ │ await output_container.stream_chunk(text) │
│ 505 │ │
│ 506 │ async def _end_response(self): │
│ 507 │ │ """End the current LLM response (async helper).""" │
│ │
│ ╭─────────────────────────────────────────── locals ────────────────────────────────────────────╮ │
│ │ output_container = OutputContainer(id='output') │ │
│ │ self = TUI(title='TUI', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) │ │
│ │ text = '/dim]"\n )' │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/cecli/tui/widgets/output.py:114 in stream_chunk │
│ │
│ 111 │ │ │ │ # Output each wrapped line │
│ 112 │ │ │ │ for wrapped in wrapped_line.split("\n"): │
│ 113 │ │ │ │ │ if wrapped.strip(): │
│ ❱ 114 │ │ │ │ │ │ self.output(wrapped, render_markdown=True) │
│ 115 │ │
│ 116 │ async def end_response(self): │
│ 117 │ │ """End the current LLM response.""" │
│ │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮ │
│ │ line = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ self = OutputContainer(id='output') │ │
│ │ text = '/dim]"\n )' │ │
│ │ wrapped = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ wrapped_line = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ ╰────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/cecli/tui/widgets/output.py:321 in output │
│ │
│ 318 │ │ │ │ return │
│ 319 │ │ │
│ 320 │ │ # Call the actual write method │
│ ❱ 321 │ │ self.write(text) │
│ 322 │ │ │
│ 323 │ │ # Log the write using the plain text │
│ 324 │ │ self._write_history.append(plain_text) │
│ │
│ ╭────────────────────────────────────── locals ──────────────────────────────────────╮ │
│ │ check_duplicates = True │ │
│ │ nl_check = False │ │
│ │ nl_last = False │ │
│ │ nl_penultimate = False │ │
│ │ plain_text = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ render_markdown = True │ │
│ │ self = OutputContainer(id='output') │ │
│ │ text = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/widgets/_rich_log.py:215 in write │
│ │
│ 212 │ │ │ ) │
│ 213 │ │ │ return self │
│ 214 │ │ │
│ ❱ 215 │ │ renderable = self._make_renderable(content) │
│ 216 │ │ auto_scroll = self.auto_scroll if scroll_end is None else scroll_end │
│ 217 │ │ │
│ 218 │ │ console = self.app.console │
│ │
│ ╭─────────────────────────────────── locals ───────────────────────────────────╮ │
│ │ animate = False │ │
│ │ content = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ expand = False │ │
│ │ scroll_end = None │ │
│ │ self = OutputContainer(id='output') │ │
│ │ shrink = True │ │
│ │ width = None │ │
│ ╰──────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/textual/widgets/_rich_log.py:162 in _make_renderable │
│ │
│ 159 │ │ else: │
│ 160 │ │ │ if isinstance(content, str): │
│ 161 │ │ │ │ if self.markup: │
│ ❱ 162 │ │ │ │ │ renderable = Text.from_markup(content) │
│ 163 │ │ │ │ else: │
│ 164 │ │ │ │ │ renderable = Text(content) │
│ 165 │ │ │ │ if self.highlight: │
│ │
│ ╭───────────────────────────────── locals ──────────────────────────────────╮ │
│ │ content = ' f"{len(registry['conditions'])} conditions[/dim]"' │ │
│ │ self = OutputContainer(id='output') │ │
│ ╰───────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/rich/text.py:287 in from_markup │
│ │
│ /home/sa_110454126533284998741/.local/share/pipx/venvs/cecli-dev/lib/python3.11/site-packages/rich/markup.py:167 in render │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
MarkupError: closing tag '[/dim]' at position 52 doesn't match any open tag
Version and model info
Model: anthropic/claude-opus-4-6, Edit format: architect
Loaded 55 messages and 8 files
cecli v0.97.2
Main model: anthropic/claude-opus-4-6 with architect edit format
Editor model: vertex_ai/gemini-2.5-pro with editor-diff-fenced edit format
Weak model: vertex_ai/gemini-2.5-pro
Git repo: .git with 57 files
Repo-map: using 4096 tokens, files refresh
~/.cecli.conf.yml
architect: true
model: anthropic/claude-opus-4-6
editor-model: vertex_ai/gemini-2.5-pro
weak-model: vertex_ai/gemini-2.5-pro
alias:
ARCHITECT: Max Effort (The "Deep Thinker" for planning)
RESEARCHER: High Effort (The Default for complex logic)
DEV: Medium Effort (Balanced speed/cost for daily work)
Standard Gemini Aliases
check-model-accepts-settings: false
show-model-warnings: true
--- History & Context ---
check-update: false
debug: true
watch-files: false
auto-commits: true
auto-save: true
auto-load: true
use-enhanced-map: true
cache-prompts: true
enable-context-compaction: true
context-compaction-max-tokens: 64000
editor: nvim
multiline: true
--- Interface ---
tui: true
vim: false
tui-config:
colors:
primary: "#00ff5f"
secondary: "#888888"
accent: "#00ff87"
foreground: "#ffffff"
background: "hsl(315,100%,6%)"
success: "#00aa00"
warning: "#ffd700"
error: "#ff3333"
surface: "transparent"
panel: "transparent"
input-cursor-foreground: "#00ff87"
other:
dark: true
input-cursor-text-style: "underline"
key_bindings:
newline: "shift+enter"
submit: "enter"
completion: "tab"
stop: "escape"
editor: "ctrl+o"
history: "ctrl+r"
cycle_forward: "tab"
cycle_backward: "shift+tab"
focus: "ctrl+f"
cancel: "ctrl+c"
clear: "ctrl+l"
quit: "ctrl+q"
--- TUI ----
mcp-servers:
mcpServers: {}
--- File Management ---
env-file: ~/.cecli.env
#--- READ-ONLY FILES ---
read: