In particle accelerators, particles are typically accelerated within a vacuum (or as close to it as possible) in order to minimize interference and collisions with air molecules during the acceleration process. This usually isn't a problem as the target of the particles are also contained within a vacuum.
However, if a particle beam were weaponized and intended to be used within the atmosphere then there would need to be a method to maintain a vacuum within the acceleration tube during acceleration, but then allow the particles to exit the weapon. Preferably this method would also need to hold up against repeat firings.
Considering the particles would be moving at a significant fraction of the speed of light if not right up against it, presumably no shutter system would be fast enough to open right when the particles have completed their acceleration to allow them to exit the weapon. Some sort of thin film might possibly be used if you'd be willing to accept some loss of energy to the particles penetrating the film, although the film would become degraded with each firing.
Are there any more sophisticated methods to allowing the particles to accelerate but then also exit a particle accelerator?