All major English dictionaries say that consesnsus is uncountable, but right under this warning they provide example sentences like the following:"We reached a consesnsus." How come?
Consensus can either be singular or noncountable.
As in the following examples from Learner's Dictionary:
The (general) consensus (of the group) was to go ahead with the plan.
Scientists have not reached a consensus on the cause of the disease. [=scientists do not yet agree about the cause of the disease]
There is a growing consensus [=more and more people agree] about/on the need for further investigation.
What is the consensus of opinion among the experts? [=what do the experts all say?]
Everyone on the council seems to understand the need for consensus.
There is a lack of consensus among the citizens.
The decision was made by consensus
When you use the singular the emphasis is placed on the individual consensus. Perhaps the consensus took much time to hammer out, perhaps there was much compromise on the way, regardless the singular form places the reader's attention on the individual consensus, and the specifics associated with that unique consensus.
The uncounted form instead places the emphasis more abstractly on the fact that consensus was reached, needs to be reached, etc.