affaan-m/ECC · error · RuntimeError
classifier subprocess failed (rc={result.returncode}): {resu
Error message
classifier subprocess failed (rc={result.returncode}): {result.stderr[:500]} What it means
Error "classifier subprocess failed (rc={result.returncode}): {result.stderr[:500]}" thrown in affaan-m/ECC.
Source
Thrown at skills/skill-comply/scripts/classifier.py:54
for i, event in enumerate(trace)
)
prompt_template = (PROMPTS_DIR / "classifier.md").read_text()
prompt = (
prompt_template
.replace("{steps_description}", steps_desc)
.replace("{tool_calls}", tool_calls)
)
result = subprocess.run(
["claude", "-p", prompt, "--model", model, "--output-format", "text"],
capture_output=True,
text=True,
timeout=60,
)
if result.returncode != 0:
raise RuntimeError(
f"classifier subprocess failed (rc={result.returncode}): "
f"{result.stderr[:500]}"
)
return _parse_classification(result.stdout)
def _parse_classification(text: str) -> dict[str, list[int]]:
"""Parse LLM classification output into {step_id: [event_indices]}."""
text = text.strip()
# Strip markdown fences
lines = text.splitlines()
if lines and lines[0].startswith("```"):
lines = lines[1:]
if lines and lines[-1].startswith("```"):
lines = lines[:-1]
cleaned = "\n".join(lines)
View on GitHub (pinned to 01e15490f0)
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.
Example fix
claude -p "ping" --model <allowed-model> --output-format text # reproduce, fix auth/model, then rerun classifier
When it happens
Trigger: Thrown at skills/skill-comply/scripts/classifier.py:54 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/3f9e782a9e91d2be.
Report an issue: GitHub.