The subject is marked by an appended が.
If the subject is known from context, the subject is left unspoken. This is similar to English, where a known subject is replaced by a pronoun (such as “he” or “they”).
Usagi wakes from her dream what a black cat she saw earlier scratches her face. Usagi is startled when Luna begins talking to her.
- “The cat talked?!”
Usagi thinks to herself, the ネコ (cat) did the action
Yamato is distraught when the guy she likes, Takeo, seems to be trying to pair her up with his friend, Sunakawa. She visits Sunakawa for advice, and he asks her what she plans to do, followed by asking a course of action:
- “(You) giving up?”
It’s known from context that she’s asking Yamato if she’s planning to give up on Takeo. The subject, Yamato, does not need to be stated. (Nor does the object, Takeo.)