t8y2/dbx · error
agent response unavailable: %v
Error message
agent response unavailable: %v
What it means
In agentProcess.call, after writing the JSON-RPC request to the agent's stdin, the harness reads one line from the agent's stdout; if Scan fails there is no response and this error wraps the scanner's Err. It typically means the agent died or hung mid-request.
Source
Thrown at agents/drivers/rabbitmq/bench/agent_compare.go:349
}
func (process *agentProcess) call(method string, params map[string]any) (json.RawMessage, error) {
process.nextID++
request := map[string]any{
"jsonrpc": "2.0",
"id": process.nextID,
"method": method,
"params": params,
}
payload, err := json.Marshal(request)
if err != nil {
return nil, err
}
if _, err := process.stdin.Write(append(payload, '\n')); err != nil {
return nil, err
}
if !process.reader.Scan() {
return nil, fmt.Errorf("agent response unavailable: %v", process.reader.Err())
}
var response agentResponse
if err := json.Unmarshal(process.reader.Bytes(), &response); err != nil {
return nil, err
}
if response.ID != process.nextID {
return nil, fmt.Errorf("response id %d does not match request id %d", response.ID, process.nextID)
}
if response.Error != nil {
return nil, errors.New(response.Error.Message)
}
return response.Result, nil
}
func (process *agentProcess) close() error {
_, callError := process.call("shutdown", map[string]any{})
_ = process.stdin.Close()
waitError := process.command.Wait()View on GitHub (pinned to c0390bff16)
Solutions
- Inspect reader.Err()/agent stderr for the crash reason and fix the underlying agent fault
- Ensure the broker connection survives the benchmark duration (timeouts, keepalives)
- Check for OOM/signals (dmesg, ulimit) killing the child under load
- Add retry/reconnect logic in the agent instead of exiting on transient broker errors
Defensive patterns
Strategy: try-catch
Try / catch
res, err := process.call(method, params)
if err != nil && strings.Contains(err.Error(), "agent response unavailable") {
// agent died mid-call; capture stderr and exit state
log.Fatalf("agent unavailable: %v, exit state: %v", err, process.command.ProcessState)
} Prevention
- Monitor the child process (Wait) concurrently to surface crashes with their cause
- Raise memory limits if the agent is OOM-killed under load
- Make the agent resilient to transient broker errors instead of exiting
When it happens
Trigger: reader.Scan() returns false right after a request was written — the agent exited (crash, OOM kill), its stdout pipe broke, or the agent never answered and the pipe closed.
Common situations: Agent killed by OOM under load; agent crashed on an unhandled method/panic; connection to RabbitMQ dropped and agent exited; benchmark machine resource limits killing the child.
Related errors
- agent exited before {method}
- agent exited before {method}
- timed out during {method}
- {self.candidate.name} {method}: {json.dumps(response['error'
- Custom H2 JDBC JAR does not exist: " + path
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/d3204a64d121f34a.
Report an issue: GitHub.