You may be able to contribute to a 401(k) plan if you have a US employer and you do not exclude all of your foreign earned income on form 2555.
You may have better luck using just foreign tax credit instead of the exclusion. but once you stop using the foreign earned income exclusion, it is considered revoked and you cannot use it again for 5 years.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"