I had always understood that Yosef's brothers sold him to the Ishmaelites. We know that they planned to do so, but during this week's torah reading I noticed this for the first time:
כח וַיַּעַבְרוּ אֲנָשִׁים מִדְיָנִים סֹחֲרִים, וַיִּמְשְׁכוּ וַיַּעֲלוּ אֶת-יוֹסֵף מִן-הַבּוֹר, וַיִּמְכְּרוּ אֶת-יוֹסֵף לַיִּשְׁמְעֵאלִים, בְּעֶשְׂרִים כָּסֶף; וַיָּבִיאוּ אֶת-יוֹסֵף, מִצְרָיְמָה. 28
And there passed by Midianites, merchantmen; and they drew and lifted up Joseph out of the pit, and sold Joseph to the Ishmaelites for twenty shekels of silver. And they brought Joseph into Egypt. (Gen 37:26)
The "they" is ambiguous. It could mean that the brothers had the Midianites do the deed for them -- earlier Reuven says "let not our hand be on him"; the implication is "let's not kill him" but maybe it's more general? Or it could be that the Midianites came along while the brothers were eating and not paying attention, and their plans to do the deed were thrwarted? Rashi's comment on this is just to say that this shows that Yosef was sold several times, which doesn't seem very helpful.
So my questions are:
Did the Midianites act on their own (and collect the money) and the bothers weren't part of the transaction? Or did they act as agents for the brothers?
If the Midianites acted on their own, what did the brothers know? Did they know he'd been sold or only that he was gone from the pit? (Were they possibly as surprised as Yaakov 22 years later upon learning that Yosef was alive?)