Coffee
You can roast away most of the pyrazines if you want, that will eliminate alot of the potential for green pepper. Lighter roasts, certain processing methods, and some terroirs are just naturally green pepper heavy. Then typically low stout pH amplifies it. It seems to evolve over time because the eventual oxidation of the beer is stripping the more pleasant aromatic notes of both the coffee and the beer and leaving behind the pyrazines which were there the whole time but buried underneath of everything else.
TL;DR - Don't want green pepper flavors in your coffee stout? Use a darker roast and/or coffee from Ethiopia or Sumatra. And don't let that pH fall below 4.5 in the finished beer. To grind or not to grind, contact time, extraction temperature also play a secondary role but that's a whole 'nother post.