Currently, if you take a non-policy position in a foreign government, you cannot lose your U.S. citizenship without going in front of a U.S. consular official and saying you want to give up U.S. citizenship. If you take a policy position, it's more complicated but the government still needs to prove you intended to lose U.S. citizenship from "preponderance of evidence".
A little background: The "with the intention..." part is in line with the Supreme Court decision in Afroyim v. Rusk, which ruled that the Constitution prevented someone born or naturalized in the U.S. from having their citizenship taken away without their intent. The Supreme Court also ruled in Vance v. Terrazas that this intention must be established by itself by "preponderance of evidence" -- Congress cannot simply say that doing a certain thing implies you intend to lose citizenship.
Current State Department policy further clarifies this. If you take a non-policy position in a foreign government, or do a few other potentially expatriating acts (such as naturalizing in a foreign country), the State Department will automatically presume that you want to keep U.S. citizenship, without you needing to do anything:
The Department has a uniform administrative standard of evidence based
on the premise that U.S. nationals intend to retain United States
nationality when they obtain naturalization in a foreign state,
declare their allegiance to a foreign state, serve in the armed forces
of a foreign state not engaged in hostilities with the United States,
or accept non-policy level employment with a foreign government.
...
In light of the administrative premise discussed above, a person who:
- is naturalized in a foreign country;
- takes a routine oath of allegiance to a foreign state;
- serves in the armed forces of a foreign state not engaged in hostilities with the United States, or
- accepts non-policy level employment with a foreign government,
and in so doing wishes to retain U.S. nationality need not submit
prior to the commission of a potentially expatriating act a statement
or evidence of his or her intent to retain U.S. nationality since such
an intent will be presumed.
If asked, you can always say no:
When, as the result of an individual's inquiry or an individual's
application for registration or a passport it comes to the attention
of a U.S. consular officer that a U.S. national has performed an act
made potentially expatriating by INA Sections 349(a)(1), 349(a)(2),
349(a)(3) or 349(a)(4) as described above, the consular officer will
simply ask the applicant if he/she intended to relinquish U.S.
nationality when performing the act. If the answer is no, the consular
officer will certify that it was not the person's intent to relinquish
U.S. nationality and, consequently, find that the person has retained
U.S. nationality.
However, if you want to take a policy position in a foreign government, and a few other acts (like treason), the presumption is not clear:
The premise that a person intends to retain U.S. nationality is not
applicable when the individual:
- formally renounces U.S. nationality before a consular officer;
- serves in the armed forces of a foreign state engaged in hostilities with the United States;
- takes a policy level position in a foreign state;
- is convicted of treason.
Cases in categories 2, 3 and 4 will be developed carefully by U.S.
consular officers to ascertain the individual's intent toward U.S.
nationality.
Of course, in any case with the loss of U.S. citizenship, the standard of "preponderance of evidence" for intention to lose U.S. citizenship from Vance v. Terrazas still applies.