sipeed/picoclaw · error
no active turn
Error message
no active turn
What it means
State guard in AgentLoop.InterruptGraceful: getAnyActiveTurnState found no turn in the active-turn map, so there is nothing to attach a graceful interrupt to. Typical when the agent already finished (assistant reply delivered) or was never started; a legacy sentinel-style check on global loop state rather than a per-session one.
Solutions
- No action needed if the turn genuinely finished — treat as a no-op interrupt
- If a turn should be running, check that it was started and the session key is registered
- Use the session-scoped Steer/HardAbort(sessionKey) variants to avoid ambiguity in parallel mode
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/agent/steering.go:426 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/5abfa08454e009d9.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/agent/steering.go:426
if tool, ok := agent.Tools.Get("message"); ok {
if resetter, ok := tool.(interface{ ResetSentInRound(sessionKey string) }); ok {
resetter.ResetSentInRound(sessionKey)
}
}
var scope *session.SessionScope
if metaStore, ok := agent.Sessions.(session.MetadataAwareSessionStore); ok {
scope = metaStore.GetSessionScope(sessionKey)
}
return al.continueWithSteeringMessages(ctx, agent, sessionKey, channel, chatID, scope, steeringMsgs)
}
func (al *AgentLoop) InterruptGraceful(hint string) error {
ts := al.getAnyActiveTurnState()
if ts == nil {
return fmt.Errorf("no active turn")
}
if !ts.requestGracefulInterrupt(hint) {
return fmt.Errorf("turn %s cannot accept graceful interrupt", ts.turnID)
}
al.emitEvent(
runtimeevents.KindAgentInterruptReceived,
ts.eventMeta("InterruptGraceful", "turn.interrupt.received"),
InterruptReceivedPayload{
Kind: InterruptKindGraceful,
HintLen: len(hint),
},
)
return nil
}
// InterruptHard aborts an arbitrary active turn. In parallel mode this mayView on GitHub (pinned to 49183d7e8d)