{"record":{"id":"8277a4c8fbd5cdb4","repo":"zeroclaw-labs/zeroclaw","slug":"acp-elicitation-create-failed","errorCode":null,"errorMessage":"ACP elicitation/create failed: {} ({})","messagePattern":"ACP elicitation/create failed: (.+?) \\((.+?)\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/acp_channel.rs","lineNumber":150,"sourceCode":"        timeout: Duration,\n    ) -> anyhow::Result<Option<String>> {\n        let req = ElicitationRequest {\n            session_id: self.session_id.clone(),\n            mode: ElicitationMode::Form,\n            message: question.to_string(),\n            requested_schema: single_select_schema(choices),\n        };\n        debug_assert!(\n            matches!(req.mode, ElicitationMode::Form),\n            \"Phase 1 must not emit URL-mode elicitation\"\n        );\n\n        let params = serde_json::to_value(&req)?;\n        let call = self.rpc.request(\"elicitation/create\", params);\n        let response_value = match tokio::time::timeout(timeout, call).await {\n            Ok(Ok(value)) => value,\n            Ok(Err(e)) => {\n                anyhow::bail!(\"ACP elicitation/create failed: {} ({})\", e.message, e.code)\n            }\n            Err(_) => anyhow::bail!(\"ACP elicitation/create timed out after {timeout:?}\"),\n        };\n\n        let parsed: ElicitationResponse = serde_json::from_value(response_value)\n            .map_err(|e| anyhow::Error::msg(format!(\"malformed elicitation response: {e}\")))?;\n        match parsed {\n            ElicitationResponse::Accept { content } => {\n                let text =\n                    zeroclaw_api::elicitation::decode_single_select_accept(&content, choices)?;\n                Ok(Some(text))\n            }\n            ElicitationResponse::Decline | ElicitationResponse::Cancel => Ok(None),\n        }\n    }\n}\n\nimpl ::zeroclaw_api::attribution::Attributable for AcpChannel {","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/acp_channel.rs#L132-L168","documentation":"The JSON-RPC request elicitation/create itself returned an error response (message + code) instead of a result. This is the form-mode path used when the client advertises clientCapabilities.elicitation.form; the code and message embedded in the error come straight from the client, so they state why the elicitation was refused (method not implemented, invalid params, unknown sessionId).","triggerScenarios":"AcpChannel::request_choice on a form-capable client where elicitation/create is rejected: the client advertises elicitation.form but does not implement the handler, the sessionId is stale after a client restart, or the single-select requestedSchema fails the client's validation.","commonSituations":"Capability handshake lying (form advertised, handler missing); session id from a previous connection reused after reconnect; schema-shape drift between the ZeroClaw version emitting requestedSchema and the client version validating it.","solutions":["Read the (code, message) pair embedded in the error text — it is the client's own stated reason for the refusal.","Verify the session still exists on the client; re-run session/new and retry with a fresh sessionId if the client restarted.","Confirm the client genuinely implements elicitation/create; if not, stop advertising elicitation.form so the legacy permission path is used.","Align ZeroClaw and the client on protocol revisions that agree on the elicitation schema."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn client_supports_form_elicitation(caps: &ElicitationCapabilities) -> bool {\n    caps.form\n}","tryCatchPattern":"if let Err(e) = ch.request_choice(q, &choices, timeout).await {\n    if e.to_string().contains(\"elicitation/create failed\") {\n        // client refused the prompt: re-create the session or surface\n        // 'could not ask the user' to the agent instead of retrying blindly\n    }\n}","preventionTips":["Only advertise elicitation.form when elicitation/create is actually implemented","Re-create the ACP session after client restarts instead of reusing session ids","Integration-test the requestedSchema round-trip when bumping protocol versions"],"tags":["rust","acp","jsonrpc","elicitation","request-choice"],"backgroundTag":"jsonrpc-error-response","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}