The J.P. Morgan Chase & Co. trader known as the "London whale" has reached an agreement with federal authorities to avoid criminal prosecution over a $6 billion trading loss, but two former colleagues are expected to be charged as soon as Wednesday, according to people close to the case.

Prosecutors are expected to charge Javier Martin-Artajo, a Spaniard who led the team that made the disastrous trades, and Julien Grout, a Frenchman responsible for recording and distributing daily values on the group's positions....