Existing oral drug delivery modalities often fall short in medical emergencies due to the absence of readily deployable, internalized drug storage and delivery mechanisms that combine long-term standby with rapid activation. To address this challenge, we develop and validate a gastric retentive robotic capsule capable of autonomously prepositioning multiple drug doses within the stomach upon oral administration. This system maintains quiescence for extended periods while enabling on-demand, remote-triggered drug release within seconds during emergencies. In a canine (beagle) model, we demonstrate safe gastric residence and functionality for at least 10 weeks, including closed-loop emergency drug delivery modulated by external or onboard biometric sensors for unsupervised symptom detection. At the end of its service life, the capsule can be safely excreted on-demand through the administration of an alkaline solution. These findings establish such a system as a paradigm for emergency-prepared and responsive drug delivery, particularly in vulnerable patient populations.