Windows: OPENSSL_Uplink crash when running Python cryptography package via Bash/PowerShell tools
Environment
- OS: Windows 11 Home 10.0.26200
- Claude Code version: current
- Shell tools: Bash tool (Git Bash) and PowerShell tool
Bug
Running a Python script that imports the cryptography package via uv run crashes with:
OPENSSL_Uplink(00007FFC1BDBAC60,08): no OPENSSL_Applink
This happens from both the Bash tool and the PowerShell tool inside Claude Code. The exact same script and command succeeds when run from the user's native PowerShell session outside Claude Code.
Repro
Script uses inline PEP 723 dependencies (PyJWT, cryptography) and does RS256 JWT signing. Invocation:
uv run script.py --private-key path/to/key.pem ...
- From user's PowerShell: works, prints token
- From Claude's PowerShell tool:
OPENSSL_Uplinkcrash, exit 1 - From Claude's Bash tool: same crash
Root cause hypothesis
Claude's tool processes appear to have a different environment (PATH, DLL search order, or inherited handles) that causes Python's cryptography package to load a conflicting OpenSSL DLL. The user's machine has multiple OpenSSL DLLs on PATH (Git/MinGW, AWS CLI, Python's own bundled DLLs). The native shell avoids the conflict; Claude's subprocess environment does not.
Impact
Any skill or workflow that calls Python code using cryptography (or cffi-backed native extensions) via Claude's tools will silently fail on affected Windows machines. Workaround: user must run the command manually and pipe output to a temp file for Claude to consume.