t8y2/dbx · error
unknown method: %s
Error message
unknown method: %s
What it means
The agent's dispatch table maps JSON-RPC style method names to server handlers. When a client sends a method that isn't in the switch (validate_connection, list_tables, execute_query, shutdown, etc.), the server rejects it with 'unknown method: <name>'. This indicates a client/server protocol version mismatch or a typo in the method name.
Source
Thrown at agents/drivers/hive-go/main.go:473
result, err := server.executeQueryPage(queryOptionsFromParams(params), intParam(params, "pageSize"))
return result, false, err
case "fetch_query_page", "fetch_table_read_page":
result, err := server.fetchQueryPage(stringParam(params, "sessionId"), intParam(params, "pageSize"))
return result, false, err
case "close_query_session", "close_table_read_session":
return server.closeQuerySession(stringParam(params, "sessionId")), false, nil
case "execute_transaction":
result, err := server.executeStatements(params, true)
return result, false, err
case "execute_batch":
result, err := server.executeStatements(params, false)
return result, false, err
case "disconnect":
return map[string]bool{"ok": true}, false, server.disconnect()
case "shutdown":
return map[string]bool{"ok": true}, true, server.disconnect()
default:
return nil, false, fmt.Errorf("unknown method: %s", method)
}
}
func handshakeResult(multiSession bool) map[string]any {
capabilities := []string{
"connect", "test_connection", "metadata", "query", "paged_query", "transaction", "ddl", "structured_error_v1",
}
if multiSession {
capabilities = append(capabilities, "multi_session")
}
return map[string]any{
"protocolVersion": protocolVersion,
"agentProtocolVersion": protocolVersion,
"capabilities": capabilities,
}
}
func testConnection(params connectParams) (map[string]any, error) {View on GitHub (pinned to c0390bff16)
Solutions
- Check the method name spelling against the dispatch switch in agents/drivers/hive-go/main.go
- Verify the client and agent versions match; upgrade the agent if the client expects newer methods
- Check the handshake capabilities list to see which methods this agent advertises
- Capture the exact method string from the error and compare to supported cases
Example fix
// before: calling an unadvertised method
{"method": "list_indexes_advanced"}
// after: use a supported method from the handshake capabilities
{"method": "list_tables", "params": {"schema": "default"}} Defensive patterns
Strategy: validation
Validate before calling
const supported = handshakeCapabilities()
if (!supported.methods.includes(methodName)) throw new Error(`method ${methodName} not advertised by agent`) Try / catch
try {
result = rpc.call(method, params)
} catch (e) {
if (String(e).startsWith('unknown method:')) {
console.error(`${method} unsupported; refresh agent capabilities`)
}
} Prevention
- Read handshake capabilities before calling methods
- Pin client and agent versions together in deployment
- Maintain a client-side allowlist of method names per agent version
When it happens
Trigger: Sending any RPC method string not present in the dispatch switch in dispatch() — e.g. 'list_indexes_v2', a misspelled 'paged_query' style method, or a newer client calling a method this agent build doesn't implement.
Common situations: Client and agent built from different versions (client ahead of agent); typos in custom tooling that talks to the agent over stdio; feature flags enabling methods the deployed agent lacks.
Related errors
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/a79f4b4ba138bfb2.
Report an issue: GitHub.