{"record":{"id":"3f9e782a9e91d2be","repo":"affaan-m/ECC","slug":"classifier-subprocess-failed-rc-result-returncod","errorCode":null,"errorMessage":"classifier subprocess failed (rc={result.returncode}): {result.stderr[:500]}","messagePattern":"classifier subprocess failed \\(rc=(.+?)\\): (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"skills/skill-comply/scripts/classifier.py","lineNumber":54,"sourceCode":"        for i, event in enumerate(trace)\n    )\n\n    prompt_template = (PROMPTS_DIR / \"classifier.md\").read_text()\n    prompt = (\n        prompt_template\n        .replace(\"{steps_description}\", steps_desc)\n        .replace(\"{tool_calls}\", tool_calls)\n    )\n\n    result = subprocess.run(\n        [\"claude\", \"-p\", prompt, \"--model\", model, \"--output-format\", \"text\"],\n        capture_output=True,\n        text=True,\n        timeout=60,\n    )\n\n    if result.returncode != 0:\n        raise RuntimeError(\n            f\"classifier subprocess failed (rc={result.returncode}): \"\n            f\"{result.stderr[:500]}\"\n        )\n\n    return _parse_classification(result.stdout)\n\n\ndef _parse_classification(text: str) -> dict[str, list[int]]:\n    \"\"\"Parse LLM classification output into {step_id: [event_indices]}.\"\"\"\n    text = text.strip()\n    # Strip markdown fences\n    lines = text.splitlines()\n    if lines and lines[0].startswith(\"```\"):\n        lines = lines[1:]\n    if lines and lines[-1].startswith(\"```\"):\n        lines = lines[:-1]\n    cleaned = \"\\n\".join(lines)\n","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/skills/skill-comply/scripts/classifier.py#L36-L72","documentation":"Error \"classifier subprocess failed (rc={result.returncode}): {result.stderr[:500]}\" thrown in affaan-m/ECC.","triggerScenarios":"Thrown at skills/skill-comply/scripts/classifier.py:54 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the stderr tail in the message for the underlying cause (auth, model, or network failure from the claude CLI).","Verify the claude CLI is installed and authenticated: run 'claude -p \"ping\"' manually to reproduce.","Confirm the requested model is allowed and available; retry transient network failures.","Ensure the prompt size and the 60s timeout are adequate; reduce the input or increase the timeout in classifier.py if needed."],"exampleFix":"claude -p \"ping\" --model <allowed-model> --output-format text  # reproduce, fix auth/model, then rerun classifier","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}