Yes, the comic effect is intentional. Strong evidence of this is provided by the fact that the author's other political novel, Under Western Eyes, also contains elements of black comedy.
There is evidence that Conrad was purposefully illustrating a theory of comedy advanced by the philosopher Henri Bergson. This can be surmised as a "comedy of the ridiculous" in which humour springs from the clash between rigid structure and the innate human desire to live freely.
Bergson wrote his theory before Conrad's novels, and it was widely known in literary circles of the time. In his novel, Chance, a conversation about comedy between the character Marlow and the narrator would seem to offer a neat encapsulation of Bergson's ideas.
"But don't you know that people laugh at absurdities that are far from being comic? Didn't you read the latest books about laughter written by philosophers, psychologists?" ..... "They say", pursued the unabashed Marlow, "that we laugh from a sense of superiority. Therefore, observe, simplicity, honesty, warmth of feeling, delicacy of heart and of conduct, self-confidence, magnanimity are laughed at, because the presence of these traits in a man’s character often puts him into difficult, cruel or absurd situations, and makes us, the majority who are fairly free as a rule from these peculiarities, feel pleasantly superior."
In this sense, Conrad is using comedy in The Secret Agent to further reinforce his point about the dangers of over-regulating society. The source of the humour is the contrast between structure and freedom and we laugh because we see how pointless that structure is in the face of the human desire to live spontaneously.
Source: Henri Bergson and British Modernism by Mary Ann Gillies