{"record":{"id":"8631357204f31065","repo":"conductor-oss/conductor","slug":"no-non-empty-user-prompt-or-media-was-available-fo","errorCode":null,"errorMessage":"No non-empty user prompt or media was available for the LLM call. The execution started with an empty prompt or an upstream step produced empty output.","messagePattern":"No non-empty user prompt or media was available for the LLM call\\. The execution started with an empty prompt or an upstream step produced empty output\\.","errorType":"exception","errorClass":"TerminateWorkflowException","httpStatus":null,"severity":"error","filePath":"agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/ai/AgentChatCompleteTaskMapper.java","lineNumber":305,"sourceCode":"            }\n            for (ToolCall tc : msg.getToolCalls()) {\n                String name = tc.getName() != null ? tc.getName() : \"\";\n                if (WRITE_ONLY_TOOLS.stream().anyMatch(name::contains)) {\n                    msg.setMessage(\"[ok]\");\n                    if (tc.getOutput() != null) {\n                        Map<String, Object> compactedOutput = new HashMap<>(tc.getOutput());\n                        compactedOutput.put(\"result\", \"[ok]\");\n                        tc.setOutput(compactedOutput);\n                    }\n                }\n            }\n        }\n    }\n\n    void validateRunnableConversation(ChatCompletion chatCompletion) {\n        List<ChatMessage> messages = chatCompletion.getMessages();\n        if (messages == null || messages.isEmpty()) {\n            throw new TerminateWorkflowException(\n                    \"No non-empty user prompt or media was available for the LLM call. \"\n                            + \"The execution started with an empty prompt or an upstream step produced empty output.\");\n        }\n\n        boolean hasUserInput = messages.stream().anyMatch(this::isMeaningfulUserMessage);\n        if (!hasUserInput) {\n            throw new TerminateWorkflowException(\n                    \"No non-empty user prompt or media was available for the LLM call. \"\n                            + \"The execution started with an empty prompt or an upstream step produced empty output.\");\n        }\n    }\n\n    private boolean isMeaningfulUserMessage(ChatMessage message) {\n        return message != null\n                && message.getRole() == ChatMessage.Role.user\n                && (hasMeaningfulText(message.getMessage()) || hasMeaningfulMedia(message));\n    }\n","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/ai/AgentChatCompleteTaskMapper.java#L287-L323","documentation":"Error \"No non-empty user prompt or media was available for the LLM call. The execution started with an empty prompt or an upstream step produced empty output.\" thrown in conductor-oss/conductor.","triggerScenarios":"Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/ai/AgentChatCompleteTaskMapper.java:305 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty prompt, at least one media item, or non-empty context on the agent execution start request.","Check the upstream step wiring; an upstream task producing empty output flows into this LLM call.","Validate workflow input mappings so the prompt parameter is actually populated."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}