{"record":{"id":"400b2c7fdcdc8aeb","repo":"block/buzz","slug":"32601","errorCode":"-32601","errorMessage":"jsonrpc: method not found: {method}","messagePattern":"jsonrpc: method not found: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/buzz-agent/src/lib.rs","lineNumber":335,"sourceCode":"        }\n        \"session/cancel\" => {\n            cancel_session(app, params).await;\n            wire::send(wire_tx, wire::ok(id, Value::Null)).await;\n        }\n        // goose-compatible non-standard extension: inject user input into the\n        // currently active prompt without starting a new one. Mirrors goose's\n        // `_goose/unstable/session/steer` wire contract so a single client-side\n        // delivery path serves both agents.\n        \"_goose/unstable/session/steer\" => {\n            steer_session(app, id, params, wire_tx).await;\n        }\n        _ => {\n            wire::send(\n                wire_tx,\n                wire::err(\n                    id,\n                    METHOD_NOT_FOUND,\n                    &format!(\"jsonrpc: method not found: {method}\"),\n                ),\n            )\n            .await\n        }\n    }\n}\n\nasync fn handle_notification(app: &Arc<App>, method: &str, params: Value) {\n    if method == \"session/cancel\" {\n        cancel_session(app, params).await;\n    }\n}\n\nasync fn initialize(app: &Arc<App>, id: Value, params: Value, wire_tx: &WireSender) {\n    let p: InitializeParams = match decode(params, \"initialize\") {\n        Ok(p) => p,\n        Err(m) => return reject(wire_tx, id, INVALID_PARAMS, &m).await,\n    };","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/block/buzz/blob/dad5a33865fc81a2e55b3b60746632f615ec1e3a/crates/buzz-agent/src/lib.rs#L317-L353","documentation":"dispatch() routes only the methods this harness implements: session/new, session/prompt, session/set_model, session/cancel, and _goose/unstable/session/steer (plus the session/cancel notification arm). Any other method string falls to the catch-all, replying with JSON-RPC error code -32601 (method not found) and the caller's request id.","triggerScenarios":"Calling a method this buzz-agent version does not implement (e.g. a newer client extension or another agent's API); a typo'd method name; sending a request for a notification-only method and expecting a success reply.","commonSituations":"Version skew between an ACP/goose-era client and buzz-agent; porting a client from a different agent runtime that supports extra methods; capability probing scripts.","solutions":["Match your client's call list to the arms in handle_request/dispatch in crates/buzz-agent/src/lib.rs","Upgrade buzz-agent if the method exists in a newer release","Treat -32601 as capability discovery: catch it and disable that code path in the client instead of retrying"],"exampleFix":"// before (client)\nawait call(\"session/steer\", params); // typo → -32601\n\n// after\nawait call(\"_goose/unstable/session/steer\", params);","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"const KNOWN_METHODS = new Set([\n  \"session/new\",\n  \"session/prompt\",\n  \"session/set_model\",\n  \"session/cancel\",\n  \"_goose/unstable/session/steer\",\n]); // keep in sync with crates/buzz-agent/src/lib.rs dispatch()\nfunction isKnownMethod(m: string): m is (typeof KNOWN_METHODS extends Set<infer T> ? T : never) {\n  return KNOWN_METHODS.has(m);\n}","tryCatchPattern":"try {\n  await call(method, params);\n} catch (e) {\n  if (e instanceof JsonRpcError && e.code === -32601) {\n    disableFeature(method); // capability mismatch, not a transient error\n  } else throw e;\n}","preventionTips":["Pin client and buzz-agent versions together so the method surface stays in sync","Treat -32601 as capability discovery: degrade the client feature instead of retrying","Check dispatch()'s arms in crates/buzz-agent/src/lib.rs before adding calls to new methods"],"tags":["jsonrpc","method-not-found","agent","protocol","dispatch"],"backgroundTag":"jsonrpc-method-not-found","analyzedSha":"dad5a33865fc81a2e55b3b60746632f615ec1e3a","analyzedAt":"2026-08-20T04:38:24.874Z","contentChangedAt":"2026-08-20T04:38:24.874Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}