unlatch

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

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.

agentmods
npx agentmods add commands/open-latch/latch/unlatch
Clone the repo
git clone --depth 1 https://github.com/open-latch/latch
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. Scan, not verified.
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 $0.00008 $0.00617
Opus 5 $0.00004 $0.00309
Sonnet 5 $0.00002 $0.00123
Haiku 4.5 $0.00001 $0.00062

Measured 3d ago against content hash c1b75237f908, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 3d ago), licensed Apache-2.0. It adds 8 tokens to every session and 617 once invoked, about $0.0000 per session on Opus 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.