Can I ask for a supervisor during CBP inspection?
You may ask politely, and officers often arrange it, but you have no legal right to one. Complaints can be filed afterward.
You may ask, and it is a reasonable thing to do if you think a mistake has been made. There is no rule that obliges an officer to bring a supervisor on request, though in practice officers often do. CBP also has a way to raise concerns afterward, through its complaint channels (CBP, Information Center).
How to ask
Speak calmly and give a reason: "I think the record is wrong. May I speak to a supervisor?" The aim is to have a more senior officer look at the problem, such as an incorrect system match, an I-94 error or a document the officer does not accept. Raising your voice, refusing to answer or filming officers in a secured area tends to slow things down. Some areas of a port prohibit photography.
Officers decide when a supervisor is available. At a busy airport the wait can be significant, and a supervisor is not an appeal. They can review a decision within CBP's own chain, but they do not act as a judge.
What you do have to do
A traveler seeking admission must answer questions about identity, citizenship and the purpose of the trip, and present documents when asked (8 CFR 235.1). Refusing can result in being denied entry. A non-citizen's rights in an inspection are narrower than most people expect: there is generally no right to a lawyer at primary or secondary, though you may ask to contact one.
US citizens cannot be refused entry. Permanent residents have more protection than visitors, including a right to a hearing before an immigration judge if CBP wants to treat them as inadmissible. A returning resident who is asked to sign a form giving up status, the Form I-407, may decline.
What to do if it goes badly
Write down the date, the airport, the terminal, the officer's name and badge number if given, and what happened, while it is fresh. Keep boarding passes and any papers you were handed. Then:
Contact the CBP INFO Center through its website, which accepts compliments and complaints about the way an inspection was handled.
File a complaint with the DHS Office for Civil Rights and Civil Liberties if you believe your rights were violated (DHS, Civil Rights and Civil Liberties complaints).
If the problem is a record error that keeps recurring, file an inquiry with DHS TRIP, which handles repeated screening difficulties.
None of these reverse a decision made at the port. A refusal of admission is answered by a new visa application or by a lawyer's advice.
Who this does not apply to
A traveler at a land border or a preclearance airport abroad is in a similar position, with some differences that depend on the country. A person who has been taken into custody rather than only questioned has different options, and an immigration attorney is the person to ask.