Implantable tubes, shunts, and other medical conduits are crucial for treating a wide range of conditions from ears and eyes to brain and liver but often impose serious risks of device infection, obstruction, migration, unreliable function, and tissue damage. Efforts to alleviate these complications remain at an impasse because of fundamentally conflicting design requirements: Millimeter-scale size is required to minimize invasiveness but exacerbates occlusion and malfunction. Here, we present a rational design strategy that reconciles these trade-offs in an implantable tube that is even smaller than the current standard of care. Using tympanostomy tubes (ear tubes) as an exemplary case, we developed an iterative screening algorithm and show how unique curved lumen geometries of the liquid-infused conduit can be designed to co-optimize drug delivery, effusion drainage, water resistance, and biocontamination/ingrowth prevention in a single subcapillary–length-scale device. Through extensive in vitro studies, we demonstrate that the engineered tubes enabled selective uni- and bidirectional fluid transport; nearly eliminated adhesion and growth of common pathogenic bacteria, blood, and cells; and prevented tissue ingrowth. The engineered tubes also enabled complete eardrum healing and hearing preservation and exhibited more efficient and rapid antibiotic delivery to the middle ear in healthy chinchillas compared with current tympanostomy tubes, without resulting in ototoxicity at up to 24 weeks. The design principle and optimization algorithm presented here may enable tubes to be customized for a wide range of patient needs.