Skip to content

MCP Tasks: interrupt in-flight queries on tasks/cancel (duckdb_interrupt) #111

Description

@jrosskopf

Follow-up from PR #107 (Codex review finding #5). tasks/cancel is currently cooperative: it cancels a queued task and marks a running one for cancellation, but cannot interrupt a SQL statement already executing — the query runs to completion (and a write tool may commit) before the task is marked cancelled.

To make cancellation preemptive, plumb a per-task DuckDB connection through the worker so tasks/cancel can call duckdb_interrupt on it. Until then, consider defaulting mcp-tool.async to read-only tools, or documenting that async write tools cannot be cancelled mid-statement (currently documented in MCP_REFERENCE §11.7).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions