TOKYO - Japan and the U.S. have agreed in principle on guidelines for limiting immunity from Japanese prosecution for civilian workers at American military bases, following a murder case this year on a southern Japanese island involving a Marine-turned-contractor, officials said Monday.