CopilotKit/CopilotKit · error

[CopilotKit] useInterrupt: cancel() is not supported for leg

Error message

[CopilotKit] useInterrupt: cancel() is not supported for legacy on_interrupt interrupts; dismissing.

What it means

Error "[CopilotKit] useInterrupt: cancel() is not supported for legacy on_interrupt interrupts; dismissing." thrown in CopilotKit/CopilotKit.

Source

Thrown at packages/vue/src/v2/hooks/use-interrupt.ts:283

    if (current.interrupts.length > 1 && interruptId === undefined) {
      console.warn(
        `[CopilotKit] useInterrupt: resolve()/cancel() called without an interruptId while ${current.interrupts.length} interrupts are open; defaulting to the first. Pass an interruptId to address a specific interrupt.`,
      );
    }
    const id = interruptId ?? current.interrupts[0]?.id;
    if (!id) return;
    responses[id] = { status: "resolved", payload };
    return submitStandardIfComplete(current.interrupts);
  };

  const cancel: InterruptCancelFn = async (interruptId?) => {
    const current = pending.value;
    if (!current) return;

    if (current.kind === "legacy") {
      // Legacy interrupts have no cancel semantics; dismiss without resuming.
      console.warn(
        "[CopilotKit] useInterrupt: cancel() is not supported for legacy on_interrupt interrupts; dismissing.",
      );
      pending.value = null;
      return;
    }

    if (current.interrupts.length > 1 && interruptId === undefined) {
      console.warn(
        `[CopilotKit] useInterrupt: resolve()/cancel() called without an interruptId while ${current.interrupts.length} interrupts are open; defaulting to the first. Pass an interruptId to address a specific interrupt.`,
      );
    }
    const id = interruptId ?? current.interrupts[0]?.id;
    if (!id) return;
    responses[id] = { status: "cancelled" };
    return submitStandardIfComplete(current.interrupts);
  };

  // Keep resolveInterrupt and cancelInterrupt as aliases for back-compat.

View on GitHub (pinned to 68fbe97d87)

When it happens

Trigger: Thrown at packages/vue/src/v2/hooks/use-interrupt.ts:283 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of CopilotKit/CopilotKit@68fbe97d87 (2026-08-27). Data as JSON: /api/errors/f137afc69f965437. Report an issue: GitHub.