jarvis agents list Traceback Description Learning OpenJarvis on a Windows machine with…
- User
jarvis agents list Traceback
Description
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 "@" }
My config is terse # OpenJarvis configuration # Hardware: 13th Gen Intel(R) Core(TM) i9-13900K (32 cores, 62.6 GB RAM) # GPU: NVIDIA GeForce RTX 4090 (24.0 GB VRAM) # Full reference config: jarvis init --full
[engine] default = "ollama"
[engine.ollama] # host = "http://localhost:11434" # set to remote URL if engine runs elsewhere
[intelligence] default_model = "gemma4:31b"
[agent] default_agent = "simple"
[tools] enabled = ["code_interpreter", "web_search", "file_read", "shell_exec"]
Steps to Reproduce
- Start an initial WSL Ubuntu shell
- run "jarvis"
- this will list the --help command
- run "jarvis agents list"
- this will list a table with one agent b0e6dece007b │ My Assistant │ deep_research │ idle │ 0 │ 0
- run "jarvis agents ask b0e6dece007b "How are you""
- this will respond after it loads and starts the model, GPU memory is utilized
- run "ps -aux|grep ollama" in another shell window
- this will output two processes:
- ollama 196 0.0 0.3 3405152 220636 ? Ssl 11:29 0:01 /usr/local/bin/ollama serve
- ollama 1078 66.2 6.9 195616136 4544716 ? Sl 12:39 5:25 /usr/local/bin/ollama runner --ollama-engine --model usr/share/ollama/.ollama/models/blobs/sha256-280af6832eca23cb322c4dcc65edfea98a21b8f8ab07dc7553bd6f7e6e7a3313 --port 42291
- 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 tagInterface
No new interfaces are introduced.
- Assistant
Now let me check the multi-line/table cases the line-based pass didn't cover, and verify the import placement:
- Assistant
Ruff fixed the import ordering; now I need to wrap the 11 lines that exceeded 88 chars:
- Assistant
Table cells also parse markup — agent names, search results (LLM content), and channel configs need escaping too:
- Assistant
Some files were already not ruff-format-clean before my changes (
__init__.py,_banner.pyare untouched). Let me check if my edits introduced the issues inagent_cmd.py/ask.py: - Assistant
The fix works — the exact failure mode from the report (bracketed exception text through Rich markup) now renders cleanly. Let's run the existing CLI tests:
- Assistant
All changes restored. Now run the full CLI test suite (excluding the confirmed pre-existing failure) and re-verify the fix:
- Assistant
The doctor failures could be from my edit — let me check:
- Assistant
Identical failure set on clean HEAD — all pre-existing, zero regressions from my changes. Cleaning up and re-verifying the fix:
- Assistant
Now add a regression test so this can't reoccur:
- Assistant
All done. The pre-existing
test_doctor_cmdfailure is the version-check banner polluting stdout (fails identically on clean HEAD); the largeuv.lockdiff was already in your working tree before I started.Summary
Root cause: The traceback isn't the real error — it's an error-reporting bug masking it. When you
agents ask, Ollama loads the model into a runner process; after it idles out, the nextagents listhit an exception whose message contained bracketed text (e.g.[Errno 111] Connection refused). The handler atsrc/openjarvis/cli/agent_cmd.py:91didconsole.print(f"[red]Error: {exc}[/red]"), so Rich parsed the exception text as console markup and raisedMarkupError: closing tag '[/red]' ... doesn't match any open tag— crashing with a traceback instead of printing the actual error.Fix: Escape all dynamic text before it reaches Rich markup, using
rich.markup.escape(the patterninit_cmd.pyalready used):- All 22 CLI modules — every
console.print(f"[red]Error: {exc}[/red]")-style handler (~70 sites) now uses{escape(str(exc))}, so the real error message is displayed instead of aMarkupErrortraceback. agent_cmd.py— additionally escaped other untrusted interpolations on the same code paths: the agent's reply inagents ask(LLM output can contain[...]), tool arguments in the live trace, agent names/descriptions/memory inlist/info/tasks/search/templates/channelstable cells (Rich parses markup in cells and titles too).doctor_cmd.py— check messages/details (which embed engine errors) escaped at render time.registry_cmd.py,config_cmd.py,quickstart_cmd.py— remaining multi-line/table-cell sites fixed.
Verification:
- Reproduction: mocked
AgentManagerto raiseConnectionError("[Errno 111] Connection refused [/weird] [unclosed")—jarvis agents listnow exits 0 and printsError: [Errno 111] Connection refused ...instead of crashing. - Added a regression test:
tests/cli/test_agent_cmd.py::TestAgentCmd::test_agent_list_error_with_markup_hostile_message. tests/cli/: 404 passed; the 14 failures are all pre-existing (identical failure set on a clean HEAD worktree — mostly environment-dependent: missing optional modules, a self-update banner corrupting--jsonoutput).ruff checkpasses on everything touched; formatting matches repo state.
Note: after this fix you'll see the underlying error when it happens — likely a transient connection error while the manager probes agent state. If
agents liststill errors (rather than crashing) after Ollama idles out, that message will now tell you exactly what to file next. - All 22 CLI modules — every
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →