Write and Verify Code
Ask a Type.com agent for a change to your app and it does the whole job: it writes the code, runs your app, checks that the change does what you asked, and sends back a short video of it working. You can also hand it a pull request someone else wrote and ask whether it does what it should.
Verification is in early access for managed Claude and Codex agents. When it is enabled for your organization, agents use it on their own. You don’t need to turn anything on per thread.
Why verification matters
Section titled “Why verification matters”Code that compiles is not code that works. A change can pass type checks and unit tests and still put a button in the wrong place, forget to save a field, or break the page next to it. Without verification, you find those problems yourself: you pull the branch, start the app, click through it, and send the agent back with notes.
Type closes that loop for you. The agent works the way a careful engineer does:
- Understand. It reads the relevant code and asks you when the request is unclear, before it writes anything.
- Write. It makes the change.
- Run. It starts your app and uses it the way a person would.
- Check. It compares what happened with what you asked for, part by part.
- Fix and repeat. If something is wrong, it fixes the code and checks again, before you see anything.
- Show you. It sends a video of each part working, with a short reply.
Because the agent sees the result, it catches its own mistakes. Because a separate reviewer judges the result against your words, a passing check means the change does what you asked, not just what the agent thought you asked. And because you get a video, you can review a change in under a minute instead of setting up a branch.
What Type needs to check your work
Section titled “What Type needs to check your work”Type can only verify what it can run. It checks on the first of these it has:
- A preview environment (recommended). Set up a preview environment for the Space’s repository once. Every thread then gets its own copy of your app, with dependencies installed and test data ready. The agent can verify any change it writes and any pull request you point it at, and compare it with the code before the change.
- Your pull request previews. If your repository already deploys a preview of each pull request, for example on Vercel, Netlify or Render, ask Type to check a pull request and it finds that preview itself. It reads the link from your hosting provider for the pull request’s latest commit, and waits until that deployment has finished. Give it a test account for the preview through the secure form.
- A staging link. Give the agent a link to your staging site and a test login, and it checks that.
Type never guesses links, and it never tests production.
Without any of these, the agent still writes and reviews code. It runs whatever needs no running app, such as type checks, lint and self-contained tests, and tells you plainly that it did not run the app. Nothing is presented as verified.
Ask for a change or a check
Section titled “Ask for a change or a check”- Connect GitHub and give the Space access to the repository.
- Set up a preview environment. If you haven’t, Type can still check pull requests that get preview deployments, or a staging link you give it.
- Ask in a thread. Say what should happen in your own words.
To have Type write code:
Fix the search filter so it stays selected after saving an item.
To have Type check a pull request:
Check #128: archived orders should leave the list, and shipped orders can’t be archived.
For a pull request, the agent checks out the branch, runs it in its own copy of your app, and compares it with the base branch, so you see what the pull request changes. If your app can’t run in Type, it checks the pull request’s preview deployment instead. There it can compare with the old code only when the base branch is deployed too, and it tells you when it couldn’t. It does not change code it was only asked to check, and it posts results on the pull request only if you ask.
Say what you expect. The reviewer judges the result only against your messages in the thread. If you don’t say what should happen, for example “check #128” on its own, the agent reads the pull request and asks you.
How Type tests a change
Section titled “How Type tests a change”The agent splits your request into the parts you would name, such as “the order leaves the list” and “shipped orders can’t be archived”, and checks each part where a person would notice it.
- Things you see on a page. It opens your app in a real browser, signs in with a test account, and clicks, types and navigates like a person. It checks what actually appears on the screen, and reloads the page to confirm a change was saved, not just shown.
- Things behind the scenes. For a new endpoint, a validation rule or how a record is saved, it calls your app’s API the way your own app does and checks the response. For a write, it reads the record back to confirm it was stored.
- Command-line tools. It runs the commands as a user would type them and checks the output.
- Bug fixes and pull requests. It runs the same check on the old code first, when the old code can run, so you can see the bug was real and that the fix is what changed it.
- Small changes. For a typo or a change the repository’s tests already cover, it runs those tests instead of recording a video. Effort fits the change.
The agent uses disposable test data and gives each record it creates a fresh name, so one check never depends on data from another. Previews and staging often share data with other people, so there it prefers checks that only read.
What you get back
Section titled “What you get back”A video. It opens with a title, plays one chapter for each part of your request, and ends with a summary. Each chapter shows the app working, with the cursor, the checks that passed, and what the old code did when it was checked. API calls appear as cards with the request and the response that was checked.
A proof card on the agent’s reply, written by Type from the review, not by the agent. It shows the status, what was observed for each part of your request, and where to watch it in the video. Select a time to jump there.
A short reply from the agent: what it changed or found, anything the check could not show, and a pull request link if it opened one.
A proof section on the pull request. When the agent opens or updates a pull request, it adds the proof to the description, naming the exact commit it checked.
A change checked only by the repository’s tests gets no video and no proof card. The agent says what it ran.
An independent review
Section titled “An independent review”Every final check is reviewed automatically before a change can be called Verified. The agent cannot skip it.
The reviewer starts fresh. It never sees the agent’s code or reasoning, only your messages in the thread and the evidence: frames and page text from the recording, and the requests and responses. It checks each part against what you asked and that nothing you asked for is missing. If you’d expect to see something on a page and the check only looked at the API, that part does not pass.
The reviewer runs on a model from a different family than the agent’s, so it doesn’t share the agent’s blind spots, and the card names it. Ask for a particular model if you want a second opinion, for example “have GPT review the proof”. In an automation, set proof: { reviewer: { model } } on the agent stage. Type then reviews every proof in that stage on that model and passes the verdict to the next stage as agentResult(...).proof, as in Verify, Merge, and Watch Bug Fixes.
The card shows Verified only after the review passes and the matching video is attached. Otherwise it shows Unverified, with what the reviewer saw. A newer check replaces an earlier one. When a final check fails, the agent attaches a recording of the failure.
Help Type check your app
Section titled “Help Type check your app”Tell Type how to test your app
Section titled “Tell Type how to test your app”Add a Verification section to your repository’s AGENTS.md or CLAUDE.md, or link to a file from there. The agent reads it from the checkout it is working on. Describe:
- How to start the app for testing, if it differs from your normal run command.
- How to sign in: the test account’s variable names, or a command that creates a session. If your login goes through another site, describe a test sign-in that works inside the app.
- How to prepare disposable test data.
- Where saved checks live, if you keep any.
Keep secret values out of it.
Test accounts and secrets
Section titled “Test accounts and secrets”Enter test credentials through the secure form the agent shows you, never in chat. Save the default repository’s test account for the repository so later threads reuse it, and keep the variable names your repository already uses, such as E2E_EMAIL and E2E_PASSWORD. Values must be at least four characters long.
Credentials are used only on your app’s own pages, so a link or redirect to another site can’t collect them. They are removed from logs, reports and other saved text. Videos and screenshots show whatever the page displays, so use test accounts and avoid showing sensitive data on test pages.
If your app signs in through another site that needs a magic link, MFA or a captcha, point the agent at a saved browser session your end-to-end tests already write, or at a dev-only command that creates one.
Other repositories
Section titled “Other repositories”When you name a repository other than the Space’s default, the agent checks which repository it is and follows that repository’s own setup instructions. The default repository’s commands and credentials are never assumed to apply.
Limits
Section titled “Limits”- Browser checks run in Chromium. Native mobile and desktop apps aren’t checked in a browser; the agent uses the repository’s tests and explains what it checked.
- A video shows your app as it ran in the sandbox, on the pull request preview, or at the link you gave. It does not prove behavior in other browsers or with production data and configuration.
- Type never tests production or your real data.
- The detailed records stay in the sandbox: screenshots, a full report and checksums. Ask the agent to attach them if you want them.
Troubleshoot
Section titled “Troubleshoot”| What you see | What to do |
|---|---|
| The agent says it didn’t run the app | Set up a preview environment for the repository. To check pull requests, preview deployments also work, or give the agent a staging link and test account. |
| The agent can’t find the pull request’s preview | Check that the deployment finished and that your hosting provider reports it on the pull request, as a GitHub deployment, status check or comment. Or paste the preview link in the thread. |
| Verification isn’t available | Confirm you’re using a managed Claude or Codex agent and that early access is enabled for your organization. Contact support if needed. |
| Repository setup is still running | Wait for it to finish. Starting another setup at the same time can conflict with dependency installation or database setup. |
| The app can’t start | Check the repository’s setup and run commands, and provide any missing test variables through the secure form. |
| Sign-in fails or the check ends on a sign-in page | Make sure the test account works, and describe how to sign in under Verification in AGENTS.md. For sign-in through another site, provide a saved browser session. |
| The check ends on a different page than expected | The app redirected the browser, for example because a feature flag is off. Fix the flag or sign-in setup, not the check. |
| A check passes or fails because of old data | Your app keeps data between runs. Ask the agent to give the records its check creates a fresh name on each run. |
| The working tree changed during the check | The failure names the files. If your app writes them while running, such as a local database or uploads, store that data outside the checkout or ignore those paths. |
| A submodule is missing | Initialize submodules with git submodule update --init --recursive, then ask the agent to check again. |
| The review failed | Read what the reviewer saw. The app may be wrong, or the video may not show the behavior clearly. Ask the agent to fix it and check again. |