Random when wandering miles inside (7)
I believe the answer is:
aimless
'random' is the definition.
(I've seen this in another clue)
'when wandering miles inside' is the wordplay.
'when' becomes 'as' (eg 'when I walked' means 'as I walked').
'wandering' indicates anagramming the letters.
'inside' means one lot of letters goes inside another.
'miles' is an anagram of 'imles'.
'as' enclosing 'imles' is 'AIMLESS'.
(Other definitions for aimless that I've seen before include "not knowing where to go?" , "Without purpose or target" , "With no plan or programme" , "lacking direction" , "Without direction or ambition" .)