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:

  1. Be suppressed entirely (since it's expected in multi-process scenarios)
  2. Be downgraded to a debug/trace level that doesn't appear by default
  3. Be written only when --debug-to-stderr is explicitly enabled

Environment

  • claude CLI v2.1.87
  • macOS Darwin 25.3.0
  • Used via claude-agent-sdk Python SDK

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