The grating you see here (I was informed birds were kep behind it) can also be seen on the 2018 pictures of the guard room at the (east) end of the Courtyard of the Black Eunuchs.
The corridor continues to the right to that guard room, the picture is taken from (almost) the exit of the Harem (in 2017 it was used as an entrance).
I understand this was the “Kuşhâne Kapısı”, the Gate at the Aviary.