unlatch

unlatch is a command for Claude Code, Cursor from open-latch/latch. It costs 8 tokens per session (617 once invoked), scanned A, original, Apache-2.0.

A confirmed switch that turns Latch's automatic project-judgment layer off for the current installation. It can later be turned back on.

In plain words
What is it for?
Use it to inspect the current state, ask for confirmation, enable Unlatched mode, and later restore Latch's managed project instructions.
Why use it?
It provides a deliberate way to compare normal agent behaviour with Latch disabled, without deleting the project's stored knowledge or uninstalling Latch.

Command for Claude CodeCursor

Written for Claude Code and Cursor: argument-hint in frontmatter, but also shipped in a Cursor plugin. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the latch plugin — 10 skills, 9 commands shipped together

Good fit Use it to inspect the current state, ask for confirmation, enable Unlatched mode, and later restore Latch's managed project instructions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/open-latch/latch/unlatch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/open-latch/latch

Made for: Claude Code, Cursor.

Or install latch, the plugin that ships this one along with the rest of its 10 skills, 9 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for unlatch

README.md
[![agentmods](https://agentmods.dev/badge/commands/open-latch/latch/unlatch/github.svg)](https://agentmods.dev/commands/open-latch/latch/unlatch)
Your own site
<a href="https://agentmods.dev/commands/open-latch/latch/unlatch"><img src="https://agentmods.dev/badge/commands/open-latch/latch/unlatch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for unlatch

Your own site · 80×15
<a href="https://agentmods.dev/commands/open-latch/latch/unlatch"><img src="https://agentmods.dev/badge/commands/open-latch/latch/unlatch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 617 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.00617
Opus 5.5 $0.00003 $0.00247
Sonnet 5.5 $0.00002 $0.00123
Haiku 4.5 $0.00001 $0.00062

Measured 1mo ago against content hash c1b75237f908, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

unlatch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/unlatch.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use this when the user wants latch out of the way, wants to compare against vanilla agent behavior, or wants to re-latch after using the escape hatch.

Unlatched mode is in-place and install-level. It does not clone the project, delete KB data, uninstall latch, call a cloud service, or collect telemetry. It creates a visible UNLATCHED receipt plus the normal full-disable sentinel so latch's automatic project-judgment layer is off for this latch install until the user re-latches. If the user changes repos before re-latching, latch remains off and should say so loudly. It also masks latch's managed CLAUDE.md / AGENTS.md regions in the current project/ancestor files while unlatched, then restores them when re-latched, so native project-instruction loading does not keep carrying latch's contract in the repo where the user unlatched.

Never mutate state immediately from this command, even in dangerous/yolo permission modes. First inspect state and ask for explicit confirmation.

Inspect

bash <KB_HOME>/bin/unlatch.sh

If the output says LATCHED, tell the user:

Latch is currently LATCHED.

Switch to UNLATCHED mode?
This turns latch's project-judgment layer off for this latch install, masks latch-managed CLAUDE.md/AGENTS.md regions in this project, and leaves KB data intact.
Latch remains off for this latch install, even if you change repos, until you re-latch.
To re-latch later, run /unlatch again.

Reply exactly: unlatch

If the output says UNLATCHED, tell the user:

Latch is currently UNLATCHED.

Switch back to LATCHED mode?
Latch hooks will resume on the next prompt unless LATCH_UNLATCHED is set.
If LATCH_UNLATCHED is set, unset it too.

Reply exactly: latch

Stop there. Do not run the state-changing command until the user replies with the exact confirmation word.

Confirmed Action

Only after the user replies exactly unlatch:

bash <KB_HOME>/bin/unlatch.sh --confirm unlatch

Only after the user replies exactly latch:

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 75 lines · 8 tokens per session scan A c1b75237f908

Subscribe to this mod's changes

unlatch is a command published in the GitHub repository open-latch/latch (9 stars, last pushed 7d ago), licensed Apache-2.0. It adds 8 tokens to every session and 617 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.