NON-FATAL: Lock acquisition failed pollutes stderr on every startup
Resolved 💬 3 comments Opened Mar 30, 2026 by axisrow Closed Apr 2, 2026
Description
Every invocation of the claude CLI writes the following to stderr:
Error: NON-FATAL: Lock acquisition failed for /Users/.../.local/share/claude/versions/2.1.87 (expected in multi-process scenarios)
While the error is non-fatal, it pollutes stderr output for applications that embed claude CLI as a subprocess and parse stderr for diagnostics. This triggers warning-level log entries in our application even though nothing is actually wrong.
Expected behavior
This message should either:
- Be suppressed entirely (since it's expected in multi-process scenarios)
- Be downgraded to a debug/trace level that doesn't appear by default
- Be written only when
--debug-to-stderris explicitly enabled
Environment
- claude CLI v2.1.87
- macOS Darwin 25.3.0
- Used via
claude-agent-sdkPython SDK
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