micro/go-micro · error

agent: checkpointed run is input-required; resume with Resum

Error message

agent: checkpointed run is input-required; resume with ResumeInput

What it means

The checkpointed run is paused specifically at the agentInputStep, meaning the agent is waiting for user input. Streaming resume cannot supply that input, so the caller must use ResumeInput to provide it instead.

Source

Thrown at agent/stream.go:178

	}

	a.mu.Lock()
	defer a.mu.Unlock()
	if a.tools == nil {
		a.tools = ai.NewTools(a.opts.Registry, ai.ToolClient(a.opts.Client))
	}
	base := a.toolHandler()
	handler := func(ctx context.Context, call ai.ToolCall) ai.ToolResult {
		_ = sendStreamEvent(ctx, events, &StreamEvent{Type: StreamEventToolStart, ToolCall: call})
		result := base(ctx, call)
		_ = sendStreamEvent(ctx, events, &StreamEvent{Type: StreamEventToolEnd, ToolCall: call, Result: result})
		return result
	}
	a.setupWithToolHandler(handler)
	defer a.setupWithToolHandler(nil)
	if run.Status == "paused" {
		if run.State.Stage == agentInputStep {
			return nil, errors.New("agent: checkpointed run is input-required; resume with ResumeInput")
		}
		run.Status = "running"
		run.State.Stage = agentAskStep
	}
	return a.askLocked(ctx, run.ID, string(run.State.Data), run.ParentID, &run, false)
}

type agentStreamAdapter struct {
	stream AgentStream
}

type memoryRecordingStream struct {
	stream ai.Stream
	memory Memory

	mu     sync.Mutex
	chunks []string
	closed bool

View on GitHub (pinned to 24529f1404)

Solutions

  1. Call ResumeInput with the user's input to continue an input-required run
  2. Before resuming, check the checkpoint's State.Stage and branch: agentInputStep → ResumeInput, otherwise → resume stream
  3. Design the client so the UI that caused the pause is the one that submits input

Example fix

// before
stream, err := agent.ResumeStreamAsk(ctx, ag, runID) // run paused for input
// after
input, _ := collectUserInput()
resp, err := agent.ResumeInput(ctx, ag, runID, input)
Defensive patterns

Strategy: validation

Validate before calling

run, ok, _ := store.Load(ctx, runID)
if ok && run.Status == "paused" && run.State.Stage == "input" {
    return agent.ResumeInput(ctx, ag, runID, userInput)
}

Try / catch

stream, err := agent.ResumeStreamAsk(ctx, ag, runID)
if err != nil && strings.Contains(err.Error(), "input-required") {
    return agent.ResumeInput(ctx, ag, runID, collectInput())
}

Prevention

When it happens

Trigger: Calling ResumeStreamAsk/ResumeStream on a run whose checkpoint State.Stage equals agentInputStep (run.Status "paused" at the input step).

Common situations: Human-in-the-loop workflows where the agent paused for a form/confirmation and the client mistakenly resumes with the streaming API instead of submitting input; automated resumers that don't branch on pause stage.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of micro/go-micro@24529f1404 (2026-09-01). Data as JSON: /api/errors/b61b2dc8fe874f75. Report an issue: GitHub.