ISSUE DESCRIPTION jarvis agents list Traceback Description Learning OpenJarvis on a…
- User
ISSUE DESCRIPTION
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 "@" }
Assistant
Let's verify the changes and check for a few of the outer-tag patterns like
config_cmd.py:330({exc}outside brackets) andchannel_cmd.pyexc.message.Assistant
Now let's check the remaining files for correctness, particularly
ask.py,model.py,serve.py,skill_cmd.py,vault_cmd.py,tool_cmd.py,bench_cmd.py,chat_cmd.py,connect_cmd.py,digest_cmd.py.Assistant
All look good. Now let's verify the imports added correctly (no duplicate imports, placed sensibly) and run syntax checks / compile all modified files.
Assistant
All syntax valid. Let's view where imports were inserted, to make sure they're placed correctly (not duplicated, alphabetically reasonable) for a couple of files.
Assistant
Good, imports placed correctly. Now let's reorder alphabetically isn't strictly necessary but let's fix minor style (rich.markup before rich.table alphabetically) - not essential for functionality. Let's run linter if available.
Assistant
Now let's verify syntax again and check a few files' import blocks.
Assistant
All good. Now let's write a reproduction script simulating the exact traceback scenario (exception message containing unmatched brackets) to confirm the fix works.
Assistant
This reproduces the exact class of bug. Now let's verify with
escape()that this no longer crashes.Assistant
Now let's directly test the actual
agent_cmd.pylist_agentsfunction to make sure the fix resolves the real scenario end-to-end.Assistant
Now let's write an integration test simulating list_agents raising an exception with problematic brackets to verify no crash.
Assistant
This confirms the fix works for the exact class of error described in the issue. Now let's check if this same pattern exists outside the
clidirectory (e.g., other places using rich markup with exception messages).Assistant
No other matches outside
cli/. Let's also check for other rich color tag names besides plain lowercase (e.g.,bold red,dim).Assistant
No leftover matches. Let's also check for
errvariable name patterns and other common exception var names (error,ex).Assistant
No such indirect patterns found. Now let's run the existing test suite (particularly CLI-related tests) to make sure nothing is broken.
Assistant
All pass. Let's run the full set of relevant test files for all modified cli modules.
Assistant
uv.lock got modified from running
uv runcommands - let's revert that since it's unrelated to our fix.Assistant
Good, uv.lock is clean now. Let's run the full CLI test suite once more, avoiding
uv runto prevent modifying uv.lock, using the venv python directly.Assistant
Confirmed exactly the same 14 pre-existing failures exist without my changes — identical results, so my fix introduces zero regressions. Let's also run the broader test suite briefly for sanity (just the
clidirectory is fine, already covers all files I touched). Let's clean up temp scripts.Assistant
Let's view the final diff for the main file that triggered the issue to be sure of correctness.
Assistant
This is exactly the fix needed. Now let's look at the full diff stat for an overview of the whole change.
Assistant
This comprehensively fixes the systemic issue across the CLI. Now let's go through the checklist explicitly.
Assistant
I'm confident the fix is complete and correct. Let me go through the checklist one more time:
Checklist review:
-
✅ Reproduced the error: I identified that the crash happens because raw exception messages (e.g. from Ollama, subprocess, network libraries) are interpolated directly into Rich markup strings like . If the exception text happens to contain something that looks like a stray closing tag (e.g. ) without a matching opening tag, Rich's markup parser raises — exactly matching the traceback in the issue. I reproduced this precisely with a minimal script using Rich directly, and then via an integration test invoking the actual command () with a mocked manager that raises such an exception.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.