Discontinuous planes often develop in soils and affect the mechanical behavior (stiffness and strength) and transport properties of sediments (fluid migration and diffusion). The fundamental understanding of the development of discontinuities in soils must recognize their inherent granular nature and effective-stress dependent behavior. We use complementary experimental, analytical and numerical methods to study particle-scale mechanisms involved in contraction-driven shear failure due to mineral dissolution, desiccation cracks, and hydraulic fractures. We show that: (1) under zero-lateral strain conditions, particle-scale volume contraction causes a stress decrease from k0-to-ka so that shear strain localization can develop in sediments with post-peak strain softening response; (2) the development of desiccation cracks in fine grained sediments is determined by the invasion of the air-water interface membrane and ensuing changes in particle forces and displacements; (3) hydraulic fracture results from positive feedback between changes in pore size and the associated changes in particle-level capillary forces (immiscible fluids), seepage drag forces (miscible fluids) and skeletal forces. These particle-level mechanisms are compatible with the effective stress dependent frictional behavior of soils.