Learning OpenJarvis on a Windows machine with WSL2. I was wondering what would happen on a clean reboot and listed the agents. This worked the first two times and listed the "... My Assistant │ deep_research ...". I even used the ID to ask it questions which worked (jarvis agents ask b0e6dece007b "How can I contribute to the OpenJarvis Project"). I had not loaded the model (Gemma 4 31b) into Ollama (this was direct from an open WSL Ubuntu window). My alias for jarvis is
jarvis() {
cd "OPENJARVISH@"
}
Assistant
Investigating the bug: the traceback points to Rich markup breaking in error handling when listing agents. I'll trace that code path and find the underlying failure.
Assistant
Implementing fixes: unknown agent statuses produce invalid Rich markup ([]status[/]), which triggers a MarkupError that the error handler then masks.
Assistant
This was a real bug with two layers — the traceback you saw was masking the actual failure.
Root cause
jarvis agents list styles the Status column with Rich markup. The style map only covered idle, running, paused, error, and archived. After jarvis agents ask, an agent can end up in other valid states such as:
needs_attention (escalation)
budget_exceeded (token/cost limit hit)
stalled
For any status not in the map, the code produced invalid markup like []needs_attention[/], which Rich rejects with a .
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
run "jarvis agents ask b0e6dece007b "How can I contribute to the OpenJarvis Project""
This will respond
Wait a bit, until GPU memory frees
run the "ps -aux|grep ollama" in another shell window and see only the one ollam process for the "serve"
run "jarvis agents list"
see Traceback
Expected Behavior
Expected the table listing with one idle agent: b0e6dece007b │ My Assistant │ deep_research │ idle │ 0 │ 0
Actual Behavior
Traceback
Operating System
Linux
Python Version
3.12
Hardware
NVIDIA GPU
Engine
Ollama
Logs / Traceback
Traceback (most recent call last):
File "/home/gru/projects/OpenJarvis/.venv/bin/jarvis", line 10, in <module>
sys.exit(main())
^^^^^^
File "/home/gru/projects/OpenJarvis/src/openjarvis/cli/__init__.py", line 122, in main
cli()
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/click/core.py", line 1485, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/click/core.py", line 1406, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/click/core.py", line 1873, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/click/core.py", line 1873, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/click/core.py", line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/click/core.py", line 824, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gru/projects/OpenJarvis/src/openjarvis/cli/agent_cmd.py", line 91, in list_agents
console.print(f"[red]Error: {exc}[/red]")
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/rich/console.py", line 1698, in print
renderables = self._collect_renderables(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/rich/console.py", line 1558, in _collect_renderables
self.render_str(
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/rich/console.py", line 1448, in render_str
rich_text = render_markup(
^^^^^^^^^^^^^^
File "/home/gru/projects/OpenJarvis/.venv/lib/python3.12/site-packages/rich/markup.py", line 167, in render
raise MarkupError(
rich.errors.MarkupError: closing tag '[/red]' at position 65 doesn't match any open tag
Interface
No new interfaces are introduced.
MarkupError
The exception handler then made things worse:
console.print(f"[red]Error: {exc}[/red]")
The MarkupError message itself contains [/red], so Rich tried to parse that as markup and threw the secondary error you saw:
MarkupError: closing tag '[/red]' at position 65 doesn't match any open tag
That matches your report exactly — the original error was swallowed.
Fix
In agent_cmd.py:
_format_agent_status() — handles all known statuses (needs_attention, budget_exceeded, stalled) and renders unknown ones as plain text (no empty [] tags).
_print_cli_error() — escapes exception text with rich.markup.escape so bracket-heavy messages (including MarkupError) print safely.
A regression test covers listing agents in each of these non-idle statuses.
What you can do now
After pulling this fix, jarvis agents list should work again. If the agent shows needs_attention or budget_exceeded instead of idle, that reflects its real state after the ask runs — you can inspect it with:
jarvis agents info b0e6dece007b
jarvis agents errors
If it’s in needs_attention, use jarvis agents recover or jarvis agents resume depending on what you need. If it’s budget_exceeded, adjust the agent’s max_cost / max_tokens in its config.