Inspiration

A raid moves a whole community into someone else's stream with one command. Twitch tells the receiving streamer who raided and how many people came. It does not tell them what those people were just watching, and the raiders land in a stream they know nothing about. Most welcomes end up as "thanks for the raid". We wanted the first minute of a raid to carry real context in both directions.

What it does

Raid Handshake runs on the receiving streamer's Windows PC, next to OBS. It has a studio page for the streamer and a transparent overlay for the stream.

Before the raid. The app listens to the stream's own audio, from the microphone or from system audio. OpenAI transcribes short voiced segments and keeps a summary of the last three minutes. Every summary has to quote the transcript word for word, and the studio shows those quotes under it.

When the raid lands.

  • The overlay puts a raid card on stream: source channel, raid size, title, category and recent clip titles.
  • The studio drafts a welcome for the raiders from the live summary, the channel's participation hint and one rule. The streamer reads the exact text and sends it with one click or Ctrl+Shift+Enter. It posts as the streamer, so no bot account is needed.
  • An optional pre-approved template can post on its own. It is off by default.

In the first minute. The app reads chat and learns what the raiders keep saying: emotes owned by the source channel, and words that at least two people repeat three or more times. These appear on the raid card, so the streamer can greet the crew in its own words. After 90 seconds the card folds into a small badge.

After the raid. At 5, 15 and 30 minutes, the studio estimates how many new chat accounts are still connected and how many of them spoke.

What we tested

On 2 November 2026 we ran a real raid between our two test channels, thisisraida and thisisraidb, with a test viewer watching A. The welcome reached B's Twitch chat 7.3 seconds after the app received the raid, and that includes the streamer reading the draft and pressing send. Within the first minute the raid card showed "lighthouse ×3" and "crew ×3" from the raiders' messages. The demo video is a recording of that run; only Twitch's raid countdown is shortened.

How we built it

  • Python 3.11 and FastAPI, bound to 127.0.0.1. Twitch EventSub arrives over an outbound WebSocket, so there is no public webhook or tunnel.
  • Twitch login uses Device Code Flow as a public client, so there is no client secret. Tokens and the OpenAI key are stored in Windows Credential Manager.
  • Audio is captured with soundcard and numpy. Voiced segments of up to 8 seconds go to OpenAI transcription (gpt-transcribe by default). Summaries use the Responses API with structured output (gpt-4.1-mini by default). The app discards any summary that does not quote the transcript word for word.
  • The studio and overlay are TypeScript with Vite, served by FastAPI and updated over a local WebSocket. The overlay is a 1920×1080 transparent OBS browser source.
  • SQLite keeps raids, drafts and samples. A send lock stops double posts when a click and the hotkey arrive together or EventSub repeats an event.
  • 50 automated tests with pytest, plus ruff and a frontend build, run by GitHub Actions on every push.

How we used Codex

We built the app in one Codex thread on 25 October 2026, session 01a17154-fef0-76f1-b2bb-cb54cdf374ae. The first prompt went in at 12:33 and the third commit landed at 18:21, Singapore time. Ten prompts, about 170 tool calls.

  1. Idea check. The first prompt gave Codex the idea, three user stories, the hackathon rules and the Twitch docs. Codex checked each story against the real Twitch API and developer terms and flagged what Twitch cannot provide, such as a list of the accounts that came with a raid.
  2. Design. In two more prompts we settled the design: OpenAI API for transcription and summaries, a chatter snapshot estimate for arrivals, review before sending by default with an optional pre-approved template, and first-minute learning of the raiders' phrases.
  3. Build. Codex wrote the service, the Twitch and OpenAI integrations, the studio, the overlay, the setup guide and the tests. Its build report: local studio running, 50 tests passing, 38 files changed.
  4. First live raid. Codex walked us through OBS and audio routing, and the first real raid from A to B worked end to end.
  5. Finish. Codex redesigned the studio into a three-step setup and one focused screen, moved the interface to English, set up the GitHub repository and CI, and drew the architecture and sequence figures.

Challenges we ran into

  • Twitch does not say which accounts came with a raid. The app takes a snapshot of the chatter list before the raid and counts accounts that appear in the next 90 seconds. The overlay labels that number as an estimate.
  • The app needs the stream's audio, but a browser playing the streamer's own Twitch page feeds it back a few seconds late. The app captures the local source, and the setup guide routes OBS and the app to the same output with Twitch players muted.
  • Speed and human review pull against each other. The summary is kept warm before any raid, so the draft is ready the moment the raid lands and the review costs only the seconds it takes to read.

Accomplishments that we're proud of

  • A real raid on Twitch, with the welcome in chat 7.3 seconds later and a human check in between.
  • Nothing to host. The app runs on the streamer's PC and only talks to Twitch and OpenAI. No webhook, tunnel, extension review or bot account.
  • Summaries that show their sources. Every summary quotes the streamer's own words.

What we learned

  • The useful window is about a minute. By then raiders have either joined the chat or left, so the overlay folds the card after 90 seconds.
  • A good welcome needs what the streamer is doing right now. Stream titles are often hours old; the last three minutes of speech are not.

What's next for Raid Handshake

  • Count raiders who chat in the first 90 seconds as arrivals right away, without waiting for Twitch's chatter list to update.
  • Try it with small streamers and compare how long raiders keep chatting with and without the targeted welcome.
  • A one-click Windows installer.

Built With

Share this project:

Updates

Submission history