{"record":{"id":"eb167000dbfcee89","repo":"zed-industries/zed","slug":"invalid-input-for-inline-assistant-tool-tool-nam","errorCode":null,"errorMessage":"Invalid input for inline assistant tool `{tool_name}`: {json_parse_error}","messagePattern":"Invalid input for inline assistant tool `(.+?)`: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/buffer_codegen.rs","lineNumber":1339,"sourceCode":"                                )),\n                                cx,\n                            );\n                        } else if matches!(reason, StopReason::MaxTokens | StopReason::Refusal) {\n                            finish_with_status(\n                                CodegenStatus::Error(anyhow!(\n                                    \"Inline assistant response was interrupted ({reason:?})\"\n                                )),\n                                cx,\n                            );\n                        } else {\n                            finish_with_status(CodegenStatus::Done, cx);\n                        }\n                        return;\n                    }\n                    Ok(LanguageModelCompletionEvent::ToolUseJsonParseError {\n                        tool_name,\n                        json_parse_error,\n                        ..\n                    }) => {\n                        finish_with_status(\n                            CodegenStatus::Error(anyhow!(\n                                \"Invalid input for inline assistant tool \\\n                                 `{tool_name}`: {json_parse_error}\"\n                            )),\n                            cx,\n                        );\n                        return;\n                    }\n                    Ok(\n                        LanguageModelCompletionEvent::Queued { .. }\n                        | LanguageModelCompletionEvent::Started\n                        | LanguageModelCompletionEvent::Text(_)\n                        | LanguageModelCompletionEvent::Thinking { .. }\n                        | LanguageModelCompletionEvent::RedactedThinking { .. }\n                        | LanguageModelCompletionEvent::ReasoningDetails(_)\n                        | LanguageModelCompletionEvent::Compaction(_),","sourceCodeStart":1321,"sourceCodeEnd":1357,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/agent_ui/src/buffer_codegen.rs#L1321-L1357","documentation":"Raised when a tool call in the inline assistant's completion stream carries JSON input that fails to parse into the expected tool input type (RewriteSectionInput or the failure-message input). The offending input is the raw tool_name plus its malformed JSON payload from the model; note that incomplete streaming input is waited on, so this fires only for truly unparseable complete JSON.","triggerScenarios":"Thrown at crates/agent_ui/src/buffer_codegen.rs:1337 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the inline assist — malformed tool JSON is usually a transient model error","Simplify the edit request to reduce the complexity of generated tool input","Switch models if one provider repeatedly emits invalid tool JSON"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}