Variations from the law of agreement are, in general, the same as in the case of other pronouns ( cross926).
a. The construction according to sense ( cross950, cross1013) often occurs, as φίλον θάλος, δν τέκον αὐτή
b. A relative in the plural may follow a singular antecedent denoting a whole class: θησαυροποιὸς ἀνήρ, οὓς . . . ἐπαινεῖ τὸ πλῆθος
ἦ μάλα τις θεὸς ἔνδον, οἳ οὐρανὸν εὐρὺν ἔχουσιν
c. A relative in the singular having a collective force may have its antecedent in the plural; as
τούτους ἐπαινεῖν, δς ἂν ἑκὼν μηδὲν κακὸν ποιῇ
ᾥτινι ἐντυγχάνοιεν . . . πάντας ἔκτεινον
d. The relative may stand in the neuter, in agreement with the notion implied in the antecedent rather than with the antecedent itself; as διὰ τὴν πλεονεξία_ν, δ πᾶσα φύσις διώκειν πέφυ_κεν ὡς ἀγαθόν
e. The relative may agree in gender and number, not with the antecedent but with a following predicate noun. This is common with
εἰ_πεν ὅτι . . . διαγεγένηται πρά_ττων τὰ δίκαια καὶ τῶν ἀδίκων ἀπεχόμενος, ἥνπερ νομίζοι καλλίστην μελέτην ἀπολογία_ς εἶναι
f. A relative may agree with a predicate noun when it follows that noun immediately and not its own substantive: καὶ δίκη ἐν ἀνθρώποις πῶς οὐ καλόν, ὃ πάντα ἡμέρωκε τὰ ἀνθρώπινα; and justice among men, how is not that something beautiful,
Herbert Weir Smyth [n.d.], A Greek Grammar for Colleges; Machine readable text [info] [word count] [Smyth].