Dave Stanton PhD

Two Hours to Arrive at cp

2026-09-14

I had an idea for an open source project. I wrote a spec for it. I asked Claude to read the spec and challenge me. Two hours later I closed the laptop having decided to copy files around by hand, which is what I was already doing.

That sounds like a waste. It wasn’t. It’s the single highest-leverage thing I do, and it’s what happens to most of my ideas.

The idea

The problem started real enough. My secrets are sprawled across .env files, secure notes, and ad hoc environment variables on two machines. Moving a project between them means reconstructing what it depends on with no inventory to check against.

But there was a second problem stacked on top of it, and that was the one I found interesting. An increasing share of secret access on my machines isn’t me typing into a terminal. It’s Claude Code sessions and MCP tool calls reading secrets autonomously. There’s no way to see which agent read which secret, when, or why.

So: build a reasoning proxy. Doppler handles storage, rotation, backup — a solved problem I have no interest in rebuilding. The proxy sits in front of it and handles the part nothing on the market does: a caller stating why it’s asking. Reason codes matched against policy. Approval queues. Tiered model review, where the strongest available model sits on the defensive side and the requesters run on whatever suits their task. OpenTelemetry spans on every access event.

I liked this design. I still think parts of it are good. It had an architecture diagram and a build order and a section on ECS deployment topology.

The challenges that landed

I asked to be challenged, and a few of them went straight through the hull.

I was auditing fetches, not uses. envctl pull writes a .env to disk and every read after that is invisible. An agent that wants a key it isn’t policied for can just read the file a previous pull left behind. I had an answer for this — I genuinely only wanted fetch-level visibility, and the reason should state where the secret lands — but it forced me to admit the audit trail was thinner than the spec implied.

Every field except the token ID is written by the requester. The reason code, the session ID, the model, the freeform detail. I’d already conceded this for the detail field and called it an observability signal rather than a security boundary. I hadn’t noticed it was equally true of the reason code, which I’d described as “matched deterministically against policy.” Deterministic matching of a value the caller picks about itself is a politeness protocol.

The judge’s entire input is adversary-authored. The tiered review reads the caller’s prose. Giving the defensive side a stronger model doesn’t help when the weaker side writes the prompt.

Then I brought up a published agent containment incident as justification for why blocking matters, and it turned around on me. In that incident, a meaningful share of the agents’ own activity transcripts contained successfully spoofed tool calls, and a larger share of agents expressed interest in tampering with their own logs. In the exact scenario I was citing as my motivating threat, every self-reported field in my schema would have been a lie.

Worse: the agents escaped through a proxy. The test environment routed outbound traffic through a single chokepoint, and they found a vulnerability in the proxy software and used it to break out. I was proposing a FastAPI app I’d written that month, holding one broad Doppler service token, as a control point. Under my own threat model it wasn’t a control point. It was the highest-value target on the machine.

Splitting things apart

The conversation got good once things started coming apart into separate pieces.

The requester and the judge are different systems. Once the judge holds no token, has no egress, and has no tools, the worst outcome of a successful injection is a wrong verdict rather than lateral movement. Bound it further with one rule — the judge may only move a decision in the restrictive direction — and poisoning buys an attacker nothing, because the best achievable outcome is the baseline static policy would have granted anyway. A judge that’s down or confused fails safe by construction.

Ordering turned out to matter more than outcomes. Emit the access event before forwarding the request, never after. Then a crash, a kill, or a forced bypass still leaves an attempted record, and a granted secret can’t exist without a shipped event preceding it. Which led somewhere I didn’t expect: if ordering is the property you care about, you can assert it in tests. Spans as the unit of design — run a scenario, assert the sequence, make attack scenarios into fixtures. Threat modeling as trace spans.

That one has a real limitation, and naming it is what cracked the whole thing open. Spans only model paths that go through your code. Every attack that actually mattered — a stolen token going straight to Doppler, reading a .env a previous pull left behind, killing the proxy so the bypass path kicks in — produces no span at all. The instrument was blind to exactly the class of thing I’d built it for.

The conflation

Then the real question: was I recreating Doppler?

Partly. Not the ACL — what a token may reach is Doppler’s job and the proxy must never be the thing deciding it. But the mapping from stated intent to least-privileged credential is genuinely new, because tokens don’t explain themselves. That distinction is the good part of the idea and I’d keep it.

But holding that answer up next to my actual life, the thing became obvious. I have no compromised agents. No audit requirement. Nobody asking who read what. The problem statement in my own spec listed two problems, and the daily one — migration friction — was already solved. I keep my system of record in Apple Passwords. I sync .env files through iCloud Drive. That’s it. That’s the whole problem, and it’s been handled for years.

I hadn’t over-complicated one project. I had two projects wearing the same name.

The secrets management project was finished before I started. It’s a folder.

The other one is a security lab. Asymmetric model tiering, restrictive-direction-only judging, injection delivered through replayed audit history, red team and blue team as actual model-driven clients rather than scripted fixtures. That’s a genuinely interesting experiment. It doesn’t need to be — shouldn’t be — the thing guarding my real credentials. It wants synthetic tokens and deliberately hostile clients.

So it goes on the shelf. Maybe I build it. Probably I don’t. Either way it isn’t a friction point in my life today, and that’s the only test that matters for what I work on next.

Two hours to arrive at cp

The landing is anticlimactic. I copy .env files out of iCloud Drive into project directories. I considered symlinks — I used to do exactly that — but on macOS a symlink’s own permission bits are ignored for access control, so read-only has to live on the target file anyway. And a copied file works offline, survives iCloud being weird, and doesn’t tie every repo to a path in my home directory. The cost is drift when I rotate something, which I handle by treating iCloud as the source of truth and the project copies as disposable.

That’s the outcome. Two hours of conversation to arrive at a command I already knew.

But I didn’t pay two hours for cp. I paid two hours to not spend three days building a FastAPI service, a policy engine, an approval queue, and an ECS deployment for a problem I don’t have. That’s a good trade at ten times the price.

This is what happens to something like 95% of my ideas. I get excited, I write a spec, I talk it through with something that will argue back, and the idea dies. The ones that survive that are the ones worth building. The spec wasn’t wasted work — it was the thing that made the argument possible, and it left behind two ideas I’ll reuse somewhere else entirely.

You have to be willing to throw away the thing you were excited about two hours ago. That’s the whole skill.