Stream of consciousness
In literary criticism, stream of consciousness is a narrative mode or method that attempts "to depict the multitudinous thoughts and feelings which pass through the mind" of a narrator. The term was coined by Daniel Oliver in 1840 in First Lines of Physiology: Designed for the Use of Students of Medicine, when he wrote, 

Better known, perhaps, is the 1855 usage by Alexander Bain in the first edition of The Senses and the Intellect, when he wrote, "The concurrence of Sensations in one common stream of consciousness–on the same cerebral highway–enables those of different senses to be associated as readily as the sensations of the same sense". But it is commonly credited to William James who used it in 1890 in his The Principles of Psychology. In 1918, the novelist May Sinclair (1863–1946) first applied the term stream of consciousness, in a literary context, when discussing Dorothy Richardson's novels. Pointed Roofs (1915), the first work in Richardson's series of 13 semi-autobiographical novels titled Pilgrimage, is the first complete stream-of-consciousness novel published in English. However, in 1934, Richardson comments that "Proust, James Joyce, Virginia Woolf, and D.R. ... were all using 'the new method', though very differently, simultaneously". There were, however, many earlier precursors and the technique is still used by contemporary writers. Definition
Stream of consciousness is a narrative device that attempts to give the written equivalent of the character's thought processes, either in a loose interior monologue (see below), or in connection to their actions. Stream-of-consciousness writing is usually regarded as a special form of interior monologue and is characterized by associative leaps in thought and lack of some or all punctuation. Stream of consciousness and interior monologue are distinguished from dramatic monologue and soliloquy, where the speaker is addressing an audience or a third person, which are chiefly used in poetry or drama. In stream-of-consciousness, the speaker's thought processes are more often depicted as overheard in the mind (or addressed to oneself); it is primarily a fictional device. An early use of the term is found in philosopher and psychologist William James's The Principles of Psychology (1890): "consciousness, then, does not appear to itself as chopped up in bits ... it is nothing joined; it flows. A 'river' or a 'stream' are the metaphors by which it is most naturally described. In talking of it hereafter, let's call it the stream of thought, consciousness, or subjective life". In the following example of stream of consciousness from James Joyce's Ulysses, Molly seeks sleep:
a quarter after what an unearthly hour I suppose theyre just getting up in China now combing out their pigtails for the day well soon have the nuns ringing the angelus theyve nobody coming in to spoil their sleep except an odd priest or two for his night office the alarmclock next door at cockshout clattering the brains out of itself let me see if I can doze off 1 2 3 4 5 what kind of flowers are those they invented like the stars the wallpaper in Lombard street was much nicer the apron he gave me was like that something only I only wore it twice better lower this lamp and try again so that I can get up early

Interior monologue

While many sources use the terms stream of consciousness and interior monologue as synonyms, the Oxford Dictionary of Literary Terms suggests that "they can also be distinguished psychologically and literarily. In a psychological sense, stream of consciousness is the subject matter, while interior monologue is the technique for presenting it". And for literature, "while an interior monologue always presents a character's thoughts 'directly', without the apparent intervention of a summarizing and selecting narrator, it does not necessarily mingle them with impressions and perceptions, nor does it necessarily violate the norms of grammar, or logic – but the stream‐of‐consciousness technique also does one or both of these things." Similarly, the Encyclopædia Britannica Online, while agreeing that these terms are "often used interchangeably", suggests that, "while an interior monologue may mirror all the half-thoughts, impressions, and associations that impinge upon the character's consciousness, it may also be restricted to an organized presentation of that character's rational thoughts". Development

