Polyimides (PIs) such as Kapton are used extensively in spacecraft thermal blankets, solar arrays, and space inflatable structures. Atomic oxygen (AO) in low Earth orbit (LEO) causes severe degradation of Kapton. SiO2 coatings impart remarkable oxidation resistance and have been widely used to protect Kapton, yet imperfections in the SiO2 application process and micrometeoroid/debris impact in orbit damage the SiO2 coating leading to Kapton erosion. A polyimide that is self-passivating by the formation of a silica layer upon exposure to AO has been achieved by the copolymerization of a polyhedral oligomeric silsesquioxane (POSS) diamine with the Kapton monomers, pyromellitic dianhydride and 4,4'-oxydianiline, resulting in POSS-Kapton-polyimide. The self-passivating properties have been shown by monitoring a 1 micron deep scratch in POSS-PIs after exposure to AO. Kapton H, SiO2-coated Kapton HN, and 8.75 weight % Si8O11 cage "main-chain" POSS-polyimide (8.75 wt % Si8O11 MC-POSS-PI) were exposed to equivalent AO fluences before and after being scratched. During the first AO exposure and outside of the scratch, these samples eroded 5.0 microns, 0 microns, and less than 200 nm respectively. During the second AO exposure, the samples eroded an additional 5.0 microns within the scratch and outside of the scratch, 7.0 microns within the scratch and 0 microns outside of the scratch, and 200 nm within the scratch and 0 microns outside of the scratch respectively. Surface analysis of MC-POSS-PI films exposed to a hyperthermal O-atom beam shows evidence for the formation of a SiO2 passivation layer upon AO exposure. This is exemplified by erosion yields of 3.5 and 7 wt % Si8O11 MC-POSS-PI samples which were 3.7 and 0.98 percent, respectively, of the erosion yield for Kapton H at a fluence of 8.5 x 1020 O atoms cm-2. Comparison of MC-POSS-PIs and "side-chain" POSS-PI (SC-POSS-PI) shows that these polymers have similar resistance to atomic oxygen and physical properties similar to Kapton H. Erosion yields and imaging of POSS-PIs flown on MISSE1, in a sample tray exposed to all elements (AO, UV light) of the space environment, demonstrated the greatly extended lifetime of POSS-PIs over polyimide.