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
The error is a Rich MarkupError when printing an exception that likely contains bracket characters. I'll inspect the agents list command and how errors are rendered.
Assistant
The MarkupError is a secondary failure; I need the underlying exception from listing agents after Ollama unloads the model.
Assistant
Inspecting list_agents more closely and searching for similar markup-escaping patterns.
Assistant
Checking recent changes and how agent status get set; reproducing the markup failure.
Assistant
The dim strike closing tag looks suspicious — I'll verify how Rich parses that markup.
Assistant
So dim strike works fine. Empty style doesn't, but that produces a different error path.
Assistant
I'll inspect AgentManager initialization and schema handling next — a migration issue could explain the list failure.
Assistant
I'll check tests and the changelog for related agent list issues.
Assistant
Let me try to reproduce by simulating an exception that contains brackets when printing with rich.
The traceback is a classic Rich MarkupError: the [/red] closing tag doesn't match any open tag. This happens when the exception message itself contains a Rich-style tag that isn't properly closed or nested correctly.
Looking at the code path:
cli/agent_cmd.py:91 calls `console.
Assistant
Let me look at agent name and agent_type fields that go into the table with styles. The table has:
Assistant
Interesting - [Errno 2] No such file or directory works because Rich treats incomplete-looking things somehow. Let me understand more:
Assistant
Interesting - Nested MarkupError changes the error message. The user's error is specifically:
Assistant
None of those failed. Let me try more cases — maybe the name has brackets and the exception is a MarkupError from printing the table.
Assistant
Empty status_style is very close to the reported error — verifying the exact position match.
Assistant
Status values outside the style map would leave status_style empty and break markup. Checking which statuses are used:
Assistant
Statuses like budget_exceeded and needs_attention are set by the executor but missing from the style map — that matches the failure path.
Assistant
Exact match on the nested MarkupError. Inspecting when the executor sets those statuses:
Assistant
I'll search for other places that apply the same status styling so we fix them consistently.
Assistant
I'll check other status rendering paths and scheduler_cmd for the same pattern.
Assistant
Checking end_tick and when stalled is set:
Assistant
Confirming the safest way to print exception text with Rich:
Assistant
Checking markup=False as an alternative:
Assistant
Root cause: statuses like needs_attention/budget_exceeded aren't in the style map, producing invalid []status[/] markup; the error handler then crashes on unescaped brackets. Fixing both.
Assistant
I'll also create a helper for printing errors safely and for formatting status. Let me apply the fix.
Assistant
I'll add a status-style helper and fix error printing.
Assistant
Checking the rest of the file and updating other error handlers:
Assistant
Updating remaining error handlers in this file to use the safe helper.
Assistant
Reproducing the original failure path and verifying the fix:
Assistant
The needs_attention path works (exit 0 + table). Re-running after fixing a script typo:
Assistant
Confirmed the exact user error.Simplifying the end-to-end test.
Assistant
Truncation made the string assert fail; exit 0 and the table rendering is what matters. Verifying exit codes:
Assistant
Running related tests to ensure nothing broke:
Assistant
Verifying the final state of the changed sections:
Assistant
Reverting the accidental uv.lock change:
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.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work.
For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state.
You can also reset all changes in the repository using git reset --hard command.
Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later.
Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands.
However you don't need to use git add or git commit before submitting your changes. In fact,
submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.
CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
If an error was reported in the issue description, I have successfully reproduced it.
If an error was reported in the issue description, I have confirmed that my fix resolves the error.
I have thought about edge cases and made sure my fix handles them as well.
I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass.
I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /OpenJarvis, current file: none) bash-$