- Replace fixed depth of 20 with dynamic calculation - Use Math.max(commitCount, 20) to ensure minimum context