Asking your pair "what the hell are we even doing" will save their life. A few hours of it, anyway.
An afternoon spent in isolation, banging out code, is an afternoon wasted if we're not even solving a problem that somebody cares about. Avdi Grimm relates a story where he is building a screen scraper to access content, an arduous process, and it did not occur to him to just parse the RSS feed that he helped define. A pair sitting with him would have pointed that out very quickly. I have done far stupider things in isolation for far longer that a pair would have prevented.
Sometimes we need to get stuff done while alone, though. Being pretty horrible and blaming not having a pair is one option. Another option is the judicious use of pomodoro's. In brief, a pomodoro is a 25 minute distraction-free work period followed by at least a 5 minute break.
This pattern of 25 minutes of concentration followed by a hard stop prevents the insidious flow from happening and allows or brains to reset. We have a chance to stop fixating on hard problems that need not be solved and focus on the ones that other humans care about.
I try not to code alone but when I do it's never for more 25 minutes at a time.