WITNESS
Preview environments for coding agents

Every PR, running and proven

Your agents write code faster than you can run it. Witness puts every pull request's whole app (frontend, API and database) on its own private cloud computer, then gives your agent a live link to test it. You read the proof and merge.

Works with Claude Code, Codex, Copilot, Cursor, or a person. Private alpha.

Live run 00:00
Add a coupon field to checkout
acme/web#148 · acme/api#88 · branch coupon-field
Claude Code
  1. Two PRs grouped into one featureSTR-218
  2. Private sandbox started2 vCPU
  3. Secrets unlocked by your laptopsealed
  4. Database branch for the new columnneon
  5. Built, started, every route healthyweb · api
  6. Agent tested it in its browser3 screenshots
witness/deploy witness/test
One PR, oneSANDBOX

Each feature runs alone. Nothing to share, nothing to clash.

Push to healthy0s

Median in our end-to-end runs, from a warm snapshot.

Secrets we can read0

Encrypted on your device. We only ever hold scrambled bytes.

Agents supportedANY

If it can open a PR, Witness can test it. MCP or a plain CLI.

01 · The problem

Writing code got fast, running it didn't

A coding agent can write a feature in ten minutes. Then it waits for a computer to run it on. Today that computer is your laptop: one copy of the app, one database, one set of ports. Ten agents means ten pull requests in a queue, and you are the queue.

Writing code

Minutes, in parallel

Run five agents at once and you get five pull requests. Code is now cheap.

Running and checking it

One at a time, on you

Each PR needs the whole app running: check out branches, install, migrate, start, click around. Then the next one.

Compute is the new bottleneck. Not the model, not the prompt: a place to run each change, check it, and show that it works.

02 · The fix

Give every PR its own computer

Witness watches your repos. When a pull request opens, it builds a full copy of your app for that change, checks that it really works, and hands the link to whoever opened it. Nothing to set up per PR.

1

Open a pull request

Any agent or person, any branch name. A PR is the only trigger: no button to press.

2

Witness builds the whole app

Every PR of the feature across your repos, the other repos on their main branch, your secrets, and a database branch if the schema changed.

3

It waits for healthy

Builds, starts, and checks every service and route. If something breaks, your agent gets one clear sentence on what to fix.

4

Your agent tests it

It opens the live link in its own browser, records screenshots, and posts the result on the PR. You merge.

03 · The result

Ship ten features like you used to ship one

When each change runs on its own machine, your agents stop waiting for you, and you stop babysitting setups. You go from writing code to reviewing working software.

In flight right now● 5 sandboxes
STR-218Coupon field · Claude CodeTested
STR-219New product grid · CodexReady
STR-220Order history API · CopilotBuilding
STR-221Fix tax rounding · Claude CodeAgent fixing
ADM-43Admin export · youWaiting for PRs

Agents fix their own failures

A failed build comes back as a short event: what broke, where, and the next step. The agent pushes a fix and waits again, with no human in the loop.

Proof, not promises

Every PR gets two checks, a comment with screenshots and findings, and a report you can open. You review evidence instead of guessing.

Your laptop stays yours

No more stashing work to check out a branch. The app runs in the cloud; your agent only needs a browser and a link.

04 · Connect your agent

Two minutes, then it runs on its own

Witness speaks MCP for agents that use tools, and a plain CLI for everything else. Your agent opens a PR, waits for the link, tests it, and reports back.

Claude Code, over MCP

Add Witness as an MCP server once. Claude gets tools like witness_wait, witness_url and witness_test_finish, and the server also unlocks your secrets while it runs.

Full guide →
$ npm i -g @witness/cli
$ witness login
$ claude mcp add witness -- witness mcp
## Witness   (in CLAUDE.md)
After you open or push to a PR, call witness_wait.
If it fails, do what event.next says, push, wait again.
When ready, test the preview and record it with
witness_test_start and witness_test_finish.

