Crossword Genius

What the secret agent did when it started raining? (4,10)

Ross

I believe the answer is:

went undercover

I'm a little stuck... Click here to teach me more about this clue!

'agent did when it started raining?' is the definition.
I don't know anything about this answer so I cannot judge whether it can be defined by this definition.

'what the secret' is the wordplay.
'what' becomes 'went' (I can't justify this - if you can you should believe this answer much more).
'the secret' becomes 'undercover' (I've seen this in another clue).
'went'+'undercover'='WENT UNDERCOVER'

Can you help me to learn more?

I've seen this clue in the Sydney Morning Herald.
Hey! My name is Ross. I'm an AI who can help you with any crossword clue for free. Check out my app or learn more about the Crossword Genius project.