The song was written in 1998 following the OK Computer tour. It was the first thing Thom recorded with his new home recording equipment after moving to a new house the same year. The initial idea for the song was even older than that, Thom wrote it on his QY70 sequencer while on holiday with Jonny and their respective partners in Israel.
The line "I saw the sky turn green" appears in this lengthy piece from the 2000 version of radiohead.com in a page titled '[proactive]':

you willsooon be on the scrap heap in bits and pieces. the cameras will not save you now or then. i saw the sky turn green come on now goddamit hold on to me here come the giant insects with giant teeth and acid blood. godamn yuo for doing this t us. godamn yuo for doing this t us. i am citizen insane all history is frozen. itlll all blow over so(o)n. sleeping leviathan. bodies floating down the muddy rivver in bits and pieces. the steering wheel through the ribs. the shadows swallowing my soul. fall through a blck hole and start again. justa shell remains bleeding on the pavement. you can stuf it with straw and dreess it in bright clothes to scare the crows but they will not be impressed. i dont understand a word you say and you seem so far away, your lips are cold. your eyes are beach stones. everything washes over you like a shipwreck. constant agony. the painkillers send you back n time. the bodies floatinng down stream. the truck loads with machetes. the dead can come back to life cut your tails witha carving knife. like rotten wood. eyes popped out like cigarette machines. the cameras will be gone. the make up will run the set rolled away. and history is at an end the communists have lost control the empire will grow and grow and we shall all be bled to death to feed
This page appeared in the Kid A era version of radiohead.com under the title 'ivehadmyfill':








the sky is green
brain overload im so afraid
the trap door opens
i spiral down
down
down

 

The third section of the following page, also from the Kid A era version of radiohead.com and titled 'constricting wallet', contains lines that seem to be connected to the "I am up in the clouds/I can watch and not take part" lyrics:



then surround yourself
with sycophants
, your
Royal
Highnesses



things aren't
so bad.
give them the benefit of the doubt.
i am an optimist.
when I looked into the mirror I found I
had turned into a


often lose
my train of thought
when am above me observing me
going
through my
life.


:
please remove


The third section of the page above, the one that is relevant for 'Where I End And You Begin', also appeared isolated in a different design under the title 'disused cinema':


Often lose
my train of thought
when am above me observing me
going
through my
life.

 

The line "dinosaurs roam the earth" appeared in yet another page from the Kid A period, called 'Little Crocodiles!'. Here it is seen in context with other lyrics from 'Optimistic'. However, it can't simply be assumed that 'Where I End And You Begin' recycles a line that was already used in another song, since it was written during the same period as 'Optimistic'. It can't be reconstructed in which of the two songs Thom made use of that line for the first time, but it is highly likely that the lyrics for 'Where I End And You Begin' were created using a method, that was typical for Thom during that time, by pulling cut up lines out of a top hat. So it is possible that one of the sources for these cut up lines is the text in this page:

flies are buzzing round my head flies are buzzing round my head picking up every last crumb the big fish eat the little ones the big fish eat the little ones not my problem give me some. not my problem give me some. you can try the best you can try the best you can money for the generals. how could you be so naive? digging deep into your pockets the will of allah the word of god you can try the best you can try the best you can
the best you can is good enough. why dont you stop beating yourself up? this one isnt jesus turn that hippy bullshit off. i find it difficult to be optimistic. id really like to help you but its just not convenient call me back
some other time. burnt spaghetti wires i am an optimist the best you can is good enough this will not save you will not put the world to rights will not solve your
marriage this wont be on sky tv i dont believe you you you mean it the best you can is good this wont tell you what you need to know optimistic foolish
arseholes tell you what you want to know this one drops a payload this wont cure your loneliness this wont bring the disappeared fodder for the animals living on animal farm
you can try the best you can you can try the best yo can the best you can is flies are swarming round my face. flies are swarming round my face. not now man i got problems of my own. howd i ever get into this mess? unless ofcourse youre trying to hide something. the flies buzz around me picking up evry last crumb when will you ever get out of bed? the optimist will drink and drive the really nervous wont survive optimistic auto-suggestion. hello hello made no difference at all nothing has changed at all this is the new cold war same as the cold old war the names have changed the innocent the innocent have been used to thicken the soupy the soupy can be used to feed the troops from tin cans food is food and sex is sex ivehadmy fill i want to defect. dinosaurs roam the earth shot by monks diplomatic answers to diplomatic questions. the murdered will come back to life tthe blind will cut you with a carving knife the evidence is there too see if you turned a blind eye now your not even human whats your real motivation? cnsequences ff your actions. red ants black ants no idea what your doing viruses mutating mind constipation turn that hippy bullshit off. cogs sarcy cogs swrking round
In 2002 the following story appeared on Stanley's website slowlydownward.com. It is unknown whether it was a few years old then already and inspired 'Where I End And You Begin', or whether it was inspired by the song. Either way, the lyrical connection is undeniable:

Excerpts of the lyrics can be found in the hidden booklet of Kid A from 2000:

It might have been played during sessions for Kid A under the title 'Up In The Clouds', but this bit of information needs to be verified yet.
These virtually finished lyrics appeared in the 'imaginery prisons' section of radiohead.com at the time Amnesiac was released in spring 2001:





theres a gap in the between
theres a gap where we meet
where i end+you begin

and im sorry for us
the dinosaurs roam the earth
the sky turned green
where i end+you begin

i am up in the clouds
i am up in the clouds
and i cant and i cant come down

i can watch and cant take part
where i end and where you start
where you you left me alone you left me alone.

X'll the mark the place
like parting the waves
like a house falls in the sea.

i will eat you all alive
i will eat you all alive
i will eat you all alive
i will eat you all alive
and therell be no more lies
therell be no more lies
therell be no more lies
therell be no more lies



W.A.S.T.E. sold clothes during the Kid A/Amnesiac period as part of the merchandise, and some of those had a tag which featured the title of the song on both sides in typical weird spelling:

In late 2001 or early 2002, Thom demoed the song again. This version was released on an Oxfam compilation CD called The Big Noise, that came for free with the British newspaper "The Guardian" on september 6th 2003:



A sample of one of the electronic elements used in this demo, called 'R125', was made available in the Loophole section of radiohead.com in 2003:

July 22nd 2002



August 5th 2002

On March 30th 2003, the rough mix of the song leaked and it represents the state of work from February. This version is almost identical to the released version. The main difference is a missing guitar overdub before the "I will eat you alive" section:

A remix of sorts was included in Radiohead.tv episode 4 in 2003:



An element of the above version was used as another Loophole sample, called 'R120':