relpath() calls getcwd(); with the cwd deleted it raised OSError from the DEBUG log line inside get_diagnostics_sync, so the write now succeeded but its diagnostics were silently dropped for the rest of the process lifetime (found by the composite live pass with real pyright). Same class as the resolver guard.