US shipping companies and workers have reached a tentative deal that will eventually clear a cargo-handling backlog snarling food product movements at 29 West Coast ports.