I aint saying anarchists dont have agency, but its because Marxists insist on it being their way or the highway and use positions of power to disenfranchize anarchists. Anarchists obviously do not like this and resist. That is not the anarchists fault. It wasnt the CNT-FAI's fault for not wanting to disband their militias and integrate them into the Spanish Republican military structure, and it wasn't the Kronstadt Rebellion's fault for wanting the worker's soviets and freedom of speech to be brough back after Lenin centralized control to the Bolshevik party. And it certainly wasn't the Ukrainian Black Army's fault when Trotsky decided they had no use for them anymore and turned the rifle on them. Anarchists and marxists have and still do work together, the issue is the relationship is not built on mutual respect and cooperation. Marxists seem to see anarchists as a tool, that when its use is no longer needed, is expected to go back to the drawer and sit quietly while the marxists take over.
I definitely could see a situation where marxists and anarchists could cooperate on a mutual and equal level. I just do not expect it to happen.
Personally I would want protections for anarchists to freely establish anarchist organized communes and other organizations like workplaces that are independent and autonomous from the marxist state. The two would still share resources and have open borders, but the two would be free to manage their own internal affairs. To me this meets anarchist principles of free association, and still allows for a marxist state to exist. Plus I feel it would meet the marxist's principle of a transitionary state. The marxist state pops up, and the state would wither away to a stateless, classless, and moneyless society as people transition to the autonomous anarchist communes.
Do I think this would work? Possibly. Do I think an agreement like that would ever be made? No, not likely. The anarchists would still have the threat of being betrayed, and maybe even possibly the anarchists try to betray the marxist state. It would be an uneasy dynamic. And historically, marxists have shown they don't want to make room for anarchists. But unless some sort of guarantee and protections were to be placed for anarchists in some way, I don't see anarchists and marxists to ever get along.