zed-industries/zed · error

Inline assistant response was interrupted ({reason:?})

Error message

Inline assistant response was interrupted ({reason:?})

What it means

Emitted when the inline assistant's completion stream stops with StopReason::MaxTokens or StopReason::Refusal before the edit completes. The response was terminated by the provider for length or policy reasons rather than finishing normally; the offending condition is the interruption stop reason on the model stream, not the tool input itself.

Source

Thrown at crates/agent_ui/src/buffer_codegen.rs:1323

                                        return;
                                    }
                                }
                            }
                        }
                    }
                    Ok(LanguageModelCompletionEvent::UsageUpdate(token_usage)) => {
                        *last_token_usage.lock() = token_usage;
                    }
                    Ok(LanguageModelCompletionEvent::Stop(reason)) => {
                        if !failure_complete {
                            finish_with_status(
                                CodegenStatus::Error(anyhow!(
                                    "Inline assistant stopped before completing \
                                     `{REWRITE_SECTION_TOOL_NAME}` or \
                                     `{FAILURE_MESSAGE_TOOL_NAME}` ({reason:?})"
                                )),
                                cx,
                            );
                        } else if matches!(reason, StopReason::MaxTokens | StopReason::Refusal) {
                            finish_with_status(
                                CodegenStatus::Error(anyhow!(
                                    "Inline assistant response was interrupted ({reason:?})"
                                )),
                                cx,
                            );
                        } else {
                            finish_with_status(CodegenStatus::Done, cx);
                        }
                        return;
                    }
                    Ok(LanguageModelCompletionEvent::ToolUseJsonParseError {
                        tool_name,
                        json_parse_error,
                        ..
                    }) => {
                        finish_with_status(

View on GitHub (pinned to 5a9b9558db)

Solutions

  1. Retry the assist, or reduce the selection size to fit the output limit
  2. For refusal stops, rephrase the request to avoid policy-triggering content
  3. Switch to a model with a larger context/output budget
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/agent_ui/src/buffer_codegen.rs:1321 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20). Data as JSON: /api/errors/f9b525cfaccd65dc. Report an issue: GitHub.