{"record":{"id":"885c3a500d0938f2","repo":"zed-industries/zed","slug":"tool-input-was-not-fully-received","errorCode":null,"errorMessage":"tool input was not fully received","messagePattern":"tool input was not fully received","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent/src/thread.rs","lineNumber":5106,"sourceCode":"}\n\npub enum ToolInputPayload<T> {\n    Partial(serde_json::Value),\n    Full(T),\n    InvalidJson { error_message: String },\n}\n\npub struct ToolInputSender {\n    has_received_final: bool,\n    tx: mpsc::UnboundedSender<ToolInputPayload<serde_json::Value>>,\n}\n\nimpl ToolInputSender {\n    pub(crate) fn channel() -> (Self, ToolInput<serde_json::Value>) {\n        let (tx, rx) = mpsc::unbounded();\n        let sender = Self {\n            tx,\n            has_received_final: false,\n        };\n        let input = ToolInput {\n            rx,\n            _phantom: PhantomData,\n        };\n        (sender, input)\n    }\n\n    pub(crate) fn has_received_final(&self) -> bool {\n        self.has_received_final\n    }\n\n    pub fn send_partial(&mut self, payload: serde_json::Value) {\n        self.tx\n            .unbounded_send(ToolInputPayload::Partial(payload))\n            .ok();\n    }\n","sourceCodeStart":5088,"sourceCodeEnd":5124,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent/src/thread.rs#L5088-L5124","documentation":"Streamed tool input terminated without ever receiving a ToolInputPayload::Full: the sender dropped or the stream ended after only partial updates (or nothing), so recv() cannot produce a complete deserialized input for the tool.","triggerScenarios":"Thrown at crates/agent/src/thread.rs:5007 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the tool call; the model likely stopped streaming mid-arguments","Check for model/provider errors that aborted generation of the tool arguments","Treat the tool call as cancelled and continue the turn with an error result"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}