Skip to Content
Latch Docs

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.

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

EventUse it for
after_editFast checks after a supported native file edit, such as lint or formatting.
turn_endChecks 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.json for 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.

ProjectWhat Latch runsTry this
TypeScript with npmPrettier 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 uvRuff 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 filtersGit 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.

Browse all examples on GitHub

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

On this page