Help us shape the future of Go! Take the 2026 Go Developer Survey

interrupt

command
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Command interrupt shows human-in-the-loop as a durable pause: a retry-safe tool calls agent.Interrupt to ask a human a typed question, Run returns *InterruptPending (the run has paused at the interrupt point), the caller records an answer with agent.Journal.AnswerInterrupt, and re-invoking Run with the SAME runID resumes past the interrupt with that answer.

It runs with NO API key: the model is a small inline scripted Model that calls the tool once, then answers in text once the tool returns.

go run ./examples/interrupt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL