zed-industries/zed · error

tool input was not fully received

Error message

tool input was not fully received

What it means

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.

Solutions

  1. Retry the tool call; the model likely stopped streaming mid-arguments
  2. Check for model/provider errors that aborted generation of the tool arguments
  3. Treat the tool call as cancelled and continue the turn with an error result
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/agent/src/thread.rs:5007 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20). Data as JSON: /api/errors/885c3a500d0938f2. Report an issue: GitHub.

Appendix: source

Thrown at crates/agent/src/thread.rs:5106

}

pub enum ToolInputPayload<T> {
    Partial(serde_json::Value),
    Full(T),
    InvalidJson { error_message: String },
}

pub struct ToolInputSender {
    has_received_final: bool,
    tx: mpsc::UnboundedSender<ToolInputPayload<serde_json::Value>>,
}

impl ToolInputSender {
    pub(crate) fn channel() -> (Self, ToolInput<serde_json::Value>) {
        let (tx, rx) = mpsc::unbounded();
        let sender = Self {
            tx,
            has_received_final: false,
        };
        let input = ToolInput {
            rx,
            _phantom: PhantomData,
        };
        (sender, input)
    }

    pub(crate) fn has_received_final(&self) -> bool {
        self.has_received_final
    }

    pub fn send_partial(&mut self, payload: serde_json::Value) {
        self.tx
            .unbounded_send(ToolInputPayload::Partial(payload))
            .ok();
    }

View on GitHub (pinned to 916fc2b8cb)