latch-pm

A command that records a decision the user has rejected and demonstrates an agent being stopped when it later tries to bring that decision back.

In plain words
What is it for?
Use it to test decision tracking by saving a ruled-out option, then triggering a future check that cites why the option was rejected.
Why use it?
It helps prevent coding agents from undoing choices the team has already made. The user confirms each proposed change before anything is written.

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/latch-pm
Clone the repo
git clone --depth 1 https://github.com/open-latch/latch
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,731 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.00036 $0.01731
Opus 5 $0.00018 $0.00865
Sonnet 5 $0.00007 $0.00346
Haiku 4.5 $0.00004 $0.00173

Measured 2d ago against content hash 1cdf16579775, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

latch-pm 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 2d 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/latch-pm.md · 139 lines

How it starts

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

This command's job is to deliver one moment: the user watches latch catch an agent about to revive a decision they already ruled out, and cite the reason. Optimize the whole flow for time to that first catch — not for producing a tidy project summary. A summary is commoditized; any tool can turn a description into goals and constraints. Latch's defensible moment is decision continuity: it stops a coding agent from confidently rebuilding the thing the team already threw out.

A project snapshot is fallback / secondary (§7), used only when there's no good decision to seed yet. Don't lead with it and don't present it as the payoff.

Everything is confirm-gated — propose, never auto-write. Use existing MCP tools only (latch_recent, latch_priority_list, latch_search, latch_insert, latch_priority_add, latch_link).

1. Read what latch already knows

latch_recent and latch_priority_list (and latch_search for existing decisions / ruled-outs if the recent list is thin). Don't re-ask what's already captured.

2. Say what you're doing — one line

"I'll help you seed one decision latch can use to stop a future agent from quietly undoing your judgment — then I'll show you it working."

3. Ask for one concrete ruled-out decision

"What's one approach you've already ruled out — a library, framework, service, architecture, or workflow you considered and decided against — and why?"

You're hunting a decision with three properties:

  1. Concrete enough to store as a decision.
  2. Plausible an agent might propose it again later.
  3. Reasoned — the why is attached. The reason is the asset; it's the part missing from code, docs, and every generic memory tool.

Strong: "Ruled out Redis for the queue — using Postgres-backed jobs, don't want to operate another service." / "Ruled out a cloud-hosted default — local-first trust matters for early adoption." Weak: "avoid complexity", "make it good", "keep it simple."

Read the full file on GitHub · 139 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. 2d ago First seen · 139 lines · 36 tokens per session scan A 1cdf16579775

Subscribe to this mod's changes

latch-pm is a command published in the GitHub repository open-latch/latch (9 stars, last pushed 2d ago), licensed Apache-2.0. It adds 36 tokens to every session and 1,731 once invoked, about $0.0002 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.