The angel carries a lilly, or possibly a fleur-de-lys scepter, but not a sword - and hence is not presumably the 'captain of the
host of the Lord'. This may be the artist's way of showing God instructing Joshua (perhaps about the circumcision or the carrying
of the Ark) but since elsewhere God is show addressing Joshua directly, it is not clear why he should be shown using an angelic
messenger here.