Skip to main content
The checks work the same way with nobody watching. What changes is who answers the dialogs, and how a job tells a clean result from one that couldn’t be checked.

An agent nobody is watching

Claude Code holds a plan that passes the check at its approval dialog until someone answers, so an unattended agent would wait there for good. Turn on Governance: approve plans for an unattended agent under /plugin, or set ACTUAL_UNATTENDED=on, and the plugin answers that dialog for the agent:
  • The plan check still runs first. A conflicting plan is denied and revised as before.
  • A plan that passes, or that couldn’t be checked, is approved, and the session goes back to the permission mode it had before planning.
  • The denial dialog is off too, so the agent revises on its own.
  • While it’s on, it approves plans in every repository, with rules or without.
It’s off by default. Leave it off wherever a person reviews plans, because it approves on their behalf. ACTUAL_UNATTENDED=on or =off wins over the /plugin row, and ACTUAL_PLAN_GATE=off turns it off along with the rest of governance. In Codex, a run nobody is watching, such as codex exec, takes ACTUAL_UNATTENDED=on or ACTUAL_OVERRIDE_DIALOG=off. A conflict then sends the agent straight back to revise, instead of ending the turn to ask you. See Codex.

Checks in CI

actual plan-check and actual impl-check need no Actual AI account, only a runner to judge the rules. In CI, an API runner is the usual choice: Pass --runner on each call, or set it once with actual config set runner anthropic-api. Each check reports one of four outcomes in the status field of its --json output: Only a conflict exits non-zero, so a job that gates on the exit code alone can’t tell “checked and clean” from “couldn’t check”. Read status instead. With --json, the report is printed before a conflict exits 1. This GitHub Actions job checks a pull request’s changes with the Anthropic API runner:
impl-check checks a diff piped to it or named with --diff-file; with nothing piped, it checks the working tree against HEAD, untracked files included. To check a plan, run actual plan-check --plan-file plan.md --json and read status the same way. On Linux, the CLI’s prebuilt binary needs glibc 2.39 or newer, which ubuntu-24.04 has; see Install the CLI.

Signed-in commands without a browser

The commands that act on Actual AI, actual advisor and the signed-in actual adr commands, use the sign-in that actual login stores. A person completes that sign-in in a browser; an agent can’t.
  • actual login --no-browser prints the sign-in URL instead of opening a browser, which helps over SSH.
  • The CLI renews the stored sign-in as it uses it.
  • actual whoami --check asks the server whether the sign-in still works, renewing it first when it’s about to expire. It exits 2 when someone needs to run actual login again, and 3 when the server can’t be reached, so an unattended run can check first and stop with a clear message. It needs Actual CLI 0.15.0 or later.

Tokens for headless callers

Two commands mint an Actual AI access token for a caller that has no browser: actual mint-token from a service-account key, and actual auth create-token from your own sign-in.
In Actual CLI v0.16.0, the CLI’s own signed-in commands read the sign-in that actual login stores, whichever token you mint. actual auth create-token suggests passing its token as ACTUAL_TOKEN, but no v0.16.0 command reads that variable.

Service-account tokens

actual mint-token needs no sign-in. It signs a short-lived assertion with a service-account private key whose public half is registered with Actual AI, and trades it for an access token through the RFC 7523 jwt-bearer grant:
A key file wins when both key variables are set, and no flag takes the key itself, which keeps it out of the process list and your shell history. An EC (P-256) key must be PKCS#8, the PEM that opens BEGIN PRIVATE KEY; convert one that opens BEGIN EC PRIVATE KEY with openssl pkcs8 -topk8 -nocrypt -in sec1.pem -out service-account.pk8.pem. RSA keys load in either encoding. --scope asks for part of the service account’s grant, and the server mints its full grant when you leave it out. The token is the only thing mint-token writes to standard output, so TOKEN=$(...) captures exactly the token; --json prints the full response, with its lifetime and granted scope, as one line instead. The signed assertion lives 60 seconds by default (--assertion-ttl-seconds, up to 300). In CI, mint once per job and mask the token before anything can log it:
Treat the private key as more sensitive than any token: a leaked token is revoked once, while a leaked key keeps minting tokens until its public half is replaced.

Personal access tokens

actual auth create-token is a prototype. The server endpoint it calls isn’t final, so its path and payload may change.
actual auth create-token mints a scoped personal access token from the sign-in actual login stored, so it needs that sign-in first:
--name labels the token and the agent that uses it, and --scopes takes a comma- or space-separated list. The token is printed once, on its own line on standard output, and then kept in your OS keychain. Where no keychain is available, set ACTUAL_TOKEN_PASSPHRASE and it’s kept in an encrypted file under the CLI’s config directory instead; ACTUAL_TOKEN_STORE picks the store (auto, the default, keyring or file).

Keep tokens away from the agent

  • One token per agent. Mint a separate token for each agent, named after it, so every action is attributable and you can revoke one token without touching the others. Never hand an agent your own sign-in.
  • The token never enters the model’s context. Keep it out of prompts, the conversation, shell history, command-line arguments and logs. An agent reads untrusted input, and an injected instruction can only send out a secret that’s in its context.