Code CP_a138 was reported by the “Charge port” controller in the car. The letter “a” in the middle places it among entries of the alert type.
The car's charge port — latch, connector lock, indicator light and proximity sensor. These codes typically appear when the connector will not lock or the car does not register that it is plugged in.
The most common type. The car logged the event and may have shown it on the screen. The range is wide — from something trivial that clears itself to something that needs attention.
This is how the fault is named inside the car's firmware. For codes without a description it is the most precise clue there is — the name itself says what the event is about.
The text below comes from Tesla's technical documentation. We leave it in the original English so that translation cannot shift its meaning.
AC EVSE communicating over SWCAN faults
The EVSE reports it is faulted over SWCAN
The EVSE reports via SWCAN that it is no longer faulted, or the cable is unplugged
Charging may not start or may be interrupted unexpectedly.
Latch calibration data is unavailable (Gen 1-2 only)
EEPROM indicates that latch offset is not valid for more than one second
EEPROM indicates that latch offset is valid
Latch position may not be sensed correctly, latch may not engage or disengage
The high voltage cover is not detected
The high voltage cover is detected
The CP has instigated a wake up event due to proximity
Expected the cable to be latched in but latch is disengaged, may be frozen
info from manualCP_A079
Charge port latch does not read engaged after being driven engaged and cold weather mode is active
Charge port latch reads engaged
Charge port latch may be frozen disengaged, AC charging rate may be limited and DC charging may not start
Copy it exactly, letter and number included. Photographing the screen is safest — codes often differ by a single digit, and mixing them up leads somewhere else entirely.
Some codes clear after a screen restart or after the car sits locked for a few hours. If the code does not come back, it was usually a one-off glitch.
A one-off entry and a code that appears after every drive are two different things. It helps a service centre enormously if you know exactly when it shows up.
With airbags, brakes, steering and high voltage there is no point waiting it out. With the other groups you can watch and see whether the code returns at all.
Error codes are only part of the picture. For cars on TesList you also see battery health pulled straight from the vehicle, plus a price calculator that works out from current listings what a given car is actually worth today.