alibaba/spring-ai-alibaba · error
Feedback list contains non-Message item, ignoring. Type
Error message
Feedback list contains non-Message item, ignoring. Type: {} What it means
InterruptionHook.apply logs a warning while converting interruption feedback: an element of the feedback list was not a Message instance and is skipped. The hook tolerates mixed input (List<Message>, UserMessage, String) and proceeds with the valid subset.
Solutions
- Pass only Message instances (or plain String) as interruption feedback
- Fix the client code that serializes feedback into thread state
- Ignore safely — the invalid item is skipped, valid ones still apply
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at spring-ai-alibaba-agent-framework/src/main/java/com/alibaba/cloud/ai/graph/agent/hook/InterruptionHook.java:96 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09).
Data as JSON: /api/errors/f107787e1894cc06.
Report an issue: GitHub.
Appendix: source
Thrown at spring-ai-alibaba-agent-framework/src/main/java/com/alibaba/cloud/ai/graph/agent/hook/InterruptionHook.java:96
// it will either see the old value (before removal) or set a new value (after removal)
// The remove() operation is atomic, preventing race conditions
Object feedback = agentThreadState.remove(INTERRUPTION_FEEDBACK_KEY);
if (feedback == null) {
log.debug("No interruption feedback found in state, continue reasoning with no updates.");
return CompletableFuture.completedFuture(Map.of());
}
List<Message> feedbackMessages = new ArrayList<>();
// Check if feedback is List<Message>, UserMessage, or String
if (feedback instanceof List<?> feedbackList) {
// Check if all elements in the list are Message instances
for (Object item : feedbackList) {
if (item instanceof Message) {
feedbackMessages.add((Message) item);
} else {
log.warn("Feedback list contains non-Message item, ignoring. Type: {}",
item != null ? item.getClass().getName() : "null");
}
}
if (feedbackMessages.isEmpty()) {
log.warn("Feedback list is empty or contains no valid Message instances, stop and wait for more input.");
return CompletableFuture.completedFuture(Map.of());
}
} else if (feedback instanceof UserMessage) {
feedbackMessages.add((UserMessage) feedback);
} else if (feedback instanceof String) {
feedbackMessages.add(new UserMessage((String) feedback));
} else {
log.warn("Interruption feedback is neither List<Message>, UserMessage nor String, stop and wait for more input. Type: {}",
feedback.getClass().getName());
return CompletableFuture.completedFuture(Map.of());
}
// Get current messages listView on GitHub (pinned to f82da0b50f)