I'm looking for the name of the logical fallacy where intent or agency is assumed when in fact there is none. It's a common fallacy in my experience, but I can't seem to find it described specifically on any site that discusses logical fallacies. It seems to be a special case of apophenia, but Wikipedia and Google turn up nothing specific to an "apophenia of intent" or any related phrase. The best I've been able to find is this rather obscure blog post that names it the "agency fallacy," but I haven't been able to find any other sites that use that phrase. Does this fallacy even have a name?
Here are a few examples:
A child, playing with magnets, finds that they repel when held one way and attract when held another way. Seeing this, the child thinks "oh, those ends want to be together, but the other ends want to be apart." They have (unconsciously) read intent into a deterministic physical process.
A picnicker gets rained on and thinks "Darn it, rain! You just couldn't resist ruining a nice day, could you?" Again, they have (unconsciously) attributed agency to a mindless natural process.
Two people pass each other in a crowded hall. One trips and stumbles into the other. The other thinks "What a jerk! Why'd they do that to me?" They have mistakenly attributed intent (specifically, malice) to an action that was accidental. This is the case of the fallacy that Hanlon's Razor warns against.
A socialist on a soapbox shouts "Capitalism is the source of all the world's evil! It's stealing our jobs and lining the pockets of bureaucrats!" Although the use of metaphor is more deliberate here than with the child or the picnicker, it is still misleading: capitalism can't do anything on its own, only the people who participate in it can.