We report a strong thickness dependence of the complex frequency-dependent optical dielectric function in epitaxial CaMnO3(001) thin films on SrTiO3(001), LaAlO3(001), and SrLaAlO4(001) substrates. A doubling of the peak value of the imaginary part of the dielectric function and spectral shifts of 0.5 eV for a given magnitude of absorption are observed. On the basis of the experimental data and first-principles density functional theory calculations of the dielectric function, its evolution with thickness from 4 to 63 nm has several regimes. In the thinnest, strain-coherent films, the response is characterized by a significant contribution from the free surface that dominates strain effects. However, at intermediate and larger thicknesses approaching the bulk-like film, strain coherence and partial strain relaxation persist and in influence the dielectric function.