Type checking that doesn't melt your laptop.
Coding agents run tsc after every edit, and three agents in three worktrees run it three times at once. vetd keeps one warm TypeScript 7 checker per repository and rechecks only the files an edit can reach.
Why your fans spin
An agent can't see type errors, so it runs the compiler to find out. Each tsc --noEmit or next build starts cold: it parses every file, rebuilds the whole program and type-checks all of it, even when the edit touched one line.
- Per editA full cold check, repeated dozens of times in one session.
- Per agentParallel agents each start their own compiler, so CPU and memory multiply.
- Per worktreeA
tsc --watchin every worktree holds a full copy of the program in memory, idle or not. - Per guessThe agent has to write the edit to disk before it can check it, then undo it when it's wrong.
What vetd does instead
- One process per repository. Every agent, worktree and terminal shares the same daemon instead of starting its own compiler.
- Stays warm. The program is loaded once. Later checks reuse it rather than parsing the project again.
- Rechecks what the edit reaches. An import graph follows the change to the files that can observe it. When vetd can't prove an edit is isolated, it checks more, never less, and says why.
- Checks edits in memory. The agent sends a diff. Nothing is written to disk until it calls
commit. - Runs on TypeScript 7. Checks use
tsgo, the native TypeScript compiler from@typescript/native-preview. - Gets out of the way. tsgo sleeps after 5 idle minutes and the daemon exits 10 minutes after its last client disconnects.
Timings on public repositories, failed runs included, are on the benchmarks page.
Compared with tsc
tsc --noEmit | tsc --watch | vetd | |
|---|---|---|---|
| Start | Cold every run | Warm after the first build | Warm, shared by every client |
| Checks an unsaved edit | No | No | Yes, in memory |
| Processes for 3 worktrees | One per run | Three | One daemon |
| When idle | Exits | Keeps its memory | Sleeps, then exits |
| Next.js and web rules | No | No | Yes |
| Affected Vitest tests | No | No | Yes |
| Release gate | Yes | Yes | No, keep CI |
Setup
Install from a local checkout (the npm package isn't published yet), then wire up your agent:
npm install -D /absolute/path/to/vetd @typescript/native-preview
npx vetd initNo MCP? Pipe a diff straight in:
git diff | npx vetd check --patch -Per-client setup is on the MCP page.
FAQ
Why is tsc so slow in my project?
A cold tsc parses and type-checks the whole program on every run, however small the change. Large unions, deep generics and big barrel files make each run slower. Incremental builds (.tsbuildinfo) help later runs, but each process still loads the full program.
How do I stop my coding agent from running tsc after every edit?
Give it a faster check to call. npx vetd init registers the vetd MCP server and adds a guide to AGENTS.md that tells the agent to call check with its diff instead of running the compiler.
Do I still need tsc in CI?
Yes. vetd gives an agent an early answer while it iterates. Keep a full typecheck and production build as the release gate.
Does it work without Next.js?
Yes. The core checks any TypeScript project with a tsconfig.json. The Next.js and web rules switch on when the project uses them.
Is it safe to trust an incremental check?
vetd never reports a pass it can't justify. An unsupported or failed check is never ok, fallback shows when it checked the whole project, and verify rechecks dependents from scratch in a separate tsgo.
Which platforms are supported?
macOS and Linux, with Node.js 22.18 or newer and @typescript/native-preview installed in the project.