{"record":{"id":"c75ae1ca5d870126","repo":"sgl-project/sglang","slug":"action-policy-returned-no-output-c75ae1","errorCode":null,"errorMessage":"action policy returned no output","messagePattern":"action policy returned no output","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/entrypoints/diffusion_generator.py","lineNumber":473,"sourceCode":"            self.server_args.model_path,\n            server_args=self.server_args,\n            **sampling_params_kwargs,\n        )\n        if sampling_params.data_type != DataType.ACTION:\n            raise ValueError(\n                f\"generate_action requires an ACTION pipeline, got {sampling_params.data_type}\"\n            )\n\n        req = prepare_request(\n            server_args=self.server_args,\n            sampling_params=sampling_params,\n            external_trace_header=external_trace_header,\n        )\n        output_batch = self._send_to_scheduler_and_wait_for_response(req)\n        if output_batch.error:\n            raise RuntimeError(output_batch.error)\n        if output_batch.output is None:\n            raise RuntimeError(\"action policy returned no output\")\n        return output_batch.output[0]\n\n    def _resolve_prompts(\n        self,\n        prompt: str | list[str] | None,\n        prompt_path: str | None = None,\n    ) -> list[str]:\n        \"\"\"Collect prompts from the argument or from a prompt file.\"\"\"\n        path = prompt_path or self.server_args.prompt_file_path\n        if path is not None:\n            if not os.path.exists(path):\n                raise FileNotFoundError(f\"Prompt text file not found: {path}\")\n            with open(path, encoding=\"utf-8\") as f:\n                prompts = [line.strip() for line in f if line.strip()]\n            if not prompts:\n                raise ValueError(f\"No prompts found in file: {path}\")\n            logger.info(\"Found %d prompts in %s\", len(prompts), path)\n            return prompts","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/entrypoints/diffusion_generator.py#L455-L491","documentation":"generate_action got a successful (non-error) response from the scheduler but output_batch.output is None, meaning the action policy produced no output payload. This indicates an empty/aborted generation on the worker side rather than an explicitly reported error.","triggerScenarios":"generate_action() where the scheduler returns successfully but attaches no output — e.g. request aborted, empty batch, or a worker path that returns early without populating outputs.","commonSituations":"Empty or whitespace-only observation/prompt; request cancelled mid-flight; edge case in the action pipeline where no frames were generated.","solutions":["Log and inspect the full OutputBatch (output, output_file_paths, error) to see which fields are populated","Verify the prompt/observation passed to generate_action is non-empty and well-formed","Check scheduler logs for early-return/abort paths on this request","Retry the call once — if it consistently returns None, file it as a pipeline bug with the batch dump"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"assert prompt and prompt.strip(), \"observation/prompt must be non-empty\"","typeGuard":"def is_valid_action_prompt(prompt) -> bool:\n    return isinstance(prompt, str) and bool(prompt.strip())","tryCatchPattern":"try:\n    action = generator.generate_action(prompt=obs)\nexcept RuntimeError as e:\n    if \"no output\" in str(e):\n        action = default_action  # fallback policy\n    else:\n        raise","preventionTips":["Never pass empty strings as observations","Log the full OutputBatch fields when this fires to capture evidence for a bug report"],"tags":["action-policy","empty-output","scheduler","diffusion"],"backgroundTag":"empty-backend-response","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}