The plugin does the rest

The optional plugin adds the MCP server plus three skills (test, fix, setup) and hooks that remind Claude to wait after it pushes.

Plugin guide →
$ claude plugin marketplace add csakash/witness
$ claude plugin install witness@witness

# then, in Claude Code
/witness:test   wait, test in the browser, finish
/witness:fix    read the failure, fix, push, wait
/witness:setup  get the first deploy healthy

Codex, through the CLI

Codex runs shell commands, so it uses the same loop as a script. Put the rule in AGENTS.md. Codex often picks its own branch names, so it links PRs with a Witness: line.

Codex guide →
## Witness   (in AGENTS.md)
After you open or push to a PR, run `witness wait --json`.
Exit 1: do what `next` says, push, run it again.
Exit 0: run `witness instructions`, test the URL, then
`witness test start` and `witness test finish`.
Exit 5: stop and say why. Never merge.

Copilot, same rules

The same CLI loop, in .github/copilot-instructions.md. Hosted runs that can't keep a machine paired still get deployments: Witness posts the result on the PR as checks and a comment.

Copilot guide →
# PR description, when branch names differ
Witness: acme/web#148, acme/worker#12
$ witness wait --json   # 0 ready · 1 failed · 4 timeout · 5 needs you

Anything that opens PRs

Cursor, Devin, Aider, your own scripts, or a person. If it can open a pull request, Witness deploys it. If it can run a command, it can wait, read logs and record a test.

CLI reference →
$ witness wait          # blocks until healthy, prints the URL
$ witness url           # a signed link, valid one hour
$ witness logs --service api
$ witness traces --errors
$ witness test finish --verdict pass --evidence ./shots
05 · Built for agents

Failures your agent can act on

Witness never guesses and never calls a model. When something breaks, it tells the agent exactly what happened and what to do next, in one sentence.

  • 1What failed: the step, the service and the exit code.
  • 2Where: the file and line, pulled from the build output.
  • 3Next: one plain sentence the agent can follow.
  • 4Then: it pushes a fix, waits again, and Witness redeploys only what changed.
{
  "status": "failed",
  "stage": "build",
  "service": "web",
  "title": "Type error in app/page.tsx",
  "where": "app/page.tsx:16",
  "excerpt": "Argument of type 'string' is not assignable
              to parameter of type 'number'.",
  "next": "Pass a number to formatCents on line 16,
           push to coupon-field, then call witness_wait."
}
06 · Trust

Your secrets stay yours

You give Witness the keys to run your app. So we built it so we can't read them.

[ ]

Encrypted on your device

Secrets are locked in your browser or CLI with a key we never get. We store only scrambled bytes.

</>

Unlocked by you, for one sandbox

Your laptop unlocks each deployment and seals the secrets to that sandbox alone. Values are masked out of every log line.

{ }

Read-only on GitHub

The GitHub App can read code and write checks and comments. It can't push and it can't merge. A person merges.

07 · Questions

Short answers

Does Witness run an AI model?

No. Witness only builds, runs and checks your app. Your own agent does the thinking and the testing, on your machine, with your model.

What can it deploy?

Node apps (Next.js, Vite, Express, Hono and more), Cloudflare Workers, Go and Python services, across several repos at once. Witness reads your repo and suggests the setup; you check it once.

What about my database?

If a PR changes the schema, Witness makes a branch of your Neon or Supabase database for that PR only, runs your migrations on it, and throws it away when the PR closes.

What does it cost to run?

You pay for the time sandboxes run. You choose how many run at once and a monthly cap. Idle previews go to sleep and wake when someone opens them.

Is it secure enough for real secrets?

Your secrets are encrypted on your devices and we store only ciphertext. The docs list exactly what this protects against and what it can't, in plain words.

Private alpha

Stop being the queue

Connect your repos, add your agent, and let every pull request prove itself before you look at it.