---
title: "Allow Once"
author: "Zach Shallbetter"
published: 2026-11-28
modified: 2026-11-28
canonical: https://zachshallbetter.com/writing/allow-once
tags: ["Security", "AI", "Product", "User Experience"]
---

# Allow Once

Say an agent is running the tests in one of my projects. The tests need a database URL. A panel slides in: which program is asking, from which folder, running which command, for which key. I touch the sensor and the tests run.

Ten minutes later it asks again. Then again. By the fourth panel I'm not reading it anymore. I'm just touching the sensor so the work keeps moving.

At that point the prompt isn't protecting anything. It's a ritual.

I wrote about why I started building Latchkey in [*The Credentials We Learned to Copy*](https://zachshallbetter.com/writing/the-credentials-we-learned-to-copy). It ships now as [Pistachio](https://secretsinashell.com). Project files hold references, the values stay in iCloud Keychain, and a command gets a value only when I approve it. The rule I started with was simple: every read asks.

Followed literally, that rule produces the fourth panel. So the question I kept coming back to wasn't whether to ask. It was what a single yes should cover.

## What a yes covers

In Pistachio, **Allow Once** authorizes one request. Approvals aren't cached. The next request asks again.

That sounds strict, but the more interesting part is what happens between my touch and the release. A request that needs approval runs once to find its question, then waits for my answer without holding anything else up. When I answer, it runs again from the start. It uses my yes only if it's asking the same question, for the same items or fewer, and each item's value is unchanged. While the panel is up, Pistachio keeps a SHA-256 of each value in memory to check that. If anything changed, it asks again. After three tries it refuses.

Why bother? Because I approved a specific thing. If someone rotated the key while I was reading the panel, my yes was about a value that no longer exists. Releasing the new one on the strength of the old approval would be quietly answering a question I never saw.

Nothing unanswered gets through, either. A request nobody answers is denied after two minutes. If I walk away from my desk, the work stops instead of waiting for me to come back and touch the sensor without remembering what it was for.

I made a version of this argument in [*The Last Cheap Question*](https://zachshallbetter.com/writing/the-last-cheap-question). The check matters because of what the next click does. Here the next click hands a credential to a process I don't control. Once it's out, I can rotate it. I can't take it back.

## Who is asking

A yes is only as good as what I know when I give it.

The panel shows the folder, the command and the chain of processes that led to the request. Pistachio gets those from the kernel, not from the request itself, so a program can't simply claim to be something else. The caller is checked by its code signature. Its parents are named by their files, and file names can be faked. So the chain is informative, not proof. I judge a request by its folder and its command too, and I deny anything I didn't expect.

There's also the panel itself. Anything can draw a window that looks like Pistachio's. Touch ID runs inside the panel through Apple's [embedded authentication view](https://developer.apple.com/documentation/localauthenticationembeddedui/laauthenticationview), and the match happens in the [Secure Enclave](https://support.apple.com/guide/security/secure-enclave-sec59b0b31ff/web). A touch on a lookalike authorizes nothing in Pistachio. **Use Password…** falls back to the standard macOS sheet, which also accepts an Apple Watch, so a Mac without Touch ID still works.

## Asking less without allowing more

This is where the fourth panel comes back. There are three ways to see fewer prompts, and each one trades a prompt for a standing permission.

**Grouping.** If several requests arrive from the same agent, in the same folder, while the panel is already up, they show as rows in that one panel and one touch answers them all. A test runner that starts five workers at once can get by with one touch. Some requests never group: pushes to remote services, requests over SSH, requests from Safari, and anything from a program the kernel couldn't identify.

**Grants.** I can let one project folder read the keys I pick for a set time: 30 minutes, a few hours, a day or a week, until the agent quits, or until I revoke it. Grants are matched against the folder the caller actually runs in, and no file holds them, so no program can write itself one. The last option has no end date. It keeps working until I take it away, which makes it the one worth reviewing.

**Agent-safe items.** Some values aren't worth a prompt: a key for a local test service, say. Marking an item agent-safe means any program in my Mac account may read it without asking. It's useful for a scheduled job that runs while the screen is locked. It's also exactly what it sounds like.

All three are still logged. Activity lists every request and every key released, with the program and folder. It never shows the value. Pistachio's own security notes put it plainly: grants and agent-safe items should be narrow and short.

None of these make the prompt smarter. They make it rarer, so that when it does appear it's about something I haven't already decided.

## What the prompt can't do

I don't want to oversell a panel.

Anything running as me can ask. Pistachio can't tell a program I trust from one I don't, except by the process chain it shows me. Malware in my account could keep asking until I approve one out of habit. That's the fourth-panel problem again, and the reason I'd rather see one prompt that matters than ten that don't.

A released value is out of Pistachio's hands. Once a command has it, the command can write it to a file or send it somewhere. Pistachio masks exact copies of values six characters or longer in what the command prints. That catches the accidental echo, not a command trying to leak. And Activity tells me what was released. It doesn't tell me what the process did with it.

That's the same line I drew in the earlier essay: a secret isn't permission, and permission isn't enforcement. An approval panel sits on the first side of that line. It decides whether a value leaves. Whatever happens next needs a different control.

## Once

When I started, I thought the hard part would be keeping keys out of files. That part turned out to be mostly plumbing.

The hard part is the moment of asking. It has to show up where I'm already looking, while I can still do something about it, and rarely enough that I still read it. If I'm touching the sensor without looking, the design has failed, no matter how secure the mechanism underneath is.

So the button says **Allow Once**, and that's what it does. It answers one question I actually read. If I want it to mean more, there's a grant for that, with an end date I chose and a line in Activity every time it's used.

---

![A single pistachio, its shell split open around a green kernel](https://iqscb8r7qx1brxma.public.blob.vercel-storage.com/media/articles/allow-once/pistachio.webp)

**Pistachio** (formerly Latchkey) is a Mac app that keeps developer secrets in iCloud Keychain, leaves references in project files, and asks before any command or agent gets a value. [secretsinashell.com](https://secretsinashell.com)
