Inspiration

In September 2026 Twitch CEO Dan Clancy said that "at any given moment of a stream, probably only 10 percent of your community is there" (Tubefilter). Most of the community comes and goes, and the moments they leave are predictable: an ad break, a BRB break, a late arrival. Viewers come back to an inside joke they can't follow. We built the thing a TV show does after the commercial: "Previously on".

What it does

  • Ad breaks. On affiliate and partner channels, EventSub channel.ad_break.begin starts a card the moment the ads start. The streamer reviews it while the ads run, and it airs when they end.
  • BRB breaks, on any channel. Switching OBS to the BRB scene builds the card from the ten minutes before the break; switching back airs it.
  • Late arrivals. Any viewer can type !catchup and get the recap in chat. Raids get a welcome card.
  • On stream for everyone. The card plays on the overlay with a TV-style "Previously on" cold open and a narrator voice, and the same recap goes to chat. Viewers install nothing.
  • Grounded and reviewed. Every recap line cites the chat messages, voice transcript or notes it came from. The streamer approves, vetoes or holds each card, and nothing airs unread unless they pick a timer.

Twitch's Recaps Feed turns a streamer's Clips into recaps for a feed. Previously On works inside the live stream, at the moment a viewer comes back.

How we built it

Codex wrote every line of product code in one session (01a174cd-3a2a-7f21-a9bf-1289a1e0b57a), over fifteen prompts. Each prompt was written after reviewing the last block in a real browser and against live Twitch, and each bug found became a regression test. Codex checked Twitch's and OBS's documentation before using any endpoint or event.

  • Node 22, no framework: a local server bound to 127.0.0.1, an SSE overlay for OBS and a control panel.
  • Twitch EventSub over WebSocket (channel.ad_break.begin, channel.chat.message, channel.raid), Device Code Grant Flow with a public client and no secret, Helix chat, clips and stream markers.
  • OBS WebSocket 5.x for the BRB trigger.
  • OpenAI Responses API with Structured Outputs (gpt-5.4-mini) for the recap, plus a grounding check that drops any line citing an unknown source; a deterministic fallback covers refusals and timeouts. OpenAI voice for the narrator.
  • 89 tests with node:test, a fixture evaluation (npm run eval), and a recorded browser demo on GitHub Pages so judges can try it without installing anything.

Challenges we ran into

  • OBS 32.1.2 never announced the scene change. Our first live BRB test did nothing: the program-scene event never arrived, only transition events. Codex read the obs-websocket protocol docs, followed the transitions, polled the program scene every two seconds as a fallback, and added tests. The next live test worked, and it is the take in our video.
  • The model recapped Twitch events instead of the stream. Early ad-break cards talked about raids and follows. Events now stay in the buffer for provenance only.
  • The ad break needs an affiliate channel. Our test channel isn't one, so the ad break in the video and the demo is simulated with the documented channel.ad_break.begin payload, and labeled SIMULATED on screen. That is why the BRB trigger exists: it works on any channel.

Accomplishments that we're proud of

  • A live take on Twitch: chat and a note, the switch to BRB, the card waiting in the panel with a source for every line, then airing on stream with its narrator while the same recap posts to chat.
  • Live !catchup (a viewer's Spanish chat recapped in English), a live raid through EventSub, and the BRB break, all verified on a real channel.
  • A streamer stays in control: approve, veto or hold, and an honest SIMULATED label wherever something is simulated.

What we learned

Viewers don't need a summary of the whole stream. They need the three things that happened while they were gone, said fast, with a source they can trust. And the streamer has to see it before chat does.

What's next for Previously On

  • A real ad break on an affiliate channel.
  • A hosted version, so a streamer adds one OBS browser source and logs in with Twitch.
  • Recaps in the viewer's language, and a Twitch Extension panel for viewers who want more than 15 seconds.

Built With

Share this project:

Updates

Submission history