Across various Marxist works, the proletarian revolution sometimes seems to be presented as a historical inevitability, and sometimes seemingly as an outcome that communists have a moral duty to work towards and achieve. For instance, Marx and Engels say in The Communist Manifesto that
The development of modern industry, therefore, cuts from under its feet the very foundation on which the bourgeoisie produces and appropriates products. What the bourgeoisie therefore produces, above all, are its own grave diggers. Its fall and the victory of the proletariat are equally inevitable.
On the other hand, in A Great Beginning, Lenin says:
We must carefully study the feeble new shoots, we must devote the greatest attention to them, do everything to promote their growth and "nurse” them. Some of them will inevitably perish. We cannot vouch that precisely the "communist subbotniks” will play a particularly important role. But that is not the point. The point is to foster each and every shoot of the new; and life will select the most viable.
I get that these two views aren't contradictory. In fact this quote from The Eighteenth Brumaire explains quite succinctly why developments are brought about by a mix of conscious and unconscious forces, on a societal level:
Men make their own history, but they do not make it as they please; they do not make it under self-selected circumstances, but under circumstances existing already, given and transmitted from the past.
What I'm confused by is whether this view is applicable on an individual level. To what extent do individuals have "free will" (meaning a capacity to make choices that is somewhat independent from their material conditions)? Given that individuals are just an "ensemble of the social relations" (Theses on Feuerbach), it seems like they have no free will at all, but in that case I don't understand why Marx, Engels, and Lenin would appeal to the proletariat on the basis of "duty", which seems to suggest some degree of free will (such as regarding the choice whether to do their duty). Alternatively, a better question might be: how should I understand the concept of "free will"? Recommendations for authors or texts would also be highly appreciated.
Side note: I find it interesting to consider Althusser's Contradiction and Overdetermination, where he speaks of "the relative autonomy of the superstructures", in relation to this. But once again I'm unsure as to whether the concept can be applied on an individual level.
Edit: I did look through both this sub and r/communism for posts on free will, but for the most part people just provided the same quote from The Eighteenth Brumaire that I have included here and did not really explain further. To reiterate, my confusion is regarding why communists appeal to the proletariat on the basis of duty, which seems to presume the existence of individuals with some amount of free will, if ultimately these things do not exist or are just illusions.