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 me start by exploring the repository structure to understand the codebase.
Assistant
Let me examine the specific area of code where the error is occurring:
Assistant
Let me see the complete
list_agentsfunction and understand the flow:Assistant
Let me see how the agent's
_row_to_agentworks and where the dict-style status might be affected:Assistant
Let me look at the traceback more carefully. The issue is the exception text being interpolated into rich markup format. Let me look at the existing patterns in the code:
Assistant
Let me check the agent manager and look for any code that might raise an exception containing
[characters:Assistant
Let me write a quick reproduction script to verify my understanding of the issue:
Assistant
Let me try to reproduce more specifically with patterns that would cause the
closing tag '[/red]' doesn't match any open tagerror:Assistant
I've reproduced the exact error. Let me check the available rich API for escaping markup:
Assistant
Let me look at the rest of the file for similar patterns:
Assistant
Let me look for the same pattern across the codebase:
Assistant
Now I have a clear understanding. The issue is that exception objects are formatted into rich markup strings without escaping. If the exception contains characters like
[,], or any markup-like sequence, rich throws aMarkupError, masking the real exception.Let me look for the best place to fix this. Since there are many similar patterns, I should focus on the file with the reported issue first:
Assistant
Let me also search the codebase to see if there's already a project-wide helper being used somewhere for this:
Assistant
Now let me apply the fix. I'll add the import and replace the vulnerable pattern:
Assistant
Now let me fix all the vulnerable error printing patterns. I'll use
sedto do bulk replacement, but first let me make sure the replacement is correct:Assistant
Now let me verify the fix works by writing a test script:
Assistant
Let me check if there are any existing tests that test this behavior:
Assistant
Let me run the existing tests to confirm nothing is broken:
Assistant
Now let me write a script that simulates the actual issue from the bug report to verify the fix:
Assistant
Let me verify the bug truly existed by checking the original behavior without the fix:
Assistant
Let me test edge cases to make sure the fix is robust:
Assistant
Let me verify all 11 occurrences are fixed in agent_cmd.py:
Assistant
Let me run all the tests for the CLI:
Assistant
Let me check if those test failures are pre-existing (not related to my changes):
Assistant
The uv.lock change is from the environment. Let me restore it to keep my submission clean:
Assistant
Let me verify the failing tests are pre-existing and not related to my changes:
Assistant
These failures are pre-existing (caused by a version update banner, not my changes). Let me run the specific agent_cmd tests:
Assistant
Let me verify the failing tests aren't related to agent_cmd:
Assistant
Let me view the final changes:
Assistant
Let me clean up temp files:
Assistant
Let me do final verification of my fix:
Assistant
All existing tests for
agent_cmd.pypass.Summary
Issue
In
src/openjarvis/cli/agent_cmd.py, thejarvis agentscommands catch exceptions and try to print them as rich markup:pythonconsole.print(f"[red]Error: {exc}[/red]")When the exception's string representation contains characters that look like rich markup tags (e.g., , , ), rich tries to parse them as markup and throws a , masking the original error:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.