Beginnings to 1900
While the use of the narrative technique of stream of consciousness is usually associated with modernist novelists in the first part of the twentieth century, several precursors have been suggested, including Laurence Sterne's psychological novel Tristram Shandy (1757). John Neal in his novel Seventy-Six (1823) also used an early form of this writing style, characterized by long sentences with multiple qualifiers and expressions of anxiety from the narrator. Prior to the 19th century, associationist philosophers, like Thomas Hobbes and Bishop Berkeley, discussed the concept of the "train of thought". It has also been suggested that Edgar Allan Poe's short story "The Tell-Tale Heart" (1843) foreshadows this literary technique in the nineteenth century. Poe's story is a first person narrative, told by an unnamed narrator who endeavours to convince the reader of his sanity while describing a murder he committed, and it is often read as a dramatic monologue. George R. Clay notes that Leo Tolstoy, "when the occasion requires it ... applies Modernist stream of consciousness technique" in both War and Peace (1869) and Anna Karenina (1878). The short story, "An Occurrence at Owl Creek Bridge" (1890), by another American author, Ambrose Bierce, also abandons strict linear time to record the internal consciousness of the protagonist. Because of his renunciation of chronology in favor of free association, Édouard Dujardin's Les Lauriers sont coupés (1887) is also an important precursor. Indeed, James Joyce "picked up a copy of Dujardin's novel ... in Paris in 1903" and "acknowledged a certain borrowing from it". Some point to Anton Chekhov's short stories and plays (1881–1904) and Knut Hamsun's Hunger (1890), and Mysteries (1892) as offering glimpses of the use of stream of consciousness as a narrative technique at the end of the nineteenth century. While Hunger is widely seen as a classic of world literature and a groundbreaking modernist novel, Mysteries is also considered a pioneer work. It has been claimed that Hamsun was way ahead of his time with the use of stream of consciousness in two chapters in particular of this novel. British author Robert Ferguson said: "There’s a lot of dreamlike aspects of Mysteries. In that book ... it is ... two chapters, where he invents stream of consciousness writing, in the early 1890s. This was long before Dorothy Richardson, Virginia Woolf and James Joyce". Henry James has also been suggested as a significant precursor, in a work as early as Portrait of a Lady (1881). It has been suggested that he influenced later stream-of-consciousness writers, including Virginia Woolf, who not only read some of his novels but also wrote essays about them. However, it has also been argued that Arthur Schnitzler (1862–1931), in his short story '"Leutnant Gustl" ("None but the Brave", 1900), was the first to make full use of the stream of consciousness technique. Early twentieth century
It was not until the twentieth century that this technique was fully developed by modernists. Marcel Proust is often presented as an early example of a writer using the stream of consciousness technique in his novel sequence À la recherche du temps perdu (1913–1927) (In Search of Lost Time), but Robert Humphrey comments that Proust "is concerned only with the reminiscent aspect of consciousness" and that he "was deliberately recapturing the past to communicate; hence he did not write a stream-of-consciousness novel". Novelist John Cowper Powys also argues that Proust did not use stream of consciousness: "while we are told what the hero thinks or what Swann thinks we are told this rather by the author than either by the 'I' of the story or by Charles Swann." The term was first applied in a literary context in The Egoist, April 1918, by May Sinclair, in relation to the early volumes of Dorothy Richardson's novel sequence Pilgrimage. Richardson, however, describes the term as a "lamentably ill-chosen metaphor". James Joyce was a major pioneer in the use of stream of consciousness. Some hints of this technique are already present in A Portrait of the Artist as a Young Man (1916), along with interior monologue, and references to a character's psychic reality rather than to his external surroundings. Joyce began writing A Portrait in 1907 and it was first serialised in the English literary magazine The Egoist in 1914 and 1915. Earlier in 1906, Joyce, when working on Dubliners, considered adding another story featuring a Jewish advertising canvasser called Leopold Bloom under the title Ulysses. Although he did not pursue the idea further at the time, he eventually commenced work on a novel using both the title and basic premise in 1914. The writing was completed in October 1921. Serial publication of Ulysses in the magazine The Little Review began in March 1918. Ulysses was finally published in 1922. While Ulysses represents a major example of the use of stream of consciousness, Joyce also uses "authorial description" and Free Indirect Style to register Bloom's inner thoughts. Furthermore, the novel does not focus solely on interior experiences: "Bloom is constantly shown from all round; from inside as well as out; from a variety of points of view which range from the objective to the subjective". In his final work Finnegans Wake (1939), Joyce's method of stream of consciousness, literary allusions and free dream associations was pushed to the limit, abandoning all conventions of plot and character construction, and the book is written in a peculiar and obscure English, based mainly on complex multi-level puns. Another early example is the use of interior monologue by T. S. Eliot in his poem "The Love Song of J. Alfred Prufrock" (1915), "a dramatic monologue of an urban man, stricken with feelings of isolation and an incapability for decisive action," a work probably influenced by the narrative poetry of Robert Browning, including "Soliloquy of the Spanish Cloister". 1923 to 2000

