Caterpillar identification
Although a definitive ID will likely never be possible with such low quality photos, you probably have a Western Tent Caterpillar (Malacosoma californicum).





According to the USDA Forest Service, mature larvae are about 2 inches (4.5-5.1 cm) long and are highly variable in color and markings.


This insect is the most variable of the North American species of Malacosoma, in which six subspecies and several unclassified forms have been recognized.


Although this species eats primarilly trees and shrubs (e.g., see here and here), the Minnesota DNR suggests that garden plants can also be targeted. 

Cocoons are of white silk dusted with a white to yellow powder. Your image appears to show that. 

The Western Caterpillar is found throughout western North America:



 [Source: USDA Forest Service]