alibaba/spring-ai-alibaba · error

Feedback list is empty or contains no valid Message…

Error message

Feedback list is empty or contains no valid Message instances, stop and wait for more input.

What it means

InterruptionHook.apply: the feedback list existed but after filtering, no valid Message instances remained. The hook stops and waits — the agent stays interrupted pending properly-typed human input instead of resuming with an empty update.

Solutions

  1. Resubmit feedback as Message instances or a plain String
  2. Check the caller that builds the feedback list for type errors
  3. Treat as a wait-state: resume the graph once valid feedback arrives
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at spring-ai-alibaba-agent-framework/src/main/java/com/alibaba/cloud/ai/graph/agent/hook/InterruptionHook.java:101 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/186bcc2f228339a1. 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:101

			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 list
		@SuppressWarnings("unchecked")
		List<Message> messages = (List<Message>) state.value("messages").orElse(new ArrayList<>());

		if (!messages.isEmpty() && messages.get(messages.size() - 1) instanceof AssistantMessage assistantMessage) {
			if (assistantMessage.hasToolCalls()) {

View on GitHub (pinned to f82da0b50f)