When is "'oe" needed in commands, because I see it commands on here with and without it...
"ʻOe" is not necessary, and is usually used to emphasize who is receiving the command by the speaker.
ʻŌlelo Hawaiʻi is a very contextual language, and many words that can be implied are omitted in normal conversation while still being grammatically correct. Think about it like this: if the person you're addressing knows what you're talking about, you probably don't have to mention it again.
It is not required. Kāko'o wau iā Keola. When you want to clarify or emphasize the subject, then add it. Otherwise if the context is clear for the command, it can be omitted.
I believe a subject is required for commands. Perhaps when you didn't see ʻoe, the command was followed by a name, such as “...e Kawina”?
It is a word that shows that "ka puka" is not the subject of the sentence. It shows that "ka puka" is the thing being opened.