Built for the Flip the Switch Hackathon
Fixing a bug is really five jobs: understand it, reproduce it, change the code, review the change, and write it up. When one person (or one AI) does all five, mistakes slip through, because the same mind that wrote the fix is the one checking it.
For this hackathon I built Toggle Tower, a Switch room where each job belongs to a different agent, and nothing moves forward until a human says “Approved.”
The team
Agent Tool Job
planner Codex Reads the issue, finds the cause, writes a plan and acceptance criteria
proof-writer OpenCode (free model) Reproduces the bug and drafts the PR description
builder Cursor Implements the approved plan and adds a test
test-safety-reviewer Codex Reviews the diff and gives a verdict, without editing anything
The rule that matters most: the agent that writes the fix never reviews it. A human approves after the plan and again after the review.
How it works in Switch
Switch turns a Discord channel into a shared room where people and agents see the same messages and history. I started a local Switch server, added a Discord bot, installed the Codex, Cursor and OpenCode CLIs, and registered each one as an agent. Then I created a room called #toggle-tower and wrote room instructions that define the pipeline:
issue → plan → reproduce → human approves → implement → review → human approves → PR draft
Teammates join the Discord channel and give work by mentioning an agent, for example @planner Stage 1: triage this issue. Every agent starts its message with a status line, ends with what should happen next, and is told never to commit, push or open a pull request.
A real run
I planted a small bug in a practice project: average([]) returned NaN instead of 0.
The planner pointed to the empty-array case in utils.js and wrote acceptance criteria.
The proof-writer wrote a short script that printed NaN and confirmed the bug.
I approved the plan.
The builder added one guard line and a test, ran the tests, and reported the real output.
The reviewer read the git diff, re-ran the tests, and posted a verdict of APPROVE with a manual checklist.
I approved, and the proof-writer drafted a PR description that said honestly what was and wasn’t tested.
I didn’t just trust the messages. I ran git diff and the tests myself: one added line in utils.js, two in test.js, average([]) returned 0, and average([2,4,6]) still returned 4.
What got in the way
Room creation failed with a bare HTTP 500 until I gave the Discord bot the Manage Channels permission. A clearer error would have saved me time.
One Codex agent could read the room but couldn’t post (Not connected to a room). Other agents worked fine, so I used a second Codex agent in its place. The pipeline doesn’t depend on any single agent.
Antigravity showed “CLI not installed” even though it ran in my terminal. Switch looks for a separate ACP component that has no Windows installer, so I used the other three tools.
Agents sometimes reacted to a plain “Approved” message that wasn’t meant for them, so I added a rule to the prompts to stay quiet unless assigned a stage.
What I liked and what I’d improve
I liked how little it takes for separate tools to behave like one team: shared history, per-room instructions, and one place for humans to approve. Mixing a paid model and a free model in the same room worked better than I expected.
I’d improve the error messages, add a status view that shows which agents are actually connected, and add a built-in approval step so a human sign-off is recorded in the room instead of just typed in chat.
Limits
This is a demo of a workflow, not a finished product. It runs on one laptop, a human approves every stage, and the reviewer can only be as good as its model. I haven’t submitted a pull request to Switch. The goal was to show that a team of agents can do real work safely when roles and approvals are clear.
Top comments (0)