It works, and yesterday was explicitly sanctioned by the U.S. Supreme Court in The Standard Fire Insurance Co. Knowles (3/20/13):
Knowles also points out that federal courts permit individual plaintiffs, who are the masters of their complaints, to avoid removal to federal court, and to obtain a remand to state court, by stipulating to amounts at issue that fall below the federal jurisdictional requirement. That is so. ... But the key characteristic about those stipulations is that they are legally binding on all plaintiffs.But that was really not the point of the holding, just an explanation along the way to the real holding of the Court in Knowles: a plaintiff filing a Rule 23 class action, can not avoid federal jurisdiction by stipulating to an amount in controversy less than the $5 million threshold for removal under the Class Action Fairness Act of 2005, CAFA for short.
In a straight forward and unaminous decision, Justice Breyer makes a simple point. In order to avoid federal court the stipulation must be binding and no one has the power to bind future members of a class at the time of filing.