# SemSwitch

- **Event:** [Built with Opus 4.7: a Claude Code hackathon](https://cerebralvalley.ai/e/built-with-4-7-hackathon)
- **When:** Apr 21 at 12:00 PM – Apr 27 at 2:00 AM (EDT)
- **Where:** Online
- **Team:** [Hassan Ali](https://cerebralvalley.ai/u/Sem1)
- **GitHub:** https://github.com/semswitch-inc/crowdpatch
- **Demo video:** https://youtu.be/akwhXcy3MSU
- **Gallery:** https://cerebralvalley.ai/e/built-with-4-7-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/built-with-4-7-hackathon/hackathon/gallery/216

CrowdPatch is a closed-loop bug fix economy. Developers upload their apps, the users file bug reports and earn credits, and uploaders spend credits to spawn Claude Managed Agents (Opus 4.6) that diagnose, fix, validate against the repo's own test suite, and open real GitHub PRs.

Every other AI coding tool requires a developer in the loop. CrowdPatch inverts the model: the crowd becomes QA, the agent becomes the engineer, the developer becomes the curator. Every successful run is a durable, reviewable, mergeable PR, not ephemeral output.

Here's what we got: the agent + workers. A Cloudflare Worker (Hono) hands fix-jobs to a Durable Object that owns one Managed Agent session per job, multiplexes its event stream to concurrent SSE browser subscribers, persists semantic events to per-instance SQLite for replay-on-reconnect, and writes a per-run R2 evidence bundle. Meanwhile, a second Vault + GitHub MCP path lets user-supplied PATs author PR commits, solving the read-only-token limitation of the default github_repository.authorization_token attachment.

Evidence: 14+ real [CrowdPatch] PRs landed on a public test repo across the build week. PR #14 is the submission-day headline. PR #13 is a resilience receipt - a CF Durable Object died at the +5min CPU limit, the agent kept working and pushed its branch anyway, and the recover endpoint adopted the orphan branch and opened the PR.

Open source under MIT. The agent + worker spine is the reusable core; the website is optional. But I felt like if I didn't start the rollout, someone else might have done it. So, it's sort of a 2-in-1...

---

Markdown version of https://cerebralvalley.ai/e/built-with-4-7-hackathon/hackathon/gallery/216. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
