cd /news/developer-tools/interrupt-the-llm-keep-the-chat-turn… · home topics developer-tools article
[ARTICLE · art-63235] src=loomcycle.dev ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Interrupt the LLM, keep the chat: turn-scoped cancellation (v1.22.0)

Loom SDK v1.22.0 introduces turn-scoped cancellation, allowing users to stop an in-flight model generation and its tool calls while preserving the session, transcript, and context. The update adds new SSE frames, gRPC and HTTP endpoints, and front-end support via the Esc key, alongside model pattern auto-tracking and bundled chat agents with HTTP tools.

read1 min views1 publishedJul 16, 2026

RFC BH splits stop-the-turn from stop-the-run. POST /v1/runs/{run_id}/cancel {reason?} stops the current turn of an interactive run (the in-flight model generation plus the tool calls it started) and parks it at awaiting_input with the session, transcript, and context intact — instead of throwing the session away like whole-run cancel did. The loop keeps the partial output and synthesizes cancelled-by-operator tool_results for any in-flight tool_use so the next turn's history stays valid. Run-cancel vs. turn-cancel is double-guarded on ctx.Err() plus the ErrTurnCancelled cause. A new turn_cancelled SSE frame distinct from the run-level cancelled. Interruption decline: a pending Question can be resolved with disposition:"declined" so the agent proceeds without an answer. Cross-replica routing by runs.replica_id (new internal/turncancel registry + coord.TurnCancelCoordinator). Every transport: gRPC CancelTurn + ResolveInterrupt RPCs, @loomcycle/client cancelTurn / cancelInterrupt, Python cancel_turn / resolve_interrupt / cancel_interrupt; HTTP + gRPC share extracted connector cores. LoomBoard's Esc key was the front-end driver. Also folded in: RFC BG P1 model_pattern for auto-tracking a model family (claude-haiku-*), and bundled chat agents gaining the HTTP tool.

── more in #developer-tools 4 stories · sorted by recency
── more on @loom sdk 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/interrupt-the-llm-ke…] indexed:0 read:1min 2026-07-16 ·