gh pr create, git push, railway up, kubectl delete. The Passport hook puts that work in the same record as everything else your agents do. With the guard on, Passport also applies your rules to the commands it recognizes.
Turn it on
--agent codex or --agent cursor for those agents (--client still works). Leave out --guard to only record commands. Without --apply you see exactly what would change and nothing is written.
Passport adds only its own entries and leaves your other hooks alone. Codex asks you to trust new hooks: open Codex →
/hooks and trust Passport’s hooks.
Check what is registered:
Guard health
Each agent on each computer has one guard state, whichpassport status prints:
The Passport CLI reports these at most once a day: from a hook with time to spare, from
passport exec, and from passport status. It sends flags only, never a command, a path, or a setting’s value. For Codex it compares the hash Codex stored for Passport’s hook in ~/.codex/config.toml with the hook as written, the way Codex itself decides whether to run it. A report is your computer’s own word, so treat it as visibility, not proof. A computer that keeps working but stops reporting for a week reads Not reporting.
When an agent’s guard turns off after being on, goes out of date, or isn’t trusted, its row on Agents says so. It clears itself once the fix is in.
What the guard does
Before each shell command, the guard reads it on your computer and asks Passport about it when your rules could apply. Passport answers with your workspace’s Allow or Block rules (nothing is blocked until an admin adds a Block), the same rules your agents’ tool calls through Passport follow, so a command and a tool that do the same thing get the same answer. It asks about:- a
gh,git push,railwayorsupabasecommand that changes something on a platform your workspace connected in Passport, such as a push to a protected branch, a merge, a deploy or a migration; - a command that can’t be undone on this computer, such as deleting your home folder, the disk or the project folder.
When Passport can’t be reached
The guard waits at most 1.5 seconds for an answer. Unanswered, the command runs as it would without Passport, and Passport is told afterward that it ran. A command that can’t be undone on this computer is the exception: unless Passport allowed it, it doesn’t run while Passport can’t be reached or this computer isn’t signed in.Stopped agents
When an admin stops an agent in Passport’s Agents, every command it sends to Passport, including everypassport exec, is refused with “Stopped by Sam. Every call is refused until an admin resumes this agent in Passport.” until it is resumed.
Keys and passport exec
Passport doesn’t hold your keys. Your CLIs keep their own sign-ins, and Passport decides each command against your rules before it runs.passport exec asks Passport first, then runs the CLI with your own sign-in and environment, and passes its output and exit code through. A block refuses at once with Passport’s message (exit 5). If Passport can’t decide in time on an app that enforces rules, nothing runs (also exit 5). If Passport can’t be reached, nothing runs (exit 1). passport exec -- git push is decided ref by ref, the way the guard decides a push.
passport scan, passport status, and passport keys list the CLI keys found on your computer, so you know where an agent could read one. They stay where they are.
passport keys move, add, rotate, keep, and signed-out print one line saying they’re off. passport git-credential setup changes nothing, and passport git-credential setup --remove undoes an earlier setup. passport kube-credential exits with a note to point kubectl at your own credentials. Shims an earlier version added still work; passport keys shim --remove all takes them out.
What it can’t see
The guard is a guardrail, not a security boundary. Aliases, shell functions defined elsewhere, and code in other languages are beyond it.--help and --dry-run never trigger it.
What it records
After each shell command, the hook sends Passport only:- the tool that ran, such as
ghorterraform - a coarse verb, such as
pr createorapply - what kind of command it was: read, write, destructive, api, sql, http, or unknown. Passport shows it as one class: Read, Write, Delete, or Irreversible
- whether the command succeeded, how long it took, and the name of the folder you were in
- the repository’s name and branch for the folder you were in, and after a
git pushthat worked, the branch it pushed (not the default branch) and its repository’s name, so a task is titled by the work it pushed even from another worktree. Never a remote or a URL - your agent’s session identifier, so a run hangs together, and when the session starts and ends, with the model’s name and whether someone is at the keyboard when the agent says so
- when the guard stepped in: the command was blocked
- when a vendor CLI failed because its sign-in on your computer expired, which CLI (
railway). The hook reads the last 4 KB of what the command printed on your computer to tell, and never sends it - what a command created or removed that keeps running, such as a Supabase branch or an RDS instance: the CLI, the kind, the name the command gave it, and for AWS the instance size.
- when the same command failed 3 or more times in a row in one session, how many times, and its program’s name (
npm) - up to three links to what the command made or touched, such as the pull request
gh pr createprinted or the Railway deploymentrailway upstarted. The hook reads the start and end of what the command printed (at most 16 KB) on your computer, and sends only URLs that match Passport’s list of vendor pages, rebuilt from their parts, never one with a token or a signature - only if an admin turns on Show what agents say they’re doing (off by default), and only from Claude Code: the agent’s own one-line description of the command, such as “Run the bridge tests”
cliHook.ts), and a link becomes its host. If it contains anything the approval summary would hide, such as a key, a token, or a long opaque value, or an email address, nothing is sent at all. Other agents don’t give a description, so they send none. Passport keeps it with the action for 90 days and shows it as the action’s label. Turning the setting off stops Passport keeping new ones right away and hides the ones it kept.
Each finding becomes one activity row under its app, such as GitHub CLI or Git, with everyday commands under Shell. The action reads like “railway redeploy”. A blocked command shows as blocked.
When an agent gets stuck
The hook also tells the agent, in its own words, so it can fix things without you:- A sign-in expired. The agent is told to stop and that you were asked to sign that CLI in again. Claude Code hears it right after the command; Codex and Cursor on their next try of that CLI.
- A retry loop. From the 3rd identical failure in a row, Claude Code is told to stop retrying and read the error, or ask for help.
What it never records
The hook never sends, and Passport never stores:- the command line or any of its arguments (a description, when it’s on, is the agent’s words about the command, never the command)
- the command’s output
- your full folder path, only the last folder name
- anything from your environment, including tokens
- anything from an agent’s transcript
Turn it off
PASSPORT_HOOK_DISABLED=1.