Jim is correct. That's what session musicians get paid to do, there's no "agreement" per se, it's just an industry standard and it's always been done that way. It's a fair arguement that they should get some kind of royalty - in most countries, artists/producers/session musicians get a performance royalty, or "performance in a sound recording". The U.S. is one of a very small group of countries that does not pay that royalty. Efforts have been made, and continue to be made, to change this, but the radio broadcasters lobby is one of the most powerful lobbying groups in the U.S. and they have thus far completely blocked that from happening.

They should not, IMO, get a co-writer credit on the songs they play on however. If a session musician ever asked me for that, I would tell them (not very politely) to pack their gear and take a hike. They get paid a fee to perform a service - they get paid regardless if the song ever gets recorded, or becomes a hit, or not. They assume none of the risk, take on none of the responsibility of trying to get the song recorded, or played, etc. To get paid master or demo scale, and get writing credit on top of that, is double dipping and there's no way I would ever go along with that. It should be addressed in the performance in a sound recording, and that's not happening because of broadcasters.

Watch a bit of the videos below of legendary session guitarist Reggie Young. He played some of the most iconic guitar licks in history, and he didn't get songwriter credit for any of them - never expected to. He DID argue later in life that they (studio musicians) should get a performance royalty, and I agree with that. But that's entirely different than writing credit.
http://www.youtube.com/watch?v=9EEkHO6jxjc
http://www.youtube.com/watch?v=c-6zd-z1qm8