3.4.0-beta.1). Features may change before the next stable release.Switch to stable →secrets
ak secrets trust
Show, re-pin, add or remove a coding agent's trusted binaries
Use ak secrets trust for the operation described below. The command help records its arguments, effects, and options.
Command contract
Show, re-pin, add or remove a coding agent's trusted binaries
Synopsis
Show which binaries AgentKit trusts as <adapter>, re-pin with --refresh, trust one more binary with --add, or stop trusting one of several with --remove <path>. AgentKit identifies the coding agent that spawned it by walking the parent process chain and hashing that binary; a pin records the binary's absolute path and SHA-256 so an upgraded, replaced, or substituted binary is noticed instead of silently trusted. Re-pin after upgrading an agent, or after an anti-virus quarantine restores its binary. --refresh replaces every trusted binary of the adapter with the one on PATH; --add keeps them and trusts the one on PATH as well, each with its own fingerprint, for an agent run from two installs (a terminal install and a desktop app's bundled copy). With --path, either pins the exact binary a refusal named, such as the copy a desktop app bundles, which PATH may not resolve. A refusal records the caller it refused; showing the pin names that caller and the command that pins it, and --refresh or --add warns when it is about to pin a different binary. --remove keeps the others and refuses the last binary (replace it with --refresh); it takes the exact trusted path as its value and is not combined with --path. Grants written for the removed fingerprint stay until ak secrets revoke removes them. A shell or runtime wrapper (sh, node, python, …) is never pinned. --refresh, --add and --remove need an interactive terminal: they are the one place an operator confirms a change of trust in person.
Effects:
With --refresh or --add, and only after the operator confirms the new binary, runs <adapter> --version to record a version hint and writes the adapter's entry to ~/.agentkit/trust.json (schema 2 once an adapter trusts binaries with different fingerprints; earlier ak builds refuse that file); a pin that covers the last refused caller also clears its note in ~/.agentkit/trust-observed.json. With --remove, and only after the operator confirms, drops that binary and rewrites the file in the oldest schema that holds the rest, which can return it to schema 1; it never runs a binary and never changes grants. Without any of them, read-only.
Exit status: 0 success 2 invalid flags or arguments (including --refresh with --add, or --remove with --refresh, --add or --path), --refresh/--add/--remove outside an interactive terminal, or --remove of an untrusted path or the last trusted binary 3 the adapter's binary was not found or could not be hashed, or the binary is refused (--path is not an absolute path to a file the adapter could be, or it is a shell or runtime) 5 trust file failure, or another run changed the trusted binaries before confirmation
ak secrets trust <adapter> [flags]Examples
ak secrets trust claude # show the current pin and the last refused caller
ak secrets trust claude --refresh # confirm and re-pin the PATH binary after an upgrade
ak secrets trust claude --add --path "<path the refusal named>" # also trust that exact caller
ak secrets trust claude --remove /opt/old/claude # stop trusting one of several binariesOptions
--add Trust the binary currently on PATH in addition to the ones already trusted, after confirmation
-h, --help help for trust
--json Emit machine-readable JSON (implies --no-interactive)
--no-interactive Disable interactive prompts (CI-safe)
--path string With --refresh or --add, pin this exact binary instead of the one on PATH (the path a refusal named)
-q, --quiet Suppress non-error output on stderr
--refresh Re-pin the adapter, after confirmation, to the binary on PATH or the one --path names, replacing every trusted binary
--remove string Stop trusting the binary at this exact path, keeping the adapter's other binaries, after confirmation
-V, --verbose Extra diagnostic output on stderr (loses to --quiet)
-y, --yes Assume yes for all promptsSEE ALSO
- ak secrets - Manage named secret values (API keys, tokens)