{"record":{"id":"5a9b3905d376c8a1","repo":"JuliusBrussee/caveman","slug":"claude-call-failed-e-stderr","errorCode":null,"errorMessage":"Claude call failed:\n{e.stderr}","messagePattern":"Claude call failed:\n(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"plugins/caveman/skills/caveman-compress/scripts/compress.py","lineNumber":223,"sourceCode":"    # Resolve binary via shutil.which so Windows .cmd/.bat shims (e.g.\n    # %APPDATA%\\npm\\claude.CMD) work without shell=True. On POSIX,\n    # shutil.which returns the same absolute path as the implicit lookup,\n    # so this is a no-op there. Falls back to bare \"claude\" if not found\n    # on PATH so subprocess raises a clear FileNotFoundError.\n    claude_bin = shutil.which(\"claude\") or \"claude\"\n    try:\n        result = subprocess.run(\n            [claude_bin, \"--print\"],\n            input=prompt,\n            text=True,\n            capture_output=True,\n            check=True,\n            encoding=\"utf-8\",\n            errors=\"replace\",\n        )\n        return strip_llm_wrapper(result.stdout.strip())\n    except subprocess.CalledProcessError as e:\n        raise RuntimeError(f\"Claude call failed:\\n{e.stderr}\")\n\n\ndef build_compress_prompt(original: str) -> str:\n    return f\"\"\"\nCompress this markdown into caveman format.\n\nSTRICT RULES:\n- Do NOT modify anything inside ``` code blocks\n- Do NOT modify anything inside inline backticks\n- Preserve ALL URLs exactly\n- Preserve ALL headings exactly\n- Preserve file paths and commands\n- Return ONLY the compressed markdown body — do NOT wrap the entire output in a ```markdown fence or any other fence. Inner code blocks from the original stay as-is; do not add a new outer fence around the whole file.\n\nOnly compress natural language.\n\nTEXT:\n{original}","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/plugins/caveman/skills/caveman-compress/scripts/compress.py#L205-L241","documentation":"Error \"Claude call failed:\n{e.stderr}\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at plugins/caveman/skills/caveman-compress/scripts/compress.py:223 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The Claude CLI call failed; read stderr in the message, fix the invocation, and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}