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 shows the error-reporting path itself is interpreting exception text as Rich markup, so I’ll identify both that immediate bug and whether similar unsafe handlers exist nearby, then reproduce and test the correction.
- Assistant
The immediate failure is confirmed as unsafe interpolation into Rich markup, and every agent subcommand shares that pattern. However, the expected behavior is a successful table, so I’m now tracing
AgentManager.list_agents()and task/binding queries to find the underlying exception that occurs after an agent run or stale process state. - Assistant
list_agents()is purely SQLite-backed and does not inspect Ollama, so model unloading should not inherently affect listing. The hidden original exception cannot be recovered from the supplied traceback because the handler masks it. I’ll reproduce the reported RichMarkupErrordeterministically by injecting an exception containing bracketed text, then implement a safe, shared agent-command error renderer. I’ll also inspect the test conventions and dependency versions before editing. - Assistant
The local system Python lacks project dependencies, so I’ll use the repository’s
uvenvironment for verification. The robust fix is to render exception text withmarkup=Falserather than escaping into another markup string. I’ll apply that consistently to all handlers in this command module, and make the list table’s dynamic status aTextobject so an unknown/empty status style cannot produce malformed tags. User-controlled table fields will also be represented as literalTextto prevent bracketed names or types from being parsed as markup. - Assistant
The first synthetic bracket phrase was treated literally by this Rich version, so I’ll reproduce with the common exception form from network/SQLite errors (
[Errno 111]), which Rich recognizes as a style-like tag and which matches the reported closing-tag mismatch. Then I’ll edit only production code (no tests, per instruction). - Assistant
This environment’s newer Rich no longer raises for
[Errno 111], but it visibly strips/interprets other bracketed content ([bold]disappeared), confirming unsafe rendering and explaining the traceback under the reporter’s installed Rich release. I’ve replaced markup interpolation with literal styled rendering and removed generated status tags. Next I’ll verify via CLI invocation with a mocked bracket-bearing exception and a table containing markup-like dynamic values, then run the agent CLI and manager tests plus lint/type-relevant checks. - Assistant
The targeted functional checks pass: the handler preserves bracketed exception text literally, and list rendering tolerates markup-like names/types and unknown statuses. All 50 relevant tests passed.
ruffis not installed in the project environment, so I’ll inspect the declared lint configuration and run it through an ephemeral tool environment if available; I’ll also review the final diff and ensure the pre-existinguv.lockmodification is not included. - Assistant
Lint passes and the source diff is clean.
uv.lockwas already dirty at session start anduv runrewrote it extensively; because it is unrelated to this fix and must not be submitted, I’ll restore it to the repository version. Then I’ll run the full CLI and agent test directories (broader than the initial 50-test targeted run) and inspect final status. - Assistant
The broad suite completed 910 passes but has 17 unrelated failures: missing compiled
openjarvis_rust, existing update-notice pollution of JSON outputs, and unrelated loop/URL behavior. None touchagent_cmd.py; importantly, the focused 50 tests had passed before the broad run. I’ll rerun those focused tests against the restored lockfile, re-run the direct regression script with update checks disabled for clean output, and confirm only the intended source file remains modified.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.