v0.10 pre-releaseA Lock of the Lock Family · open source · Apache 2.0

Your agent asks about the file. It never reads it.

Any AI agent can ask yes/no questions about a file in S3, on SFTP or on disk. Signed, sandboxed plugins answer, and the agent only ever gets 1s and 0s.

Install with Homebrew
brew trust davidgodefroid/tap
brew install davidgodefroid/tap/lockfile davidgodefroid/tap/lox cosign

Linux only (the plugin sandbox needs Landlock and seccomp), with Docker. Needs lox v0.12.0+ and cosign v2.5.0+. Then lox add lockfile and lox run. The whole family: brew install davidgodefroid/tap/lockfamily.

Part of the Lock Family: one hub (lox run) approves for every Lock.

lockfile · profile fileslox run · ticket

Plan · 2 answers
askedinvoices/2026/10/abc123.pdffile.non-empty and format.is-pdf, with their signed questions. Every plan is a ticket, decided in lox run.
Answers
file.non-empty: 1 · format.is-pdf: 0Not empty, not a PDF. No byte, name, size or type of the file.

Approved · y

What the agent gets

One bit per plugin, or no answer. Never the file.

A plan as you approve it in lox run, and all the agent gets back.

See it run

Step by step. 1: an agent runs lockfile plan with three yes/no plugins on an invoice and is told the plan is pending human approval. 2: the plan shows as a question in lox run, the email address in its key masked. 3: you open the details, read each plugin's question, and press y to approve. 4: the agent runs the ticket; the lockfile console fetches the file and runs the three signed plugins in the sandbox. 5: only their answers, 1, 1 and 1, reach the agent.
An agent (here Claude Code, left, in its own account) asks three questions about an invoice. You approve the plan in lox run (top right). The lockfile console (bottom right) fetches the file into the sandbox and sends back one bit per plugin.

What the agent gets

One plan, two questions about one file. The agent names the key it was given and the plugins it wants, and hears pending with a ticket. Once you decide it in lox run, it runs the ticket. This is the whole answer:

$ lockfile plan --key invoices/2026/10/abc123.pdf \
    --plugin file.non-empty --plugin format.is-pdf --json
{"status":"pending","ticket":"01J…","lock":"lockfile","instance":"files"}
$ lockfile run 01J… --json
{"handle":"f_8Kq2xR","answers":[
 {"plugin":"file.non-empty","version":"1.0.0","official":true,"result":1},
 {"plugin":"format.is-pdf","version":"1.0.0","official":true,"result":0}]}

The file is not empty and does not start like a PDF.

"result": null with "error": "plugin_error" means the plugin gave no answer: it is not a 0. The exit code depends on the outcome only, never on an answer.

Why lockfile?

Some files must not reach a model: invoices, contracts, medical letters, anything with personal data.

Yet an agent debugging a pipeline often needs one fact about one of them. Did it arrive empty? Is it a broken PDF? Is a page blank?

Read access answers that and leaks everything else. lockfile answers the question and nothing else.

Agent file access compared with lockfile
PropertyAgent reads the filelockfile
Agent never sees a byte of the fileNoYes
Agent never sees the name, size, type or a listingNoYes
Agent never holds the storage credentialsNoYes
Every plan is a ticket decided outside the agent, by you or your auto rulesNoYes
Every question is fixed and signed in advanceNoYes
The code that reads the file has no networkNoYes
Answers released on a fixed time quantumNoYes
Append-only audit of every fetch and outcomeNoYes

The agent only ever sees 1s and 0s about a file.

See what you approve

The console draws the plan: the agent’s own request and the plugins’ signed questions. It then fetches the file once to hash it: the sha256 and size go only to the masked screen lockhub shows you, never to the agent. The run fetches again and refuses different bytes (E_STALE).

The screen goes to lockhub as a ticket, which you decide in lox run unless a lox run auto rule does. A plan with an unofficial plugin or typed values always waits for a human.

╭─ SAMPLES · file plan · 2 answers ─────
│ requested by uid 1000 (alice) · pid 48211 · exe /usr/local/bin/lockfile
│ agent: check the invoice reported as blank
│
│ key    invoices/2026/10/abc123.pdf
│
│ file.non-empty@1.0.0  (official)
│   ? Does the file contain at least one byte?   1 = size > 0   0 = the file is empty
│ format.is-pdf@1.0.0  (official)
│   ? Does the file start like a PDF?   1 = `%PDF-` appears within the first 1024 bytes   0 = no PDF header
│
│ this plan reveals at most 2 answers about the file
│ sha256 9f2c…e41a · 48213 bytes
╰─ pending: ticket 01J…
The sha256 line is on lockhub’s screen only. When the agent runs the approved ticket, the console fetches the file again into a private workspace, runs each plugin in its own sandbox, checks each answer and releases them together on the next answer quantum.

n denies; a reason you type is never forwarded to the agent. A production profile flags its tickets, and the console’s own widenings (its policy review, a plugin added) need the profile name typed.

Highlights

  • Only 1s and 0s

    Everything the console sends the agent comes from a closed list, checked end to end over the socket. No size, type, hash, name, listing or error text.

  • Human in the loop

    Every plan is a lockhub ticket, decided in lox run outside the agent, by you or an auto rule you set. The screen says how many answers the plan reveals.

  • Signed questions

    Each plugin answers one question fixed in its signed manifest. The agent chooses no value: one would let it aim the bit at the content. A protocol-2 plugin may take up to 4 values the human types at approval.

  • Sandboxed plugins

    Landlock, seccomp and rlimits: the file as a read-only fd 3, no path, no network, an environment holding only LOCKFILE_PLUGIN_PROTOCOL, stdout capped at 3 bytes.

  • cosign everywhere

    Plugins, the marketplace index and lockfile’s own releases are checked against cosign signatures with a Rekor entry: keyless for official ones, or a pinned public key for an unofficial marketplace. There is no unsigned mode.

  • Timing padded

    A run’s result leaves the console only at the next multiple of answer_quantum (5 s by default), so a fast or slow plugin tells nothing.

  • S3, SFTP, local

    Keys outside the profile’s prefix are refused, objects above max_object_bytes are not fetched, and a fetched file is deleted on release or expiry.

  • Audit for you only

    Key, size, sha256, fetch cause and each plugin’s precise outcome go to an audit log only the console account can read. Never file bytes.

Quick start

  1. Install with Homebrew (the box above), on Linux: lockfile, lox v0.12.0+ and cosign v2.5.0+. Docker must be running.

  2. In your project, lox add lockfile asks where your files are (S3, SFTP or a local directory), sets up the lock and starts its console.

    cd your-project
    lox add lockfile
  3. In a terminal of its own, outside any agent, keep lox run open. Every plan shows up there for your decision.

    lox run
  4. With lox run up, install the plugins you want. The console applies them after :review (lox attach files, where files is the name you gave the lock).

    lockfile plugin install file.non-empty@1.0.0
    lockfile plugin install format.is-pdf@1.0.0
    lox attach files
  5. Start your agent in the project (claude, codex, gemini, …) and ask about a file by its exact key.

To wire your agent, run lockfile init <agent> (claude, codex, cursor or gemini).

Know the limits

The console is the enforcement point. Plugins answer one bit each, but a plugin whose code does not match its question is mitigated by review and signing, not prevented.

A missing answer (plugin_error) and a failed fetch (fetch_failed) each carry one symbol that depends on the file.

The host’s own accounts can read a running plugin’s /proc entries unless the host mounts /proc with hidepid=invisible.