AWS Builder Center

ProofRoom: evidence-backed AI recovery with Switch and Discord

How I built a local recovery workflow with two real Codex agents, Switch, Discord and proposal-specific human approval—and verified that all three queued fixture deliveries were processed.

An agent can say that it fixed an incident. A team still needs to know what changed, who agreed to it, and whether the system actually recovered.
For the Flip the Switch hackathon, I built ProofRoom around those questions. It brings a diagnostic coding agent, an independent reviewer, and a person into a shared Switch room. The workflow ends with a verified state change, rather than a reassuring chat message.
The result demonstrated so far is deliberately small and inspectable: a paused local worker with three queued fixture deliveries. Two real Codex-backed agents collaborated through Switch and Discord, the operator personally approved the reviewed proposal in the UI, and the reviewer independently confirmed that all three deliveries were processed.
This is a controlled local exercise, not a production outage or a deployed webhook service.

The problem: a suggestion is not a recovery

A useful recovery workflow needs to answer four questions:
  1. What did we actually observe?
  1. Does the proposed action match that observation?
  1. Did the responsible person approve that exact proposal?
  1. What independent check shows that the action worked?
ProofRoom turns these questions into explicit states:
Observed -> Proposed -> Reviewed -> Approved -> Executed -> Processed -> Verified
Execution and verification are separate. Resuming a worker is not enough: the queued work must be processed and the resulting state checked.

Why Switch is central

 Switch  gives people and agents a shared room for conversation and coordination. In ProofRoom, the diagnostic agent posts its findings, hands work to the reviewer, and reports the result through that room. Discord supplies the familiar team-chat interface.
Switch also supplies the actual account used to sign in to ProofRoom. The UI records approval under the authenticated operator identity instead of accepting an actor name from the browser.
The local recovery engine can be rehearsed without an LLM, but that rehearsal is not the demonstrated multi-agent workflow. Without Switch, the shared room, live agent handoff, messaging identity and Switch-account approval path would be missing.

System design

The implementation separates communication from the recovery decision:
Operator browser -> ProofRoom UI/API -> recovery engine -> incident state
|
v
Switch Core -> PostgreSQL
|
Discord room + agent controller
|
diagnostic agent + review agent
|
recovery CLI
The product UI and API use Node.js with no third-party npm dependencies. The native Switch server uses its own PostgreSQL database. The official headless controller runs two managed Codex agents in separate working directories.
Everything created for the local project lives on the A drive, including source, fixture state, caches, database files and exports. We reused already-installed executables where needed. This does not relocate Windows or application-managed storage.
No Docker was used in this build. That is our native setup choice, not a claim that the standard Switch installation requires the same approach.

How the verified run worked

The fixture began with a paused worker and three persisted deliveries in its queue.
The diagnostic agent inspected the current state and created a proposal for the single allowlisted action: resume the worker. The proposal included a fingerprint of the observed evidence.
A separate reviewer inspected the fixture and recorded its review against the same proposal and evidence. The operator then reviewed the proposal in the signed-in ProofRoom UI and clicked the approval button personally.
After that saved approval was checked, the diagnostic agent executed the recovery through the CLI gate and processed the queue. The reviewer independently inspected and verified the result.
The persisted outcome was:
{
"revision": 2,
"paused": false,
"generation": 2,
"queued": 0,
"delivered": "3/3",
"recovered": true
}
This is a compact summary of the observed result, not the full state schema. The saved state, decision events and actual room replies agree. The run contains eight persisted evidence events.
Some kickoff and execution-request messages were sent through the authenticated local Switch API and bridged into Discord. I am not claiming every message was typed in Discord.

The controls that matter

Approval is specific. It refers to a proposal and its evidence fingerprint. If the worker state changes, the old decision cannot silently authorize a different recovery.
Review is separate. The proposer cannot record its own review under the same actor identity. The verified live run used a second real agent.
Execution is one-use. A consumed proposal cannot simply be executed again. Missing review, missing approval and stale observations are refused.
Verification checks the result. Running verify before the delivery batch is processed does not produce a recovered result.
The UI shows the trail. The incident room explains the next decision; the evidence ledger shows recorded events; exports preserve the state for inspection. A new exercise archives its predecessor.
These are cooperative workflow controls. Both agents and the operator still share a filesystem. A process with sufficient file access can edit the state, so this is not a tamper-proof ledger or a production isolation boundary. Authenticating an account also does not prove that a human physically clicked a button in every possible use.

Getting started without confusing setup with proof

If you are new to Switch, start with the  official quickstart . Establish a working server, agent-provider login and room before adding a custom recovery workflow.
For our prepared Windows environment, the launcher is:
& A:\FlipTheSwitch\launch.ps1
ProofRoom opens at  http://127.0.0.1:4173 ; the official Switch Gateway uses  http://127.0.0.1:8765 . These are local addresses, not public demo links.
With the project source and native runtime prepared, these commands inspect the current fixture without rerunning a recovery:
. A:\FlipTheSwitch\project\enter.ps1
node src/cli.js inspect
node src/cli.js timeline
node --test --test-concurrency=1
For a fresh exercise, use a separate state directory, then move through proposal, independent review, interactive operator approval, execution, processing and verification in order. Never reuse the recorded run's consumed proposal.
Keep the bot token, provider profile, .env, private runtime configuration and live state out of public source packages. Use your own accounts and permissions when connecting Discord.
The bootstrap and reproduction documents are prepared, but an independent fresh-machine installation has not yet been validated. The  public source repository  includes the product, native setup scripts and sanitized recovery evidence. Demo-video publication remains pending.

What failed, and what I learned

The first controller version repeatedly reconnected during idle periods. The checked-out upstream source already contained a heartbeat-aware fix. We applied an official signed prerelease, verified its archive checksum and signature, and confirmed that both agents reattached.
The bounded observation lasted 521 seconds with zero reconnect warnings. That is useful evidence for this test window, not a long-duration reliability claim. Applying an existing upstream fix is also not an original core contribution.
Cloud deployment exposed a different boundary: valid credentials do not establish permission to create infrastructure. AWS organization policy denied the hosting actions we tried, including Lightsail creation. We did not bypass the policy, upgrade the account or create a server. ProofRoom remains local; this article does not claim an AWS deployment.
AI coding assistance helped build and check the implementation. The useful evidence is the inspected code, the test results and the recorded workflow, rather than how confidently an agent described its work.

Validation and next steps

All 18 current automated product tests pass. They cover recovery transitions, stale and replayed decisions, persistence, CLI approval behavior, authentication, origin checks, static-file isolation, HTTPS cookie configuration and sign-in throttling. A separate consistency check confirms that the saved proposal, review, approval, fixture state and independent reviewer reply agree.
Before treating this as an operational service, I would separate agent privileges from the execution broker, replace shared-file trust with stronger access boundaries, test longer-running controller behavior, and verify deployment and recovery on another machine.
For this hackathon, the useful result is already concrete: a shared room, a reviewed decision, a person's approval and three deliveries whose recovery was independently checked.
If you build a similar workflow, start with one bounded action and write the verification condition first. It makes both the agent instructions and the human decision easier to evaluate.
Built for  Flip the Switch . #HowISwitch
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article