Prominent uses in the years that followed the publication of James Joyce's Ulysses include Italo Svevo, La coscienza di Zeno (1923), Virginia Woolf in Mrs Dalloway (1925) and To the Lighthouse (1927), and William Faulkner in The Sound and the Fury (1929). However, Randell Stevenson suggests that "interior monologue, rather than stream of consciousness, is the appropriate term for the style in which [subjective experience] is recorded, both in The Waves and in Woolf's writing generally." Throughout Mrs Dalloway, Woolf blurs the distinction between direct and indirect speech, freely alternating her mode of narration between omniscient description, indirect interior monologue, and soliloquy. Malcolm Lowry's novel Under the Volcano (1947) resembles Ulysses, "both in its concentration almost entirely within a single day of [its protagonist] Firmin's life ... and in the range of interior monologues and stream of consciousness employed to represent the minds of [the] characters". Samuel Beckett, a friend of James Joyce, uses interior monologue in novels like Molloy (1951), Malone meurt (1951; Malone Dies) and L'innommable (1953: The Unnamable). and the short story "From an Abandoned Work" (1957). French writer Jean-Paul Sartre employed the technique in his Roads to Freedom trilogy of novels, most prominently in the second book The Reprieve (1945). The technique continued to be used into the 1970s in a novel such as Robert Anton Wilson/Robert Shea collaborative Illuminatus! (1975), concerning which The Fortean Times warns readers to "[b]e prepared for streams of consciousness in which not only identity but time and space no longer confine the narrative". Although loosely structured as a sketch show, Monty Python produced an innovative stream-of-consciousness for their TV show Monty Python's Flying Circus, with the BBC stating, "[Terry] Gilliam's unique animation style became crucial, segueing seamlessly between any two completely unrelated ideas and making the stream-of-consciousness work". Scottish writer James Kelman's novels are known for mixing stream of consciousness narrative with Glaswegian vernacular. Examples include The Busconductor Hines (1984), A Disaffection (1989), How Late It Was, How Late (1994) and many of his short stories. With regard to Salman Rushdie, one critic comments that "[a]ll Rushdie's novels follow an Indian/Islamic storytelling style, a stream-of-consciousness narrative told by a loquacious young Indian man". Other writers who use this narrative device include Sylvia Plath in The Bell Jar (1963) and Irvine Welsh in Trainspotting (1993). Stream of consciousness continues to appear in contemporary literature. Dave Eggers, author of A Heartbreaking Work of Staggering Genius (2000), according to one reviewer, "talks much as he writes – a forceful stream of consciousness, thoughts sprouting in all directions". Novelist John Banville describes Roberto Bolaño's novel Amulet (1999), as written in "a fevered stream of consciousness". Twenty-first century 
The twenty-first century brought further exploration, including Jonathan Safran Foer's Everything is Illuminated (2002) and many of the short stories of American author Brendan Connell. Song lyrics 
Stream of consciousness technique is also used in song lyrics. Songwriters such as Sun Kil Moon and Courtney Barnett use it in their songs. An early example is Outkast's song "A Life in the Day of Benjamin André (Incomplete)" off their 2003 album Speakerboxxx/The Love Below. Dialogue in films 
Some filmmakers use the narrative technique. For example, the documentary Anonymous Club about songwriter Courtney Barnett is narrated using stream-of-consciousness. Terrence Malick's films use it as well. 2022 film You Won't Be Alone also uses it. 