'Yeah. No.' in the sense of 'I think so—oops, I was wrong!'
Use of "Yeah. No." with a consistent intonation but with the to expressions pointing toward diametrically opposed conclusions (usually with comedic undertones) is probably fairly recent, at least as a popular trope in English. This is the usage that appears in Tallulah Darling, My Ex from Hell (the Blooming Goddess Trilogy Book One) (2013):
Their fie simply bounced harmlessly off the air above the fence. I really was in a giant protective shield. I smiled thinly. My turn. I figured that since I had the upper hand, I should take these things [Infernorators] out.
In my defense, it never occurred to me that this was a two-way ward. In my head, it was all about me, me,me. So of course I'd be able to fire outwards.
Yeah ... no. I sent my ribbons lashing out toward those bad boys. They hit the invisible shield at full speed, then bounced off it to rebound back at me.
A similar ironical usage appears in William Konescu, Kara Was Here: A Novel (2013):
While they were waiting for a cab, Gwen asked if Margot smoked pot. Margo laughed and sort of snorted like a pig, and said, "Yeah, no," as if the question had been a joke.
This usage seems to have become popular in recent deadpan stand-up comedy routines, too.
'Yeah. No.' in the sense of 'I agree; but on second thought, I disagree.'
But use of "Yeah. No." in a purely conversational, nonironical sense to mean "Yes. On second thought, no." is, I think probably very old indeed. But because it comes from spoken language and entails a correction that negates the first part of the expression, we don't tend to register it as an oxymoron or logical dead-end when we here it. And really, it isn't meningless in those situations because the logical force of the overruling second statement is clear.
In written English, examples of "Yeah. No." appear most frequently in dialogue (not surprisingly). One early source is Ken Kesey, One Flew Over the Cuckoo's Nest (1962):
The door opens and the Gurney comes back out with the guy under a sheet, and the technicians go out for coffee. McMurphy runs his hand through his hair. "I don't seem able to get all this stuff that's happening straight in my mind."
"What's that? This shock treatment?"
"Yeah. No, not just that. All this ..." He waves his hand in a circle. "All these things going on."
From Andy Warhol, a: A Novel (1968), which seems to consist largely of transcriptions of conversations recorded in various locales around New York City:
(O) Want some sugar in your orange juice?
Yeah. No, you did put some sugar in my orange juic[e].
Cause cause Gerry's on his way downtown, which means we should leave here in about fifteen minutes.
Tell him to call us at the—
No, where shall we go?
You can really get involved with her.
Yeah, no, but, well, but she, but she got in trouble for being that.
(L) I think it's "Rigoletto." No, but uh, yeah, no it's the, the juggler of Notre Dame. (L) Thomas. No Ambroise ... the one who wrote “Hamlet"? Yeah.
And from David Mamet, American Buffalo (1976), in Best American Plays: Eighth Series, 1974–1982 (1983):
TEACH. You want to tell me what this thing is?
DON. (Pause): The thing?
TEACH. Yeah. (Pause.) What is it?
TEACH. No? What is it, jewelry?
DON. No. It's nothing.
DON. You know?
TEACH. Yeah (Pause.) Yeah. No. I don't know. (Pause.) Who am I, a policeman ... I'm making conversation, huh?
Later instances of the expression appear in fiction from the 1980s and 1990s. For example, from Kevin Wade, Key Exchange (1982):
MICHAEL. You know what you have to do.
PHILIP. Yeah. No. I don't know.
From U.S. House of Representatives, The Marcos Tapes: Ferdinand Marcos' Plan to Invade the Philippines (1987):
RH: Well, I didn't want anybody to know the money was coming in.
FM: Was coming in in the form of advances and loans. [Whispers.]
RH: Coming in as Credit Suisse you mean?
FM: Yeah, no, yes, into the other bank.
From Harold Jaffe, Straight Razor: Stories (1995):
"You're right. I think it's coming on, Shirl."
"Me too," Shirl says. "What do you want to do?"
"Dunno. We screw already?"
"Yeah. No. I can't remember."
"Let's spiff up and cut."
From Pete Hauptman, Ring Game (1998):
Leaving the front door ajar, she walked through the living room, examining her surroundings suspiciously, breathing shallowly through her mouth. She could hear Hy's low voice. "Yeah, no, that's Carmen. Listen, I understand what you're saying. A job is a job. But couldn't you just have handed it to me? ..."
From Eric Dickey, Cheaters (2000):
He didn't answer. I went out and stood next to him. Leaned my body against his and asked, "You ever been in love?"
“Yeah. No. Maybe. Not sure.”
From Maureen McHugh, "Interview: On Any Given Day," in The Year's Best Science Fiction: Nineteenth Annual Collection (2002):
INTERVIEW: Was Terry one of you?
EMMA: Yeah ... no. No. Not really. He wanted to be. I mean, I wish I had known stuff before, I wish I had known not to get involved with Terry and all this stuff—but I wish I could have been a kid longer.
And from C.J. Cronin, 2044: The New Democracy (2014):
"You re-reading that old book out of respect?"
"Yeah...No. I don't know.
'Yeah. No.' in the sense of 'You're right: it's wrong.'
As I noted at the beginning of this answer, use of "Yeah. No." often indicates "On first thought yes, but on second thought no." In other situations, however, the sense of "Yeah. No." can be "Yes, I'm following or agreeing with what you're saying and the the answer is indeed negative." Thus, for example, in House Document, volume 105, issue 316, part 3 (1998), we find these instances:
Q So the progression of calls, and I think we are—it's not like we are holding out any calls—
A Yeah. No, no, no.
Q So the bottom line is, you have no idea whether that [phone call] was even to you or your office, but it could have been? You just don't know?
A Well, is this to my room?
Q No, sir. That's why I'm asking.
A Oh, yeah, no. Probably not to me.
Q Right. But it would be something not related Monica Lewinsky or the—
A Yeah, no.
Q —issue with the President.
A No, it wouldn't.
So it might be more accurate to say that "Yeah. No." can either indicate a formally inconsistent response ("Yes" immediately overruled by "No.") or a formally consistent one ("Yes" to the direction of a question or statement but "No" to its substance). Either way, it seems to me, the expression makes sense.
'Yeah-no' in the Antipodes
Evidently, Australia and New Zealand have taken "Yeah. No." to heights that English speakers in the Northern Hemisphere can scarcely comprehend. A Google Books search turns up three fairly lengthy discussions from the past fifteen years of "yeah-no" as used down Under.
Gabrielle Williams, Liar, Liar (2003) devotes a paragraph to the subject:
Daphne watched both of them carefully.
"Well, what do you think?"
Amy sucked her lips. Elli pouted.
Finally, Elli said, 'Yeah. No, I don't think so.'
This, by the by, is a classic example of yeah-no-ism. A yeah-no-ism occurs often in everyday speech, and can mean a number of things. In this case, of course, it means no, but by preceding it with a 'yeah', Elli is hoping not to hurt Daphne's feelings. Other yeah-no-isms can be the 'yeah, no' spoken abruptly as in 'yeah, I heard what you said but I absolutely, totally disagree with you' and the 'yeah? no?' spoken hesitantly, hoping to guess at the correct answer simply by answering 'yeah' and 'no' at the same time. There are others, but these three are the most common.
David Astle, Puzzles and Words: Over 170 New Puzzles and 200 Word Stories (2013) asserts that Australians have a particular fondness for the construction:
Australians are addicted to the utterance YEAH-NO. Next time you ride a crowded bus, or sit anywhere in earshot of a conversation, listen for the yeah-no habit. 'Yeah-no, I had a pretty good weekend ...' So why do we say it? Surely the pairing of opposites makes no sense, one half cancelling out the other?
Well, yeah-no. We depend on the expression for several reasons. First is the case where you agree and disagree with what is being said. ('Yeah-no, the movie was okay.') A kind of tepid approval, where you touch on the good and bad.
Sometimes the cluster serves as a genuine two-part reply: yes (I heard you) and no (the movie wasn't good). Linguists also label the term a fluency device, used as a means of picking up a neglected topic or looping back to where the conversation may have started, ('... Yeah-no, my mum's going well. Thanks for asking.')
Yeah-no also allows the speaker to save face, or soften bad news. ('Yeah-no, we should be finished a month late.' Or: 'Yeah-no, the food wasn't much chop.') It's also a type of squelch, a coded warning against taking a particular topic further. ('Yeah-no, that crossword was murder.')
Kate Burridge, Weeds in the Garden of Words: Further Observations on the Tangled History of the English Language (2005) offers an even longer discussion of Australian use of "yeah-no" as a discourse marker that speakers use to convey a multitude of subtle meanings to their interlocutors. Her conclusion:
Now, it's true we often sneer at these markers, mistaking them for hesitation noises like er and umm. But these are in no way meaningless little expressions that speakers use to fill in time while they're thinking. They are mind-bogglingly complex and their meanings can be excruciatingly difficult to figure out. I've barely touched on yeah-no here. And bear in mind I haven't mentioned the variants of yeah-no—there's yeah well no, yeah but no, yep nuh, yes no no and many others—not to mention no yeah and all its different versions!
Clearly there's lots to know about yeah-no, ya know?