t8y2/dbx · error
unknown method: %s
Error message
unknown method: %s
What it means
The JSON-RPC style dispatcher in the argo-go agent does not recognize the requested method name. dispatch switches on a fixed set of method names (connect, metadata, query, execute_query, disconnect, shutdown, etc.) and returns this error in its default branch. It means the client sent a method this agent build does not implement or advertise in its handshake capabilities.
Source
Thrown at agents/drivers/argo-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 and casing against the switch cases in main.go dispatch (connect, test_connection, metadata, query, paged_query, transaction, ddl, execute_query, etc.).
- Compare the client's call with the agent's handshake capabilities array; only call advertised capabilities.
- Upgrade the agent binary if the method is from a newer protocol version than the deployed agent.
- Check the agent's protocolVersion/agentProtocolVersion in the handshake response and align the client to that protocol version.
Example fix
// before
{"method":"executeQuery","params":{...}}
// after
{"method":"execute_query","params":{...}} Defensive patterns
Strategy: validation
Validate before calling
// Validate the method against the agent's advertised handshake capabilities before dispatching.
func isAdvertised(method string, capabilities []string) bool {
for _, c := range capabilities {
if c == method {
return true
}
}
return false
}
if !isAdvertised("execute_query", handshake.Capabilities) {
return fmt.Errorf("method %q not advertised by agent (protocolVersion %s)", "execute_query", handshake.ProtocolVersion)
} Try / catch
result, err := dispatch(server, method, params)
if err != nil {
if strings.HasPrefix(err.Error(), "unknown method: ") {
// log the offending method + agent protocol version, degrade gracefully
log.Printf("unsupported method %q on agent protocol %s", method, protocolVersion)
return fallbackResponse(method)
}
return err
} Prevention
- Only call methods listed in the handshake 'capabilities' array.
- Match method names exactly against the dispatch switch (snake_case, e.g. execute_query not executeQuery).
- Pin client and agent versions together so protocol versions stay aligned.
- On handshake, store protocolVersion and gate newer methods behind a version check.
When it happens
Trigger: Sending any method name not in the switch statement (e.g. a typo like 'excute_query', a camelCase variant like 'executeQuery', or a newer method like 'list_indexes' on an older agent binary) over stdio to the agent after handshake.
Common situations: Client and agent version mismatch where the UI calls a capability the deployed agent predates; typos or casing differences in method names; calling a method the handshake capabilities list does not advertise.
Related errors
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/94f663c15122f388.
Report an issue: GitHub.