These instructions apply to the Mercedes CLA Mk2 (C118) 2019-Present.
For other models, please choose your vehicle here.
If the panoramic sunroof on your Mercedes-Benz CLA (C118, 2019–present) stops auto-closing, won’t tilt properly, or behaves oddly after the battery was disconnected or went flat, it needs re-initialising. The roof motor has lost its learned positions; re-teaching them takes under a minute with the roof switch. This is a normal recovery function, not a fault — the same learn routine is used after the roof is first assembled, and any owner can run it from the driver’s seat with no tools and no workshop visit. On the CLA the whole sequence is driven from the overhead roof switch, so once you know the hold-and-release trick you can repeat it any time a loss of power wipes the memory again.

Why It Happens
The sunroof controller stores its tilt, open and closed limits so it can run on one touch and auto-reverse on an obstruction. Those learned end-points tell the module exactly where fully closed and fully open sit, and they are what makes the anti-trap protection work — the motor watches for resistance against a known travel range and reverses if it meets an obstacle. A power cut clears that memory. Whether from a flat battery, a jump start, or simply disconnecting the terminals for a battery change, losing the supply wipes the stored positions. Until you teach them back, the roof may only move while the switch is held, may stop short of closed, or may refuse to auto-close, because it no longer trusts its own limits.
Before You Start
- Switch the ignition on so the roof motor has a steady supply for the whole cycle.
- Fully close the sunroof glass and the sunshade first — the routine begins from the closed position.
- Make sure the battery is healthy. If a weak battery caused the reset, charge or replace it before you start, or the cycle may stall.
- Clear the roof track of leaves, grit or ice, and keep hands, hair and loose items away from the opening.
- Allow an uninterrupted minute — the switch has to stay held right through the sequence.
How to Re-initialise the Sunroof
- Switch the ignition on.
- Make sure the sunroof and sunshade are closed.
- Press and hold the close switch (push it to the close position). The roof will move slightly — keep holding.
- The roof runs through its full close/tilt cycle automatically; keep the switch held until it finishes.
- Release — the system is reset and one-touch works again.
If It Doesn’t Complete
- Don’t release early. The commonest cause of a failed reset is letting go before the glass has run right through its cycle. Hold the switch the whole time, including any brief pauses.
- Clear any obstruction in the roof track and along the seals — a snag can make the motor think it has reached a limit too soon.
- Confirm the battery is healthy. A voltage drop mid-cycle interrupts the learn; charge the battery or run the routine with the engine running.
- Start from fully closed. If the glass was left part-open, close it first, then begin the hold again.
- Repeat from the top if the first attempt stalled — release, let things settle, and run the full hold-and-cycle again.
What to Expect After
Once the glass has completed its cycle and you release the switch, one-touch operation and the auto-reverse safety feature should both work again immediately. Tap the switch for a normal one-touch open and close, and check the tilt function responds properly. If the panel moves smoothly and stops cleanly at each limit, the re-initialisation has taken and there is nothing more to do.
Frequently Asked Questions
Why did my CLA sunroof stop auto-closing?
A battery disconnect or flat battery wiped its learned limits, so the controller no longer knows where fully closed sits and disables one-touch and auto-reverse as a safeguard. Re-initialising re-teaches those positions and restores normal operation.
How do I reset the Mercedes CLA sunroof?
With the ignition on and the glass and sunshade closed, press and hold the close switch. Let the roof run through its full close/tilt cycle without releasing, then let go when it finishes. That single hold teaches the limits back.
Is it safe to do myself?
Yes — it’s a built-in owner function with no electrical or under-car work. The one thing to watch is the moving glass: keep hands, hair and objects clear of the roof opening throughout the cycle, and don’t let children reach up while it runs.
Do I need a tool?
No — it’s done with the sunroof switch only. There is no menu to enter, no scan tool and nothing to buy; just the overhead switch, a healthy battery and a clear roof track.
Do I have to redo this every time?
Only when the roof loses its memory again, which normally means another loss of power — a flat battery or disconnecting the terminals. In everyday driving the learned positions stay stored, so a one-off reset after a battery job is usually all it takes.
The roof only moves while I hold the switch — is it broken?
Usually not. Losing one-touch and moving only on a held switch is the classic sign of cleared limits, which is exactly what this routine fixes. Run the re-initialisation first; if one-touch still won’t return, then have the switch and motor checked.
Re-initialised the sunroof after a battery change? Re-teach the windows too — see our CLA window guide. For warning lights, look up the code on autodtcs.com.
Independent guide — not affiliated with Mercedes. Always follow your official service manual and safety precautions. Read our full disclaimer.