A delivery device having a first chamber containing an osmotic agent, a membrane forming a wall of the first chamber through which fluid is imbibed by osmosis, a second chamber containing a beneficial agent to be delivered, and a moveable piston separating the two chambers. In fluid communication with the second chamber is an orifice which comprises a slit valve. In the presence of pressure, the beneficial agent pushes through the slit, opening up a channel for delivery of the beneficial agent and creating flow. Because the slit remains closed in the absence of flow (or when the pressure is below the pressure required to open the slit), back diffusion of external fluids is eliminated when the slit is closed, which prevents contamination of the beneficial agent in the second chamber by external fluids. In addition, forward diffusion of the beneficial agent out of the capsule is prevented when the slit is closed. The slit valve opens only to the minimum dimension required to allow the flow generated by the osmotic pumping rate. The slit valve also allows a flow path to open around any obstruction in the slit valve to prevent clogging.