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
I’ll inspect the agent CLI and related tests first. The traceback indicates the underlying exception message is being interpolated into Rich markup without escaping, so I’ll verify all error-printing paths and existing conventions before making the smallest robust fix.
- Assistant
The failure is confirmed in
list_agents: an exception containing Rich markup characters (likely a database/connection error with[...]) is parsed as markup, and an unmatched closing tag triggers a second exception. I’ll inspect the complete agent command module and test layout to choose a consistent fix that preserves the red label while rendering the exception literally. - Assistant
There are many identical unsafe exception interpolations in this module, so fixing only
listwould leave the same crash in other agent commands. The safest local pattern is to keep the styled label as markup and pass the exception as arich.text.Textrenderable, which disables markup interpretation for the exception text. I’ll review the CLI tests before applying that consistently to agent command error handlers. - Assistant
The existing tests only cover help output, but the production module has nine broad exception handlers. I’ll add a small
_print_errorhelper usingText(str(exc))and route those handlers through it. This avoids parsing arbitrary exception content while retaining the existing red “Error:” formatting and also handles non-string exception representations safely. - Assistant
The change now covers every
[red]Error: {exc}[/red]handler in the module, including the reported list path. I’ll inspect the remaining command implementations for another unsafe error path, then run a focused reproduction by invoking the list command with a manager that raises an exception containing unmatched Rich tags. - Assistant
The focused system Python lacks the project’s dependencies, so that reproduction could not run; this is an environment issue rather than a code failure. The remaining
click.echoexception paths do not interpret Rich markup, so they cannot produce the reportedMarkupError. I’ll rerun the focused check and the relevant test file through the repository’suvenvironment. - Assistant
The reproduction now succeeds: an exception containing
[/red]is printed literally, and all 17 focused CLI tests pass. I’ll additionally invoke the actualagents listClick command with a mocked manager failure to verify the user-facing command exits cleanly without a traceback, then review the final diff and repository status. - Assistant
The actual command reproduction exits cleanly and preserves the literal exception text, with no
MarkupError.uv runregenerateduv.lockas an unrelated environment side effect; I’ll restore that pre-existing-unrelated file so the submission contains only the source fix, then perform one final status/diff check.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.