t8y2/dbx · error · RuntimeError

{self.candidate.name} {method}: {json.dumps(response['error'

Error message

{self.candidate.name} {method}: {json.dumps(response['error'], ensure_ascii=False)}

What it means

call() raises RuntimeError when the JSON-RPC response for the current request id contains an "error" member. The message embeds the candidate agent's name, the method, and the serialized error object, attributing the failure to the specific agent and RPC.

Source

Thrown at agents/drivers/cassandra-go/bench/agent_compare.py:80

            "method": method,
            "params": params or {},
        }
        assert self.process.stdin is not None
        assert self.process.stdout is not None
        self.process.stdin.write(json.dumps(request, separators=(",", ":")) + "\n")
        self.process.stdin.flush()
        while True:
            line = self.process.stdout.readline()
            if line == "" and self.process.poll() is not None:
                raise RuntimeError(self._failure(f"agent exited during {method}"))
            try:
                response = json.loads(line)
            except json.JSONDecodeError:
                continue
            if response.get("id") != self.request_id:
                continue
            if response.get("error") is not None:
                raise RuntimeError(f"{self.candidate.name} {method}: {json.dumps(response['error'], ensure_ascii=False)}")
            return response.get("result")

    def rss_kib(self) -> int:
        if self.candidate.rss_command:
            output = subprocess.check_output(self.candidate.rss_command, shell=True, text=True).strip()
            return int(output)
        output = subprocess.check_output(
            ["ps", "-o", "rss=", "-p", str(self.process.pid)],
            text=True,
        ).strip()
        return int(output or "0")

    def close(self) -> bool:
        if self.process.poll() is not None:
            return True
        try:
            self.call("shutdown")
        except Exception:

View on GitHub (pinned to c0390bff16)

Solutions

  1. Read the embedded JSON-RPC error message to identify code/message
  2. Verify the method name and params match the agent's expected protocol
  3. Run the same request against the agent directly (e.g. via a JSON-RPC client) to reproduce
  4. Update the agent if the method is new and the binary is stale

Example fix

// before
call("nonexistent/method", {})
// after
call("get", {"key": "k1"})
Defensive patterns

Strategy: try-catch

Validate before calling

# validate the method exists in the agent's advertised surface before calling
available = set(agent.call("rpc.discover", {}).get("methods", []))
assert method in available, f"agent does not implement {method}"

Try / catch

try:
    result = agent.call(method, params)
except RuntimeError as exc:
    if exc.args and method in str(exc.args[0]) and str(agent.candidate.name) in str(exc.args[0]):
        print(f"JSON-RPC error from agent: {exc}")
        sys.exit(5)
    raise

Prevention

When it happens

Trigger: The agent successfully responds to a call(method, params) but reports a JSON-RPC error (e.g. method not found, invalid params, internal error in the handler).

Common situations: Bench invoking a method the agent doesn't implement; workload sending params the agent rejects; agent-side internal error on a particular dataset or query.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/4de61a7bfeb13149. Report an issue: GitHub.