Latch
Run the checks your project already uses and bring failures into your coding agent’s session.
Latch gives your coding agent a feedback loop using commands your project already runs. Install a plugin to run checks automatically, or use the standalone CLI from your terminal or CI.
- Run your first check with an existing project command.
- See what your harness supports for local or hosted sessions.
- Try a runnable project and see how Latch reports a failure.
When to use Latch
Use Latch when you want checks to happen consistently across agent sessions. An edit can trigger a quick lint check, and a changed turn can trigger the tests or build that need the complete set of changes.
How it works
| Event | Use it for |
|---|---|
after_edit | Fast checks after a supported native file edit, such as lint or formatting. |
turn_end | Checks that should run once after a changed turn, including turns with shell edits. |
- Run only what’s relevant. Git comparison skips unchanged turns and no-op edits by default. Filter by path or extension to narrow it further. Hook lifecycle
- Keep feedback focused. Passing checks are quiet by default. Latch can shorten long failures and link to the original log. Output modes
- Use your existing commands. Set them in
latch.jsonfor any language, or skip the file when Latch discovers the scripts you want. Set up checks
Examples
Each project links to its README on GitHub, with steps to run the checks and trigger a failure.
| Project | What Latch runs | Try this |
|---|---|---|
| TypeScript with npm | Prettier after an edit, then TypeScript and Vitest at turn end. Uses package.json alone. | Change Hello to Hi in src/message.ts and see Vitest report the mismatch. |
| Python with uv | Ruff after an edit and unit tests at turn end. Uses pyproject.toml for commands and latch.json for shared settings. | Add an unused import os to the example module and see Ruff flag it. |
| Path and extension filters | Git status on every changed turn, plus whitespace checks for matching Markdown and TypeScript files. | Edit either file, both, or a JSON file to see which checks run. |
Compatibility
The default delivery of failures depends on the agent and event. For a supported agent, opt in to "turn_end_feedback": "continue_once" to give it one chance to respond to a failed turn-end check automatically, without another message from you or an automatic recheck. Local feedback compatibility matrix · Opt-in turn-end feedback · Cloud sessions
Go deeper
- Run from a terminal or CI. Install the CLI, inspect resolved checks, or replay a saved failure. CLI reference
- Use Latch from chat. Ask your agent to run checks or search saved output. Plugin tools
- Set up a hosted session. See which hook setups are available and what has been verified. Cloud sessions
- Diagnose a quiet hook. Check discovery, hook trust, and where the report lands. Troubleshooting