sipeed/picoclaw · error
turn is already aborting
Error message
turn %s is already aborting
What it means
Transition guard in the deprecated InterruptHard: the active turn's requestHardAbort returned false — the turn already has an abort in flight (an earlier InterruptHard/HardAbort succeeded), so a second abort request is refused as redundant. The turnID identifies the turn that is already aborting; nothing is emitted and no state changes.
Solutions
- Treat as success: the abort was already requested and is in progress
- Wait for the abort to complete instead of re-requesting
- Use HardAbort(sessionKey) for a session-safe idempotent check
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/agent/steering.go:457 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/e193d2d615a19fcb.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/agent/steering.go:457
)
return nil
}
// InterruptHard aborts an arbitrary active turn. In parallel mode this may
// target the wrong session. Prefer HardAbort(sessionKey) instead.
//
// Deprecated: Use HardAbort(sessionKey) for session-safe aborts.
func (al *AgentLoop) InterruptHard() error {
ts := al.getAnyActiveTurnState()
if ts == nil {
return fmt.Errorf("no active turn")
}
if strings.HasPrefix(ts.turnID, "pending-") {
return fmt.Errorf("turn is still initializing for session %s", ts.sessionKey)
}
if !ts.requestHardAbort() {
return fmt.Errorf("turn %s is already aborting", ts.turnID)
}
al.emitEvent(
runtimeevents.KindAgentInterruptReceived,
ts.eventMeta("InterruptHard", "turn.interrupt.received"),
InterruptReceivedPayload{
Kind: InterruptKindHard,
},
)
return nil
}
// ====================== SubTurn Result Polling ======================
// dequeuePendingSubTurnResults polls the SubTurn result channel for the given
// session and returns all available results without blocking.
// Returns nil if no active turn state exists for this session.View on GitHub (pinned to 49183d7e8d)