Skip to content

CLI reference

A complete, generated reference for every af command and flag, produced from the Cobra command tree. This page is regenerated by scripts/gen-docs.sh and verified in CI, so it never drifts from the binary — do not edit it by hand.

Run af <command> --help for the same information at the terminal. For a narrative, task-oriented tour of the CLI see the CLI guide.

Commands

af

Agent Factory - Manage multiple AI agents like Claude Code, Aider, Codex, Gemini, and Amp.

Run 'af' with no arguments to open the TUI. The subcommands below drive the same daemon non-interactively (af sessions, af tasks emit JSON).

The daemon also serves the web UI — the same sessions in a browser — at http://localhost:8443, which needs no token by default. See 'af daemon --help' for the web UI, the listener and its auth, and autostart; to drive a daemon on another machine, start with the remote guide: https://sachiniyer.github.io/agent-factory/remote-http-auth/

af [flags]

Subcommands

  • af accounts — Manage per-session agent credential directories
  • af agent-server — Run a headless single-workspace backend (not the web UI — that is 'af daemon')
  • af api — Show the daemon-hosted HTTP/JSON API catalog
  • af bug-report — Bundle logs, versions, tasks, and redacted state for a bug report
  • af completion — Generate the autocompletion script for the specified shell
  • af config — Read global or project-effective config and write global config
  • af daemon — Manage the background daemon: serves the web UI and schedules tasks
  • af debug — Print debug information like config paths
  • af doctor — Diagnose setup, daemon health, and leaked session resources
  • af hosts — Add, list, check and remove sandbox hosts
  • af keys — Show the effective TUI key bindings (defaults plus [keys] rebinds)
  • af projects — Manage projects and durable registrations
  • af proposal — Write proposals together with agents
  • af quota — Show usage-limit status for each agent CLI
  • af reset — Factory-reset Agent Factory: remove AF sessions, tasks, project registrations, worktrees, and state (keeps repos and config)
  • af sessions — Manage sessions
  • af target — Point this client at a remote daemon once
  • af tasks — Manage tasks
  • af token — Manage the daemon's bearer token for the direct-TCP API
  • af upgrade — Upgrade agent-factory to the latest release on the configured channel
  • af version — Print the version number of agent-factory

Flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
-p, --program string Program to run in new sessions (one of: claude, codex, aider, gemini, amp, opencode, devin)
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.
-v, --version version for af

af accounts

Manage per-session agent credential directories

Prepare the credential directories a session can later be scoped to.

An account is one of an agent's logged-in identities, held as a directory the agent CLI treats as its home. af never reads, stores, or forwards the credential itself — it decides which directory a session sees, and the agent's own login flow puts the material there.

add creates that directory and prints its path · login runs the agent's own login flow against it · list shows what is registered.

af accounts login codex work

That one command registers the account if needed, starts codex's own login in a tmux session scoped to it, hands you the terminal for the device-code step, and afterwards reports whether the account holds a credential — read from the agent's own credential file, by checking that it exists.

Every login af runs is browser-free. The pane is on the daemon's host, which is usually headless and remote, so the flow that fits is the device code: the CLI prints a URL and a code, you sign in from whatever device you are holding, and the CLI polls. af selects it per agent — see af accounts login --help.

You can still do it by hand, and af runs exactly these:

CODEX_HOME=$(af accounts add codex work) codex login --device-auth CLAUDE_CONFIG_DIR=$(af accounts add claude work) BROWSER=true claude auth login GEMINI_CLI_HOME=$(af accounts add gemini work) NO_BROWSER=true gemini

Those variables do not all have the same shape, and mixing them up is the easy mistake. CODEX_HOME and CLAUDE_CONFIG_DIR name the config directory itself. GEMINI_CLI_HOME is a HOME-like root: gemini appends .gemini/ to it, so the account directory af prints holds the credential at

/.gemini/oauth_creds.json or /.gemini/gemini-credentials.json. Point the variable at the printed directory, never at a .gemini path inside it.

Select an account for a session with:

af sessions create --account work

That both injects the account's directory and removes every other identity-bearing variable for the agent. The removal is what makes the selection real: an ambient ANTHROPIC_API_KEY or OPENAI_API_KEY outranks the config directory, so without it a session would authenticate as whoever that key belongs to while every visible signal reported the selected account.

Account-scoped sessions need tmux 3.2 or newer and run on the local backend, the docker backend, or an ssh session placed on a host in the global host list (--host ). On a listed host af syncs the session's account — its credential files, plus any files the operator lists in sandbox_agent_config — into that session's own directory on the host, never the remote user's global agent config, writes refreshes back, and removes it when the session is killed or archived. A default account (default_accounts) is applied the same way; on a target that is not a listed host it is not applied, and the session runs on the host's own credentials. An explicit --account on such a target is refused, naming the remedy. af refuses rather than falling back, because a fallback would run on the ambient account while reporting the one you asked for. Sessions on one host share its ssh user, so they can read each other's synced credentials.

sandbox and hook targets cannot be listed, so they refuse an explicit account. docker bind-MOUNTS the directory, so account writes land in your real account. An account is a writable agent home, so the agent writes refreshed authentication back into it. For sandbox and hook, af cannot establish that those writes come back, so a rotated token can be lost. If your provider rotates refresh tokens, losing it also invalidates the copy on this machine — so a feature meant to NARROW where an identity is used could break it.

By default af never switches accounts on its own. With limit_auto_resume enabled, an explicit limit_account_candidates list may opt an unpinned local or eligible listed-host SSH/sandbox session into switching after a usage limit. af skips registered candidates with a current limit observation, says which identity changed in the session, and waits normally when none is usable. Docker account-scoped creates remain supported, but automatic Docker replacement is disabled until af can durably identify and reap a crash-surviving container and freeze its complete provision plan. An explicit --account is a pin that automatic switching never overrides.

af accounts

Subcommands

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af accounts add

Register a credential directory for an agent account

Create the credential directory for an account and print its path.

This makes a place; it does not log in. Run the agent's own login flow against the printed directory to put credentials there.

Registration is idempotent — running it again on an existing account reports the same directory and preserves existing settings. Missing non-credential runtime settings may be seeded; notices explaining them are printed to stderr.

af accounts add <agent> <name> [flags]

Flags

Flag Type Description
--json Output the {data,error} JSON envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af accounts handoff

Inspect and reset the automatic account-handoff rails

Inspect and reset the durable rails the automatic account handoff keeps.

status shows the resolved mode, whether the daemon's engine is observing, the recorded halt, refusal backoffs, and the recent-move ledger the switch-loop rail and move credits count. reset clears the ONE record you name — halt, backoff, or moves — and nothing else, so clearing a halt can never silently take the loop history or a held report with it.

The rails live in the daemon host's af home; both verbs go through the daemon API. With --daemon-url (or AF_DAEMON_URL) they act on the targeted daemon.

af accounts handoff

Subcommands

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af accounts handoff reset

Clear one named automatic handoff record

Clear one durable rail record, and only the one named:

af accounts handoff reset halt clear the recorded mover halt af accounts handoff reset backoff [--session K] clear refusal backoffs af accounts handoff reset moves [--session K] clear recent-move entries

--session scopes backoff and moves to one stable session key (see af accounts handoff status); halt is mover-level and takes none. A reset that matches nothing reports so — it is not an error. The change lands through the daemon, on the daemon the command targets.

af accounts handoff reset <halt|backoff|moves> [flags]

Flags

Flag Type Description
--json Output the {data,error} JSON envelope
--session string Scope backoff/moves to one stable session key

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af accounts handoff status

Show the automatic account-handoff rails state

Show the durable rails the automatic account handoff keeps:

the resolved account_handoff.mode (absent table ≡ off ≡ no machinery), whether the daemon's engine is observing, the recorded mover halt, refusal backoffs, and the recent-move ledger — the records the switch-loop rail (max_moves inside max_moves_window) and the anti-pile-on move credits count.

The records are keyed by stable session identity, never by title; a live session's title is attached only as a label.

af accounts handoff status [flags]

Flags

Flag Type Description
--json Output the {data,error} JSON envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af accounts list

List registered agent accounts

List the registered accounts, for one agent or for every agent that supports account scoping.

An agent absent from this list is one whose credential relocation af has not verified, not one that is merely unconfigured — af reports unsupported rather than accepting a selection that would silently do nothing.

af accounts list [agent] [flags]

Flags

Flag Type Description
--json Output the {data,error} JSON envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af accounts login

Log in to an agent account by running the agent's own login flow

Run the agent's own login command against an account's credential directory.

af registers the account if it does not exist yet, asks the daemon to start the agent's login flow in a tmux session scoped to that account, and hands you the terminal so you can complete the device-code step. When the flow ends, af reports whether the account holds a credential — read from the agent's own credential file, by checking that it exists, never by reading it.

af accounts login codex work af accounts login claude personal

af never reads, stores, or forwards the credential. It sets one variable and runs the agent's own flow:

claude → claude auth login · codex → codex login --device-auth · gemini → gemini

The login is browser-free. The pane runs on the daemon's host, which is usually headless and remote, so a browser-callback sign-in there opens a browser nobody is sitting in front of, or waits for a redirect to that host's own localhost that your machine cannot reach. Every flow above prints a URL and waits for a code you paste back, and af selects that path per agent:

codex codex login --device-auth prints a verification URL and a device code gemini the pane sets NO_BROWSER=true · gemini prints the URL and prompts "Enter the authorization code: " claude claude has no such flag, so the pane sets BROWSER=true — a no-op opener the CLI honours — and claude prints "If the browser didn't open, visit:" with the URL, then "Paste code here if prompted > "

Sign in on whatever device you are actually holding, then paste the code into the pane.

The login pane gets exactly the environment an account-scoped session gets: the account's directory injected, and every other identity-bearing variable for that agent REMOVED. The removal is what makes the login land in the account you asked for — an ambient ANTHROPIC_API_KEY or OPENAI_API_KEY outranks the config directory, so without it the CLI could report success against that key's identity while the account directory stayed empty.

It removes identity, not environment: proxies, private CA roots and your git and SSH configuration are passed through as always. If the login needs something else — DISPLAY or BROWSER, on a host with a browser to open — add it to session_env_passthrough. Naming BROWSER or NO_BROWSER there also overrides the browser-free defaults above; your value wins.

The flow runs on the daemon's host, where the credential directory is. With --no-attach af prints the tmux session to attach to instead of taking your terminal.

af accounts login <agent> <name> [flags]

Flags

Flag Type Description
--json Output the {data,error} JSON envelope
--no-attach Start the login flow and print how to attach instead of taking this terminal

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af agent-server

Run a headless single-workspace backend (not the web UI — that is 'af daemon')

Run a headless agent-server for exactly one session's workspace, served over the same REST + WebSocket protocol the daemon speaks, behind a plain-HTTP listener that requires a bearer token on every request.

This does not start the web UI, and serves no frontend at all — opening its port in a browser returns a 404 saying so. If you want the browser app, run the daemon — any 'af' command starts it — and open http://localhost:8443. The web UI is bundled into the daemon and served from its network.listen_addr; agent-server is only the headless per-workspace backend that a daemon drives, and it exists to be consumed by a daemon rather than opened by a person.

This is the process that runs inside a docker container or on an ssh remote (#1592 Phase 4): a remote daemon dials the authed URL it exposes and drives the workspace exactly as it drives a local in-process session. Run it directly only to host one workspace as a backend for a daemon on another machine.

The listener always requires the token and serves plain HTTP (no TLS) — reach it over a private network or a tunnel (the docker/ssh runtimes forward a loopback port). Its token is mandatory for every peer, whatever the global network.require_token key says: that key governs only the daemon's own web listener. On startup it prints one JSON line to stdout carrying the bound address and the bearer token. On SIGINT/SIGTERM it tears the workspace down (kills tmux, removes the worktree) — durability of in-progress work is the driving daemon's job (push the branch before shutdown), not this server's.

af agent-server [flags]

Flags

Flag Type Description
--adopt-worktree string Bind this existing linked worktree instead of creating one (set by the provisioning daemon when it reattaches an archived workspace)
--branch string Exact git branch for the workspace's worktree (default: derived from branch_prefix and the title)
--listen string HTTP TCP bind address (host:port); :0 lets the kernel pick a free port (default 127.0.0.1:0)
--no-tmux-config Run every tmux invocation with -f /dev/null so the image's /etc/tmux.conf or a ~/.tmux.conf cannot pick programs or write session environment between af's env pins and the agent's exec
--policy-file string Operator policy file written by the provisioning daemon; when set, this server reads no config from the host's af home
--program string Agent program to run (default: the configured default_program)
--program-resolved Treat --program as an already-resolved runtime command
--repo string Repository path the workspace runs against (default: current directory)
--session-env stringSlice Additional exact environment variable name an agent may inherit (repeatable)
--session-env-empty stringSlice Environment variable name the pane's exec shim re-asserts defined immediately before the agent execs — defined-and-empty, or a resolved platform trust path for SSL_CERT_FILE/SSL_CERT_DIR (#7889) (repeatable; set by the provisioning daemon's credential-mount env pins)
--title string Session title for the workspace (required)

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af api

Show the daemon-hosted HTTP/JSON API catalog

Print the HTTP/JSON API the daemon exposes over a local Unix socket.

The daemon serves a small JSON API — a 1:1 mirror of the session and task operations the CLI performs — on a 0600 Unix socket (owner-only; there is no TCP port and no token). This command lists the resolved socket path and every endpoint with a ready-to-run curl example.

It is read-only and never contacts or starts the daemon; it just prints the catalog. Use --json for a machine-readable form wrapped in the shared {data,error} envelope. Full reference: docs/http-api.md.

af api [flags]

Flags

Flag Type Description
--json Emit the catalog as JSON wrapped in the {data,error} envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af bug-report

Bundle logs, versions, tasks, and redacted state for a bug report

Collect a single, shareable diagnostics bundle for triage:

  • the daemon log tail (bounded to the last ~2MiB / 5000 lines)
  • versions: af, Go, OS/arch, and the daemon's version snapshot
  • the configured tasks (redacted)
  • the session state from instances.json (redacted)
  • the daemon health snapshot (same no-spawn probe as af daemon status)
  • the global config file, if any (redacted)

By default the redacted bundle is written to a single text file (~/af-bug-report-.txt) and a pre-filled GitHub issue DRAFT is opened in your browser. The draft ALWAYS targets the agent-factory project (github.com/sachiniyer/agent-factory) — never whatever repo you happen to be in — because it reports a bug in af itself.

The draft body carries a bounded, redacted summary of the key diagnostics (versions, daemon status, counts, and the newest log lines) so the report is useful even as filed; the complete bundle is too large for a URL, so it stays on disk for you to attach. The draft is never submitted for you: review it, drag the bundle file onto the issue, and click Submit yourself. If neither gh nor a browser opener is available, the command falls back to just writing the bundle file and printing where it is so you can attach it to an issue by hand.

Use -o/--output or --file to skip GitHub and only write the bundle file.

REDACTION IS BEST-EFFORT. Free-text and secret-bearing fields (session titles, session prompts, task prompts, tab and session commands, tab names, account labels, remote metadata) are dropped. A registered account label is replaced by the same marker everywhere it appears — the session records, and the daemon log and config sections that name it as text — so the report is no less private through its log than through its records; if the accounts registry cannot be read, the bundle says so in its collection errors instead of looking redacted when it is not. Every directory the bundle names is replaced by the role it plays ([repo:N], [worktree:N], [af-home], ~) rather than by its own name, and your username by [user]; and known credential shapes are scrubbed wherever they appear. Perfect redaction is impossible — open the file and review it before sharing it publicly.

Use --json to emit the structured manifest (wrapped in the shared {data,error} envelope) to stdout instead of writing a file or opening a draft.

af bug-report [flags]

Flags

Flag Type Description
--file Only write the bundle file (to ~/af-bug-report-.txt); do not open a GitHub issue draft
--json Emit the structured manifest to stdout (in the {data,error} envelope) instead of writing a file or opening a draft
-o, --output string Write the bundle to this path and skip opening a GitHub draft (implies --file)

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af completion

Generate the autocompletion script for the specified shell

Generate the autocompletion script for af for the specified shell. See each sub-command's help for details on how to use the generated script.

af completion

Subcommands

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af completion bash

Generate the autocompletion script for bash

Generate the autocompletion script for the bash shell.

This script depends on the 'bash-completion' package. If it is not installed already, you can install it via your OS's package manager.

To load completions in your current shell session:

source <(af completion bash)

To load completions for every new session, execute once:

Linux:

af completion bash > /etc/bash_completion.d/af

macOS:

af completion bash > $(brew --prefix)/etc/bash_completion.d/af

You will need to start a new shell for this setup to take effect.

af completion bash

Flags

Flag Type Description
--no-descriptions disable completion descriptions

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af completion fish

Generate the autocompletion script for fish

Generate the autocompletion script for the fish shell.

To load completions in your current shell session:

af completion fish | source

To load completions for every new session, execute once:

af completion fish > ~/.config/fish/completions/af.fish

You will need to start a new shell for this setup to take effect.

af completion fish [flags]

Flags

Flag Type Description
--no-descriptions disable completion descriptions

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af completion powershell

Generate the autocompletion script for powershell

Generate the autocompletion script for powershell.

To load completions in your current shell session:

af completion powershell | Out-String | Invoke-Expression

To load completions for every new session, add the output of the above command to your powershell profile.

af completion powershell [flags]

Flags

Flag Type Description
--no-descriptions disable completion descriptions

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af completion zsh

Generate the autocompletion script for zsh

Generate the autocompletion script for the zsh shell.

If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once:

echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions in your current shell session:

source <(af completion zsh)

To load completions for every new session, execute once:

Linux:

af completion zsh > "${fpath[1]}/_af"

macOS:

af completion zsh > $(brew --prefix)/share/zsh/site-functions/_af

You will need to start a new shell for this setup to take effect.

af completion zsh [flags]

Flags

Flag Type Description
--no-descriptions disable completion descriptions

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af config

Read global or project-effective config and write global config

Read and write keys in the global config (~/.agent-factory/config.toml).

"get"/"list" print the effective config for the current repository, including its checked-in and personal per-project layers. Pass --repo to inspect another project. Outside a git repository they fall back to global defaults. --explain shows every candidate and why it did or did not supply the effective value.

"set"/"unset" write config in place so all comments and ordering are preserved. Without --project, set changes one settable global key and unset clears one migrated grouped/flat alias pair. With --project they edit that registered project's machine-local override instead (built-in < global < in-repo < personal project), which is never checked into the repository. "af config set" applies a change to a running daemon in place where the key allows it (#2480), so most take effect without a restart; a raw hand-edit of config.toml still applies on the next start.

af config

Subcommands

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af config get

Print one global or project-effective config value

Print the effective value of one config key (e.g. default_program, auto_update, update_channel). By default the current repository's legacy, checked-in, and personal layers participate; outside git, the command falls back to global defaults. Run "af config list" to see every key. Scalar values print bare; comma-list leaves (network.cors_allowed_origins, network.allowed_hosts, limit_account_candidates, account_handoff.exclude_sessions) print comma-joined in the form "af config set" accepts back; other composite values (program_overrides, root_agents, limit_patterns, keys) print as JSON. A comma-list leaf whose value the comma form cannot represent without loss — an element containing a comma, surrounding whitespace, or a control character, or an element the per-key leaf validator rejects (e.g. account_handoff.exclude_sessions titles containing brackets or quotes) — prints JSON instead. The restore path depends on the key: account_handoff.exclude_sessions has a whole-table setter ('af config set account_handoff {"exclude_sessions":["..."]}'); the other comma-list leaves (network.cors_allowed_origins, network.allowed_hosts, limit_account_candidates) have no whole-table setter, so a value their leaf setter rejects must be corrected by editing config.toml directly — there is no 'af config set' form that restores it.

Use --repo to inspect another project. The path is a selector only; this command does not register a project or write identity state. --project remains accepted as a deprecated alias. --explain prints the same resolved value with the complete source trace.

Local-only: it answers about the machine it runs on, so --daemon-url/AF_DAEMON_URL is refused rather than ignored. Run it on the daemon host to ask about that host.

af config get <key> [flags]

Flags

Flag Type Description
--explain Show every source candidate and why it did or did not supply the value
--json Emit the value(s) as JSON wrapped in the {data,error} envelope
--repo string Resolve config for this project instead of the current repository

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af config list

Print global or project-effective config values

Print every effective config key. By default the current repository's legacy, checked-in, and personal layers participate; outside git, the command falls back to global defaults. Pass --repo to inspect another project. --project remains accepted as a deprecated alias. --explain prints every source candidate and the reason it won, was shadowed, was absent, or is disallowed for that key. Human output renders an empty built-in value as "(unset)"; an explicitly configured empty value remains visible as "", [], {}, or null. JSON output preserves the typed effective values.

Local-only: it answers about the machine it runs on, so --daemon-url/AF_DAEMON_URL is refused rather than ignored. Run it on the daemon host to ask about that host.

af config list [flags]

Flags

Flag Type Description
--explain Show every source candidate and why it did or did not supply each value
--json Emit the value(s) as JSON wrapped in the {data,error} envelope
--repo string Resolve config for this project instead of the current repository

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af config migrate

Rewrite deprecated config keys to their current spelling

Rewrite the deprecated keys in the global config to their current spelling, in place, and print the diff. This is the command the deprecated-key warnings name.

It changes spelling, never meaning. A value written on one line is carried over exactly as its own bytes, quoting and all; a value spread over several lines (an array, typically) is re-encoded compactly rather than relocated as raw text, so its formatting can change even though its contents do not. Either way the rewritten file is re-parsed before anything is saved, and a rewrite that would change even one effective value is refused rather than written. The readers of the old spellings stay, so an older config keeps loading and nothing about your running configuration changes.

One thing to know before you DOWNGRADE. The grouped spellings have only been read since 2026-08-14 (#3354); an af older than that does not know them and falls back to the built-in default for a migrated key. For most keys that default is the conservative one (strict host-key checking, no credential mount). Two cases are not, both because the listener defaults to a LIVE 127.0.0.1:8443: migrating network.require_token = true loses the token an older binary could read (network.require_loopback_token only matters alongside it, being inert on its own), and migrating an empty network.listen_addr hides the fact that the web server was turned OFF, so an older binary starts one. Migrate compares what such a binary saw before and after, and says so explicitly when a migration costs you either. Restore the backup before such a downgrade.

The previous file is kept beside it as config.toml.bak (an existing backup is never overwritten; the copy is numbered instead). A legacy config.json is converted to config.toml on the way in, exactly as any af start would convert it.

Running it twice is safe: the second run finds nothing to migrate.

root_agents is migrated entry by entry, not as one key. Every entry whose path is already a registered project moves into that project's personal [root_agent]: the leaves the effective profile needs (an empty entry means enabled, plus an optional program) are written when the project's own profile does not already produce the identical result, and the legacy entry is dropped. The resolved profile is compared before and after, so a project that was enabled stays enabled and one that was disabled stays disabled. Entries for paths that are not registered projects are reported and left exactly where they are — registering a project is durable state this file's migration does not get to invent — and so is any entry that cannot be proven safe to move, with the cause named beside it.

One thing it will not do:

A key written in BOTH spellings with different values is refused, naming the key. af has a documented winner at load time — the grouped value — but no migration should make that tie-break permanent on your behalf.

Local-only: it rewrites the file on the machine it runs on, so --daemon-url/AF_DAEMON_URL is refused rather than ignored. Run it on the daemon host to migrate that host.

af config migrate [flags]

Flags

Flag Type Description
--json Emit the migration result wrapped in the {data,error} envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af config set

Set one global config key

Write one key into the global config.toml, editing only that value in place — preserving every unrelated comment, blank line, section header, and key ordering (the file is not regenerated). Every global config key is settable. Scalar values use their ordinary text form; tables and non-comma lists use compact JSON. Values are validated with the same rules the config loader uses before anything is written, so set can never leave a config that fails to load.

Settable keys: default_program agent enum (claude, codex, aider, gemini, amp, opencode, devin) appearance light | dark | system (TUI appearance; applies on next TUI launch) program_overrides compact JSON object of agent-to-command entries program_overrides. full command string for an agent default_accounts compact JSON object of agent-to-account entries default_accounts. registered account name a new session for that agent runs as session_env_passthrough compact JSON array of exact environment variable names sandbox_agent_config compact JSON array of agent:file entries (claude:settings.json, claude:CLAUDE.md, claude:.claude.json, codex:config.toml, codex:AGENTS.md) placed in a sandbox session's account scope root_agents compact JSON object keyed by repository path root_agent compact JSON object with enabled and optional program root_agent.enabled true | false root_agent.program full command string for the singleton root agent keys compact JSON object of TUI action-to-key rebinds web compact JSON object of browser-terminal display preferences web.terminal_font_size_phone number in [4, 32] — xterm font size at the phone breakpoint (default 6.5) web.terminal_font_size_desktop number in [4, 32] — xterm font size at desktop width (default 13) auto_update true | false network.listen_addr host:port serving the web UI + API, or "" to turn the web server off. warning: a non-loopback address (0.0.0.0, a LAN/Tailscale IP) with network.require_token off is refused by default — the daemon still starts and the unix socket still works, but the TCP listener stays unbound until network.require_token = true, a loopback address, or network.allow_unauthenticated_network = true lands. af serves plain HTTP, so front a routable listener with a TLS-terminating proxy or a private network. network.require_token true | false (default false: the web UI needs no token; set true to require one from network peers) network.require_loopback_token true | false (default false: also require the token from same-machine browsers; only has an effect with network.require_token = true) network.allow_unauthenticated_network true | false (default false: explicit opt-in that lets a non-loopback listen_addr bind with the token off — the full control API, DeliverPrompt included, is then served unauthenticated to anyone who can reach the address) network.preview_listen_addr host:port for a separate per-tab web-tab preview origin (and, on a loopback fixed port, a per-session VS Code editor origin), or "" to disable (default ""). Kept apart from network.listen_addr on purpose: it serves previews/editors only, never the control API. Same address grammar as network.listen_addr. network.editor_origin_ports port pool for per-session VS Code editor origins, e.g. "9100-9119" or "9100,9105-9107", or "" to disable (default ""). Each session's editor gets one loopback port, kept across restarts; expose the same ports behind your front door (tailscale serve --https=). Next daemon start. daemon_poll_interval Go duration (e.g. 1500ms or 30m), or legacy positive integer (ms) watcher_events_per_minute positive integer (per-task watch delivery cap; default 10; next daemon start) debug_pprof true | false (serve Go runtime profiles at GET /v1/debug/pprof/{profile}; default false, unix control socket only, never on the web address. A profile dumps live daemon memory — session titles, worktree paths, prompt text — so turn it off again. AF_DEBUG_PPROF=1 overrides it for one daemon process. Next daemon start.) log_max_size_mb positive integer log_max_backups non-negative integer branch_prefix string on_archive_command shell command run before a local worktree moves into the archive, or "" to disable move_cmd script run on the daemon host when moving a live session to a sandbox, or "" for none (global-only) worktree_root subdirectory | sibling projects_root absolute path on the daemon host where af projects add clones (default /projects) detach_keys string (e.g. ctrl-w) update_channel stable | preview upgrade_clear_unverifiable_artifacts true | false (let an upgrade set aside a staged binary whose owning agent-factory home af cannot read; default false) vscode_server_binary path to the binary a VS Code tab runs, or "" to detect one on PATH limit_auto_resume true | false limit_account_candidates comma-separated registered account names, or "" to disable account switching limit_retry_interval Go duration (e.g. 30m), or "" to never retry limit_patterns compact JSON object of agent-to-regex entries limit_patterns. usage-limit banner regex for an agent account_handoff compact JSON object of automatic account-handoff settings (shadow mode active; mode = "live" is rejected) account_handoff. one leaf: mode, include_pinned, target_order, confirm_wall, wall_percent, move_idle_at_percent, prefer_below_percent, probe_ttl, default_login, require_carry, exclude_sessions, max_moves, max_moves_window, refused_backoff, on_failure, report_to account_handoff.exclude_sessions comma-separated session titles to exclude from automatic handoff, or "" to clear — the whole list is replaced; elements cannot contain commas, brackets, or quotes (use the whole-table JSON form for titles containing those characters) global_agent_skills true | false docker.mount_agent_credentials true | false (let a docker session mount the operator's credential for that session's own agent, read-only) ssh.host_key_verification strict | accept-new | insecure (how the ssh backend verifies a remote host key; strict is the default) network.cors_allowed_origins comma-separated browser origins (scheme://host[:port]) allowed to call the API cross-origin, or "" to allow none — the whole list is replaced network.allowed_hosts comma-separated extra host names (no scheme or port) the web UI and API answer to, e.g. the name tailscale serve forwards, or "" for none — the whole list is replaced. localhost, loopback IPs and the listener's own address always work; any other Host is refused. sandbox.ssh the ssh command the sandbox backend runs to reach the sandbox host (global-only: af runs it on the daemon host) sandbox.binary daemon-local path to the af binary the sandbox/ssh backends stream to remote hosts, or "" to use the daemon's own binary or a release download (global-only) hosts compact JSON object of host name to {host,user,port,identity_file,workspace_root,host_key_verification,use_ssh_config} (global-only) default_host name of the listed host used when a session does not pick one (global-only)

Legacy CLI aliases listen_addr, preview_listen_addr, editor_origin_ports, require_token, require_loopback_token, allow_unauthenticated_network, cors_allowed_origins, allowed_hosts, docker_mount_agent_credentials, ssh_host_key_verification, sandbox_ssh, and sandbox_binary remain accepted and edit the same canonical grouped values.

Structured values must be shell-quoted so the JSON remains one argument. A write uses the same apply-on-save path as the TUI and web config panes (#2480). Most keys apply to the running daemon immediately; each successful set prints its exact effect notice.

With --project the value is written to a registered project's machine-local config instead of the global file, as a personal override that beats the checked-in in-repo value on this machine and is never committed. Only the preference keys the manifest admits per project are accepted there (default_program, program_overrides, program_overrides., default_accounts, default_accounts., root_agent, root_agent.enabled, root_agent.program, branch_prefix, on_archive_command, limit_account_candidates, account_handoff, account_handoff.); a global-only key is rejected with the location it actually belongs to. One caveat: a per-project branch_prefix is accepted and stored but ignored for now — the global prefix applies to every project until #4539 lands the real feature. Clear an override with 'af config unset --project '.

Examples: af config set default_program codex af config set auto_update false af config set appearance dark af config set session_env_passthrough '["HTTP_PROXY","NO_PROXY"]' af config set root_agent.enabled true --project . af config set root_agent.program "codex --profile work" --project . af config set keys '{"quit":"Q"}' af config set web.terminal_font_size_phone 8 af config set web.terminal_font_size_desktop 14 af config set program_overrides.claude "/usr/local/bin/claude --verbose" af config set default_program codex --project ~/work/myrepo af config set default_accounts.codex work --project ~/work/myrepo af config unset default_program --project ~/work/myrepo

With --daemon-url/AF_DAEMON_URL naming a remote daemon, the global write is sent to THAT daemon's admission-gated write — the same one the web config form posts to — and the success line names the daemon it landed on. It is never silently applied to this machine instead: a daemon too old to serve the route is refused, not written around. --project is the exception and stays local-only, because it writes a registered project's machine-local override file, which no remote daemon owns.

af config set <key> <value> [flags]

Flags

Flag Type Description
--json Emit the value(s) as JSON wrapped in the {data,error} envelope
--project string Write to this project's machine-local config instead of the global config (a prj_ id or a repository path)

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af config unset

Clear a config override or migrated global setting

Remove one key's personal override for a project so the value falls back to the lower layers again (built-in < global < in-repo). Clearing an override is deliberately different from setting a value equal to the lower layer, which is still a present, winning override.

With --project, unset targets a project's machine-local config (a prj_ id from 'af projects list', or a path inside a registered repository). Without --project, it clears one migrated global setting — a network.* key (listen_addr, preview_listen_addr, editor_origin_ports, require_token, require_loopback_token, allow_unauthenticated_network, cors_allowed_origins, allowed_hosts) or a backend key (docker.mount_agent_credentials, ssh.host_key_verification, sandbox.ssh, sandbox.binary). Their legacy flat CLI names are accepted aliases. Global unset removes both on-disk spellings together, so a conflicting legacy value cannot silently reappear. Every path edits only the target setting, preserves unknown keys and comments, and is a clean no-op when there is nothing to clear.

With --daemon-url/AF_DAEMON_URL naming a remote daemon, the global form is sent to THAT daemon's admission-gated write, like 'af config set'; a daemon too old to serve the route is refused rather than written around, so a remote unset never quietly clears a key on this machine instead. --project stays local-only — the override file it clears is this machine's.

af config unset <key> [flags]

Flags

Flag Type Description
--json Emit the value(s) as JSON wrapped in the {data,error} envelope
--project string The project whose override to clear (a prj_ id or a repository path)

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af config validate

Check that the global config parses and validates

Read the global config (~/.agent-factory/config.toml) exactly as af and the daemon do at startup and report whether it loads. It writes nothing and materializes nothing — a read-only check.

This is the companion to a raw hand-edit. "af config set" validates every scalar and structured key before it writes and so cannot leave a broken file. A manual edit bypasses that protection: exit 0 means no config defect was found, while a non-zero exit names what must be fixed before the next launch.

Local-only: it checks the config on the machine it runs on, so --daemon-url/AF_DAEMON_URL is refused rather than ignored. Run it on the daemon host to check that host.

af config validate [flags]

Flags

Flag Type Description
--json Emit the value(s) as JSON wrapped in the {data,error} envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af daemon

Manage the background daemon: serves the web UI and schedules tasks

The agent-factory daemon runs task cron schedules in-process, supervises watch-task scripts, monitors sessions, and serves the bundled web UI.

The web UI is part of the daemon — there is no separate web command — so it is served whenever the daemon is running. Running af starts one: the TUI reads session state through the daemon and spawns it if none is up, so simply opening af serves the web UI. Any enabled task starts one too. Only standalone commands that never talk to the daemon (such as 'af config list') leave it down.

With af running, open:

http://localhost:8443

It needs no token by default, so the page connects as soon as it loads. Set network.listen_addr to change the address (or to "" to turn the web server off). network.require_token = true demands a bearer token ('af token show') from network peers; on the default loopback listener same-host callers stay exempt, so the UI keeps opening with no login on this machine. Add network.require_loopback_token = true to require the token from localhost as well. Note that 'af agent-server' does not serve the web UI: it is the headless per-workspace backend a daemon drives on a remote machine.

Clients reach the daemon over a local Unix socket by default. To drive one from another machine, either ssh to that host and run 'af' there, or give network.listen_addr a routable address and point a client at it with the persistent --daemon-url and --token flags. A routable listener with the token off is REFUSED: with network.require_token = false anyone who can reach the address drives your agents, so af declines to bind it unless you opt in with network.allow_unauthenticated_network = true. Set network.require_token = true instead unless you trust the network (turn it on BEFORE moving the address — the write guard refuses the tokenless-network posture). That listener speaks plain HTTP either way, so put it behind a reverse proxy or a private network (Tailscale/VPN) if you need TLS. Full guide: https://sachiniyer.github.io/agent-factory/remote-http-auth/

Install the daemon as a user-level autostart unit (systemd user service on Linux, launchd agent on macOS) so tasks keep firing and the web UI stays up after reboots, even when af is never opened:

af daemon install
af daemon

Subcommands

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af daemon adopt

Hand a detached daemon back to the installed autostart unit

Reclaim supervision of the background daemon for the installed autostart unit.

When a daemon is running detached from its unit — an ad-hoc child a live af spawned, which the service manager can no longer restart — adopt stops that daemon and starts the installed unit in its place, then verifies the unit now owns the process answering the control socket. Live sessions keep running in tmux; the new supervised daemon re-adopts persisted session state on startup, exactly as 'af daemon restart' does.

It needs an installed unit that serves this home ('af daemon install'); with no such unit there is nothing to adopt the daemon into. If the installed unit already owns the running daemon, adopt reports that and changes nothing.

af daemon adopt [flags]

Flags

Flag Type Description
--force displace the running daemon even if af cannot confirm it is unsupervised (you assert it is yours to replace)

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af daemon install

Register the daemon to start automatically at login

af daemon install

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af daemon restart

Restart the running daemon without stopping live sessions

Restart the background daemon if one is running. Live sessions keep running in tmux; the new daemon re-adopts persisted session state on startup. If no daemon is running, this command exits successfully without starting one.

af daemon restart [flags]

Flags

Flag Type Description
--quiet Suppress output when no daemon is running

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af daemon status

Report daemon liveness, config freshness, and supervision

With --daemon-url (or AF_DAEMON_URL, or a saved target) this reads the TARGET's health route and reports whether it responds, its version, phase and boot identity — never this machine's sockets or autostart unit.

Print a read-only snapshot of the background daemon: whether it is responding on the control socket, the control and HTTP socket paths (and whether their files are present), the recorded and responding pids, whether the installed autostart unit owns that responding process, whether the config on disk matches what the daemon booted with, and whether the running binary was replaced.

It never contacts a paused daemon in a way that spawns one and never starts the daemon. Service-manager inspection is bounded and read-only. Use --json for a machine-readable form wrapped in the shared {data,error} envelope.

af daemon status [flags]

Flags

Flag Type Description
--json Emit the status as JSON wrapped in the {data,error} envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af daemon uninstall

Remove the daemon autostart unit

af daemon uninstall

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af debug

Print debug information like config paths

af debug

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af doctor

Diagnose setup, daemon health, and leaked session resources

Diagnose the local agent-factory environment.

For first-run setup checks, use:

af doctor --setup

The setup profile checks the prerequisites needed to create the first local session: AF home writability, config materialization and parsing, git and the current repo, git identity, tmux, configured agent commands, state/log storage, daemon health, and remote-hook setup when this repo configures it.

Without --setup, doctor runs the full maintenance sweep for problems that accumulate silently on a machine running agent-factory:

  • orphaned processes spawned by sessions that no longer exist
  • processes that escaped a live session's pane, or peg a CPU core for hours
  • af_ tmux sessions with no backing session record
  • abandoned agent-factory homes under the temp dir (leaked by tests/debug runs)
  • af daemons running a binary no install owns — one under the temp dir, or one whose file is gone from disk. A temp-dir binary is debris a test or debug run left behind; --fix stops it once it is old enough that no test run can still own it, and never when it serves this home or when which home it serves cannot be read. A missing binary is reported, not stopped: af upgrade replaces it in place, so every healthy daemon looks that way until it restarts
  • temp directories holding nothing but a daemon socket nobody answers on — the residue an abandoned daemon's bind left behind. --fix removes one with os.Remove rather than a recursive delete, so a directory that has gained anything since the scan fails instead of being swept up with it
  • directories af's own test harness left under the temp dir when a test run ended before its cleanup (af-test-home-, af-test-user-home-, af-tmux-pkg-, af-tmux-, ...). --fix removes one only when it holds nothing but that run's leftover harness content, has not changed for a week, and no live process has a file open in it, names it, or works inside it — entry by entry with os.Remove, never a recursive delete. Anything else in one is reported, and a tmux server still answering in one is named rather than stopped
  • daemon health: control socket, autostart unit, pid file, binary freshness
  • client/daemon version skew, and the ways a stale daemon survives an upgrade: a second daemon on this home, an autostart unit launching a different af binary than yours, several af installs at different versions, sockets left behind with no daemon answering, and an autostart unit that is installed but not actually supervising anything
  • remote-hook setup for the current repo: config completeness and launch_cmd/delete_cmd script presence/executability (skipped cleanly when no remote backend is configured)
  • pinned remote host-key directories under hook-hosts/ that no session owns. Hook names are one namespace for the whole machine, so this one spans every project rather than the current repo, and it runs whether or not this repo configures a remote backend. --fix removes a directory only on proof that no session owns it — live, archived, mid-kill and awaiting-teardown sessions all count — and removes nothing at all when any part of that inventory cannot be read
  • listed host readiness: one row per host in the global hosts list (ready, blocked by a prerequisite problem, unknown, or unreachable) when the daemon can complete the host check. Silent when no host is listed; a daemon that is not answering emits one aggregate warning instead of per-host rows and marks the check incomplete rather than a pass — the daemon runs the probe, doctor does not dial the host. The probe is the one thing a default run can write: under accept-new host-key verification its ssh can pin a newly learned key

The version-skew check exists because a skewed daemon fails quietly: it keeps answering while rejecting fields a newer client sends, which surfaces as "unknown field " and a hung UI rather than as an upgrade prompt.

Use --json to emit each check as {name, section, status, detail, remedy, actionable} in the shared {data,error} envelope for scripting. Branch on "actionable", not on the status or whether --fix supports the row. Actionable means doctor established a specific unhealthy condition and named a correction that must happen before the run is healthy. Some exact corrections are manual and remain actionable even though --fix does not perform them.

UNKNOWN observations stay visible as advisory warnings with inspection guidance, but they are not actionable: "inspect it and decide" is not a finding that the run is unhealthy. A CI step or health probe should fail on the command exit code: 1 means unresolved actionable issues remain or a check did not finish looking. Advisory warnings alone do not fail the run.

Rows can also carry INFO: a deliberate unknown — something visible but not comparable, like a root session the daemon adopted rather than launched, whose resolved runtime command therefore was never recorded. An INFO row is neither a problem nor an unfinished check; it appears in the report and in summary.info in --json output, and never contributes to the exit code.

A check that stops early — for example, the temp-home sweep hits a candidate budget on a machine with a very large temp dir — now exits 1 even if it found no unhealthy condition. The summary line ends with "INCOMPLETE" naming the checks that gave up, and summary.incomplete lists them in --json. The exit code already covers incomplete checks, so a plain-exit-code probe needs no extra JSON check. To distinguish the exit-1 cases, read summary.unresolved and summary.incomplete under data in the JSON envelope: exit status -eq 1 with unresolved == 0 means incomplete; unresolved > 0 means actionable issues remain (and summary.incomplete may also be non-empty).

High-volume findings are summarized by default so the actionable problem is visible first — process findings, abandoned temp homes, dead-socket directories, and test-harness directories, all of which run to hundreds or thousands on a busy machine. Use --verbose to show each item behind those summaries. A summary from a check that did not finish reads "at least N … a lower bound" in its own row, so its count is never mistaken for the total.

Read-only by default — apart from the listed-host probe, whose ssh can learn a host key under accept-new. With --fix, applies the safe remediations — killing orphans whose ancestry markers prove they came from a dead af session, removing stale temp homes, stopping daemons proven to be running a temp-dir binary, removing directories holding nothing but a dead daemon socket, and removing the test-harness directories described above — logging each action. Ambiguous cases are always reported rather than acted on, and remain advisory unless another check establishes a specific unhealthy condition.

Exits 1 when unresolved actionable issues remain or summary.incomplete is non-empty. Exits 0 when no actionable issues remain and no checks are incomplete (advisory warnings may still be present).

af doctor [flags]

Flags

Flag Type Description
--fix apply safe remediations (kill verified orphans and leaked daemons, remove stale temp homes and dead-socket dirs)
--json emit each check as JSON in the {data,error} envelope
--setup run the first-run setup profile (prerequisites, config, agent commands)
--verbose show per-process doctor findings instead of collapsed summaries

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af hosts

Add, list, check and remove sandbox hosts

Manage the global host list that sandbox sessions run on.

af hosts add box1 ubuntu@box1.tailnet.ts.net save the host, then check it af hosts check [box1] probe git, tmux and gh on the host af hosts list show the saved hosts af hosts remove box1 drop the host from the list

You own connectivity (a tailnet, a VPN, a key in your agent): af opens no tunnel and edits no ssh config. If the host cannot be reached or is missing a tool, the entry is still saved and the command says what to fix; rerun 'af hosts check'.

af hosts

Subcommands

Flags

Flag Type Description
--json Print the result as a JSON envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af hosts add

Save a host and check that it can run a session

Save as a sandbox host and probe it.

is [user@]host[:port] (an ssh:// URL works too), for example ubuntu@box1.tailnet.ts.net. The name is what 'af sessions create --host ' takes. The host is probed for git, tmux (3.2 or newer) and gh, and every missing tool is reported with its fix. The entry is kept either way; use --no-check to skip the probe.

af hosts add <name> <ssh-destination> [flags]

Flags

Flag Type Description
--default Make this the default host
--host-key-verification string strict | accept-new | insecure (default: the global ssh.host_key_verification)
--identity-file string Absolute path of the ssh key for this host
--no-check Save the host without probing it
--workspace-root string Absolute directory on the host under which each session's dir is created (default ~/.af-sessions)

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--json Print the result as a JSON envelope
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af hosts check

Probe a host (or every saved host) for what a session needs

Ask the daemon to probe a saved host for git, tmux (3.2 or newer) and gh, and record the answer so the host pickers show it. With no name every saved host is probed. Exits non-zero when a host is not ready or could not be reached.

af hosts check [name]

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--json Print the result as a JSON envelope
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af hosts list

Show the saved hosts

af hosts list

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--json Print the result as a JSON envelope
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af hosts remove

Drop a host from the list

Remove from the saved hosts. Sessions already running on it keep running: each one carries its own connection settings, so a tunnel re-dial or a daemon restart does not need the entry; new sessions can no longer pick it, and a live session's account handoff or limit failover is refused until the entry is restored. A host that is the default is refused unless you pass --clear-default.

af hosts remove <name> [flags]

Flags

Flag Type Description
--clear-default Also clear default_host when it names this host

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--json Print the result as a JSON envelope
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af keys

Show the effective TUI key bindings (defaults plus [keys] rebinds)

Show every TUI action with its effective key binding: the built-in default, or the rebind from the [keys] table in config.toml (#1026). Fixed bindings — structural keys config cannot touch — are listed last. Contextual pane actions such as pane_prev/pane_next are included; their default arrow keys apply only while a workspace pane has focus.

Every default key removed by a user rebind is named in SOURCE with its taker. The affected row keeps any remaining keys; when none remain, it shows an em dash instead. JSON appends the same key/taker pairs in suppressed_by.

Key values use config spellings you can paste into [keys]. With --json, bindings are wrapped in {data,error}; keys/default keep those spellings.

af keys [flags]

Flags

Flag Type Description
--json Wrap output in the {data,error} JSON envelope

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af projects

Manage projects and durable registrations

af projects

Subcommands

Flags

Flag Type Description
--json Wrap output in the {data,error} JSON envelope (default: bare payload)

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af projects add

Add a project: register a repo by path with a stable local identity

Add a project by registering a git checkout with a stable, machine-local identity, so it appears as an (initially sessionless) project you can create sessions into.

The path may be relative (including '.'), absolute, or start with ~. A relative path or '~' is resolved against YOUR shell's working directory before the request is sent — so 'af projects add .' registers the repo you are standing in. The daemon then walks to the checkout's canonical main-repo root and validates it is a git repository (an actionable error otherwise). Any directory inside a checkout resolves to that root. Registration is idempotent: adding a known checkout is a no-op success that returns its existing identity.

The returned project id survives an explicit rebind after the checkout moves. Two clones remain separate projects. Identity is anchored in an AF-home-scoped agent-factory/checkout-id- marker under the Git common directory, so one AF home's reset cannot remove another home's identity. No working-tree file is created, and adding a project does NOT start an always-on agent for it.

With --daemon-url (or AF_DAEMON_URL) the registration goes to that daemon and the path is a path ON ITS HOST, sent as typed: absolute or starting with ~, never relative.

Instead of a path, give a git URL (https://host/owner/repo, ssh://host/owner/repo or git@host:owner/repo) and the DAEMON clones it on its own host, with its own credentials (ssh keys, credential helper), under its projects_root (default /projects), then registers it. The URL is validated by the daemon: file://, local paths, option-like values and URLs with an embedded password are refused. Re-adding the same URL returns the existing project.

'register' is a deprecated alias for 'add'.

af projects add <path-or-git-url>

Aliases: register

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--json Wrap output in the {data,error} JSON envelope (default: bare payload)
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af projects color

Set the display color of a registered project

Set the display color of a registered project.

is a prj_ id or a path inside the project's checkout. is a hex color such as '#2f5fd8' or '2f5fd8'. Pass "" to clear the color.

The web client uses this color as its accent, fills the top bar with it, and paints the browser tab's favicon with it, so you can find the project's tab or window quickly.

Against a remote daemon (--daemon-url) is a prj_ id or an absolute checkout path on the daemon's host, resolved by that daemon's registry.

af projects color <project> <color>

Global flags

Flag Type Description
--daemon-url string Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.
--json Wrap output in the {data,error} JSON envelope (default: bare payload)
--token string Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.

af projects delete

Delete a project, archiving its restorable sessions

Delete a project for a git repository and remove its live sessions.

Every regular worktree session is archived (its tmux is torn down and its worktree moved to the archive dir, but its branch and uncommitted changes are preserved). The always-on root agent (if any) is stopped and its root-agent opt-in removed. In-place sessions (the root agent, 'af sessions create --here') are torn down instead of archived — their cleanup never touches your working tree or branch.

The durable project registration, if any, is removed so the project leaves the project list. Restoring an archived session makes its repository active again, but does not restore the durable registration or root-agent opt-in.

Your real git repository is never touched. To undo a mis-click, restore any archived session with 'af sessions restore '.</p> <p>[repo] is a path inside the repository to delete (default: the current repo). Deleting an unknown project is a clean no-op; deleting a registered project with no live sessions still removes its registration. Prints how many sessions were archived.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-40-1" name="__codelineno-40-1" href="#__codelineno-40-1"></a>af projects delete [repo] </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-projects-list">af projects list<a class="headerlink" href="#af-projects-list" title="Permanent link">¶</a></h2> <p>List registered projects</p> <p>List durable machine-local project bindings. With --daemon-url this is the targeted daemon's registry, not this machine's.</p> <p>path_exists reports only whether the last-known path is present. It does not claim that a new checkout at a reused path has the registered identity.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-41-1" name="__codelineno-41-1" href="#__codelineno-41-1"></a>af projects list </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-projects-rebind">af projects rebind<a class="headerlink" href="#af-projects-rebind" title="Permanent link">¶</a></h2> <p>Rebind a registered project after its checkout moves</p> <p>Rebind a stable project id to a new checkout path.</p> <p>The project id is preserved. Rebinding refuses to take a path already owned by another registered project.</p> <p>The path may be relative (including '.'), absolute, or start with ~. A relative path or '~' is resolved against YOUR shell's working directory before the request is sent — the daemon, which owns the registry write, then resolves the checkout it lands on.</p> <p>Against a remote daemon (--daemon-url) the path is on the daemon's host and is sent as typed (absolute or ~/…).</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-42-1" name="__codelineno-42-1" href="#__codelineno-42-1"></a>af projects rebind <project-id> <path> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal">af proposal<a class="headerlink" href="#af-proposal" title="Permanent link">¶</a></h2> <p>Write proposals together with agents</p> <p>A proposal is a folder of markdown docs that belongs to the project. The user and agent sessions edit the docs with their normal tools; af records each edit, and "af proposal changes" shows a session what others changed since it last looked.</p> <p>Commands that need a session use the calling af session, or --session <title>. The others follow the shared project contract: --repo names a project, otherwise the current directory's project is used.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-43-1" name="__codelineno-43-1" href="#__codelineno-43-1"></a>af proposal </code></pre></div> <p><strong>Subcommands</strong></p> <ul> <li><a href="#af-proposal-add-doc"><code>af proposal add-doc</code></a> — Add a doc to a proposal from a template, or blank</li> <li><a href="#af-proposal-attach"><code>af proposal attach</code></a> — Attach this session to a proposal and print the rules</li> <li><a href="#af-proposal-cat"><code>af proposal cat</code></a> — Print a doc of a proposal</li> <li><a href="#af-proposal-changes"><code>af proposal changes</code></a> — Print what others changed since this session's cursor, then move the cursor</li> <li><a href="#af-proposal-checkpoint"><code>af proposal checkpoint</code></a> — Commit this session's edits to its proposal and move its cursor</li> <li><a href="#af-proposal-detach"><code>af proposal detach</code></a> — Remove this session's proposal attachment and cursor</li> <li><a href="#af-proposal-list"><code>af proposal list</code></a> — List the project's proposals, newest edit first</li> <li><a href="#af-proposal-path"><code>af proposal path</code></a> — Print the absolute folder path of a proposal</li> <li><a href="#af-proposal-remove-doc"><code>af proposal remove-doc</code></a> — Remove a doc from a proposal; it stays in the proposal's history</li> <li><a href="#af-proposal-start"><code>af proposal start</code></a> — Create a proposal from templates, attach this session, and print the rules</li> <li><a href="#af-proposal-write"><code>af proposal write</code></a> — Replace a doc with stdin and commit it</li> </ul> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-add-doc">af proposal add-doc<a class="headerlink" href="#af-proposal-add-doc" title="Permanent link">¶</a></h2> <p>Add a doc to a proposal from a template, or blank</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-44-1" name="__codelineno-44-1" href="#__codelineno-44-1"></a>af proposal add-doc <slug> <name> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--session</code></td> <td><code>string</code></td> <td>Act for the session with this <code>title</code> instead of the calling session</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-attach">af proposal attach<a class="headerlink" href="#af-proposal-attach" title="Permanent link">¶</a></h2> <p>Attach this session to a proposal and print the rules</p> <p>Attach the session to an existing proposal and print the rules. A session holds one proposal at a time, so this detaches it from any other. With no slug, print the current proposal and the rules again. The session gets a Proposal tab when it has none, and "tab" names it.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-45-1" name="__codelineno-45-1" href="#__codelineno-45-1"></a>af proposal attach [<slug>] [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--session</code></td> <td><code>string</code></td> <td>Act for the session with this <code>title</code> instead of the calling session</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-cat">af proposal cat<a class="headerlink" href="#af-proposal-cat" title="Permanent link">¶</a></h2> <p>Print a doc of a proposal</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-46-1" name="__codelineno-46-1" href="#__codelineno-46-1"></a>af proposal cat <slug> <doc> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-changes">af proposal changes<a class="headerlink" href="#af-proposal-changes" title="Permanent link">¶</a></h2> <p>Print what others changed since this session's cursor, then move the cursor</p> <p>Print every edit to this session's proposal since its cursor that the session did not checkpoint itself — edits by the user, by other editors, and by other sessions — then move the cursor. An empty edits array means nobody else changed the proposal.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-47-1" name="__codelineno-47-1" href="#__codelineno-47-1"></a>af proposal changes [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--session</code></td> <td><code>string</code></td> <td>Act for the session with this <code>title</code> instead of the calling session</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-checkpoint">af proposal checkpoint<a class="headerlink" href="#af-proposal-checkpoint" title="Permanent link">¶</a></h2> <p>Commit this session's edits to its proposal and move its cursor</p> <p>Commit the uncommitted edits in this session's proposal as the session's own, so "af proposal changes" does not show them back to it. The cursor does not move past edits by others that changes has not shown yet; unseen counts them.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-48-1" name="__codelineno-48-1" href="#__codelineno-48-1"></a>af proposal checkpoint [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--session</code></td> <td><code>string</code></td> <td>Act for the session with this <code>title</code> instead of the calling session</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-detach">af proposal detach<a class="headerlink" href="#af-proposal-detach" title="Permanent link">¶</a></h2> <p>Remove this session's proposal attachment and cursor</p> <p>Remove the session's proposal attachment and cursor, and close its Proposal tab.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-49-1" name="__codelineno-49-1" href="#__codelineno-49-1"></a>af proposal detach [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--session</code></td> <td><code>string</code></td> <td>Act for the session with this <code>title</code> instead of the calling session</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-list">af proposal list<a class="headerlink" href="#af-proposal-list" title="Permanent link">¶</a></h2> <p>List the project's proposals, newest edit first</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-50-1" name="__codelineno-50-1" href="#__codelineno-50-1"></a>af proposal list </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-path">af proposal path<a class="headerlink" href="#af-proposal-path" title="Permanent link">¶</a></h2> <p>Print the absolute folder path of a proposal</p> <p>Print the absolute folder path of a proposal. With --daemon-url, the path is on the daemon host.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-51-1" name="__codelineno-51-1" href="#__codelineno-51-1"></a>af proposal path <slug> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-remove-doc">af proposal remove-doc<a class="headerlink" href="#af-proposal-remove-doc" title="Permanent link">¶</a></h2> <p>Remove a doc from a proposal; it stays in the proposal's history</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-52-1" name="__codelineno-52-1" href="#__codelineno-52-1"></a>af proposal remove-doc <slug> <doc> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--session</code></td> <td><code>string</code></td> <td>Act for the session with this <code>title</code> instead of the calling session</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-start">af proposal start<a class="headerlink" href="#af-proposal-start" title="Permanent link">¶</a></h2> <p>Create a proposal from templates, attach this session, and print the rules</p> <p>Create a proposal from templates, attach the session to it, and print the rules the agent follows. Fails when the slug exists. A slug is 1-63 lowercase letters, digits and dashes. A doc with no template starts blank; user templates in <AF_HOME>/templates/proposal/<name>.md override the built-in ones. The session gets a Proposal tab, and "tab" names it.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-53-1" name="__codelineno-53-1" href="#__codelineno-53-1"></a>af proposal start <slug> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--docs</code></td> <td><code>stringSlice</code></td> <td>Docs to create, comma-separated (default <code>[goals,technical,api,ui,steps,future]</code>)</td> </tr> <tr> <td><code>--session</code></td> <td><code>string</code></td> <td>Act for the session with this <code>title</code> instead of the calling session</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-proposal-write">af proposal write<a class="headerlink" href="#af-proposal-write" title="Permanent link">¶</a></h2> <p>Replace a doc with stdin and commit it</p> <p>Replace an existing doc with stdin and commit it: as this session's own edit inside an af session or with --session, otherwise as an external edit.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-54-1" name="__codelineno-54-1" href="#__codelineno-54-1"></a>af proposal write <slug> <doc> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--session</code></td> <td><code>string</code></td> <td>Act for the session with this <code>title</code> instead of the calling session</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-quota">af quota<a class="headerlink" href="#af-quota" title="Permanent link">¶</a></h2> <p>Show usage-limit status for each agent CLI</p> <p>Show what af knows about each agent CLI's usage limits.</p> <p>Two different things, kept apart on purpose:</p> <p>QUOTA what the provider reports about the account's ceiling. af has no quota API for any supported agent today, so every row reads "not reported". That is af declining to guess, not a ceiling of zero.</p> <p>OBSERVED what af has seen in its OWN sessions — a session parked at a usage wall, and the reset time recorded with it. Real signal even where the provider exposes nothing.</p> <p>With [account_handoff] mode enabled (or a state file its machinery left), a second section lists each registered account's recorded usage windows — evidence af read out of the account's own rollout files, still never a provider claim — and a mover: line reports the configured mode plus any halt the engine recorded.</p> <p>Read-only: it reads session records and starts nothing. With --daemon-url (or AF_DAEMON_URL) the report comes from the targeted daemon's host — the daemon serves the same records read, so the answer describes that machine, not yours.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-55-1" name="__codelineno-55-1" href="#__codelineno-55-1"></a>af quota </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-reset">af reset<a class="headerlink" href="#af-reset" title="Permanent link">¶</a></h2> <p>Factory-reset Agent Factory: remove AF sessions, tasks, project registrations, worktrees, and state (keeps repos and config)</p> <p>Factory-reset Agent Factory.</p> <p>Removes every AF-created resource — all sessions (live and archived), all scheduled cron/watch tasks, registered-project bindings and their reachable checkout identity markers for this AF home, all AF worktrees, the AF session branches AF created, and all stored state — returning AF to a clean slate.</p> <p>Stops every af daemon running for this AF home — the managed one and any orphan left behind by an upgrade or a source build — and removes the daemon sockets, so a stale daemon or socket cannot serve the next af you start. Only daemons owned by you AND using this AGENT_FACTORY_HOME are stopped, and the autostart unit is only paused when it serves this AGENT_FACTORY_HOME; a daemon or unit for a different AF home is never touched.</p> <p>KEEPS your real git repositories (working tree, .git, and your own branches), and KEEPS the daemon configuration (config.toml: network.listen_addr, defaults, root_agents, update_channel, and per-repo config). After the wipe the supervised daemon restarts with empty session/task state and the same config; root_agents in config re-register, which is intended.</p> <p>This is IRREVERSIBLE. You will be asked to type WIPE to confirm. Pass --yes (or --force) to skip the prompt for scripted use; when stdin is not a terminal the prompt is skipped automatically so existing scripted callers do not hang.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-56-1" name="__codelineno-56-1" href="#__codelineno-56-1"></a>af reset [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--force</code></td> <td></td> <td>Alias for --yes: skip the typed WIPE confirmation</td> </tr> <tr> <td><code>-y</code>, <code>--yes</code></td> <td></td> <td>Skip the typed WIPE confirmation (for non-interactive/scripted use)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions">af sessions<a class="headerlink" href="#af-sessions" title="Permanent link">¶</a></h2> <p>Manage sessions</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-57-1" name="__codelineno-57-1" href="#__codelineno-57-1"></a>af sessions </code></pre></div> <p><strong>Subcommands</strong></p> <ul> <li><a href="#af-sessions-archive"><code>af sessions archive</code></a> — Finish with a session by archiving it for later restore</li> <li><a href="#af-sessions-attach"><code>af sessions attach</code></a> — Attach to a session's terminal</li> <li><a href="#af-sessions-attention"><code>af sessions attention</code></a> — Ask the user for attention, or clear the request</li> <li><a href="#af-sessions-backends"><code>af sessions backends</code></a> — List the runtimes this project can create sessions on</li> <li><a href="#af-sessions-create"><code>af sessions create</code></a> — Create a new session</li> <li><a href="#af-sessions-get"><code>af sessions get</code></a> — Get a session by title</li> <li><a href="#af-sessions-handoff"><code>af sessions handoff</code></a> — Continue a session under a different agent, in place</li> <li><a href="#af-sessions-kill"><code>af sessions kill</code></a> — Permanently delete a session and af-owned resources</li> <li><a href="#af-sessions-list"><code>af sessions list</code></a> — List sessions in the current project</li> <li><a href="#af-sessions-preview"><code>af sessions preview</code></a> — Preview a session's terminal content</li> <li><a href="#af-sessions-prune"><code>af sessions prune</code></a> — List (or with --apply, delete) old archived worktrees</li> <li><a href="#af-sessions-restore"><code>af sessions restore</code></a> — Restore an archived, lost, or dead session</li> <li><a href="#af-sessions-retry-limit"><code>af sessions retry-limit</code></a> — Retry a usage-limit resume or inspected handoff</li> <li><a href="#af-sessions-send-prompt"><code>af sessions send-prompt</code></a> — Send a prompt to a session (or broadcast to all with --all)</li> <li><a href="#af-sessions-set-conversation"><code>af sessions set-conversation</code></a> — Record a session's provider conversation id</li> <li><a href="#af-sessions-tab-create"><code>af sessions tab-create</code></a> — Spawn a shell, process, web, VS Code, or docs tab in a session</li> <li><a href="#af-sessions-tab-delete"><code>af sessions tab-delete</code></a> — Delete a single tab from a session</li> <li><a href="#af-sessions-tab-rename"><code>af sessions tab-rename</code></a> — Rename a tab of a session</li> <li><a href="#af-sessions-tab-reorder"><code>af sessions tab-reorder</code></a> — Move a tab within a session's tab order</li> <li><a href="#af-sessions-tabs"><code>af sessions tabs</code></a> — Manage a session's tabs (create/delete/rename/reorder)</li> <li><a href="#af-sessions-watch"><code>af sessions watch</code></a> — Wait for idle, or a fleet stop-state change or disappearance</li> <li><a href="#af-sessions-whoami"><code>af sessions whoami</code></a> — Identify the current Agent Factory session</li> </ul> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-archive">af sessions archive<a class="headerlink" href="#af-sessions-archive" title="Permanent link">¶</a></h2> <p>Finish with a session by archiving it for later restore</p> <p>Archive keeps a session restorable. Locally, stop its terminals and move its owned git worktree to the global archive directory (<AGENT_FACTORY_HOME>/archived/<repoID>/<title>/), preserving the branch and any uncommitted changes. The session is not deleted — it becomes a quiescent "archived" row that survives restarts and can be brought back later with 'af sessions restore <title>'. Shell and process tabs are not restored — restore brings back the agent tab and any web or VS Code tabs.</p> <p>Archive is refused while any enabled task targets the session. The error names every blocking task; disable or retarget them, then archive again. Agent Factory never silently restores the target or disables its automation as a side effect. While a session is archiving or archived, task writes that would newly enable it as a target are likewise refused until the session is restored.</p> <p>With --self, archive the current session (resolved via whoami) instead of a named one — use it from inside a session when your work is done. --self and a <title> argument are mutually exclusive.</p> <p>An ssh or sandbox session publishes nothing by default: the agent stops and the workspace stays on its host, owned by the archived row, and the output names where (archived_workspace). Pass --push to push the branch to origin first; docker and hook sessions always push. Restoring a session archived without a push reattaches that workspace — the tree, index and ignored files come back exactly as archived and the agent resumes its conversation; nothing is cloned, pushed or re-hooked. A session run under a synced account starts a fresh conversation on that restore instead, since that account directory is removed on archive. If the host proves the workspace gone, restore re-provisions onto the recorded branch or fails. In-place (--here) sessions cannot be archived because af does not own their worktree. Local archives print the relocated worktree path on success.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-58-1" name="__codelineno-58-1" href="#__codelineno-58-1"></a>af sessions archive [title] [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--push</code></td> <td></td> <td>Push an ssh/sandbox session's branch to origin before archiving. Without it nothing is published: the agent stops and the workspace stays on its host (docker and hook sessions always push)</td> </tr> <tr> <td><code>--self</code></td> <td></td> <td>Archive the current session (resolved via whoami); use from inside a session when your work is done</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-attach">af sessions attach<a class="headerlink" href="#af-sessions-attach" title="Permanent link">¶</a></h2> <p>Attach to a session's terminal</p> <p>Attach to a running session's tmux terminal. Detach with the configured detach key (default: ctrl+w).</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-59-1" name="__codelineno-59-1" href="#__codelineno-59-1"></a>af sessions attach <title> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-attention">af sessions attention<a class="headerlink" href="#af-sessions-attention" title="Permanent link">¶</a></h2> <p>Ask the user for attention, or clear the request</p> <p>Mark a session as needing the user. The web rail shows a blinking yellow dot on the row, and the reason in the row tooltip.</p> <p>Agents run this with --self only when they are blocked on a decision or question that only the user can answer, as the last step before they stop. They do not run it when a task has simply finished.</p> <p>The request clears when the user submits a line in the agent pane, dismisses it from the session header in the web UI, or when the agent starts work again after it went idle. --clear removes it now.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-60-1" name="__codelineno-60-1" href="#__codelineno-60-1"></a>af sessions attention [<title>] [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--clear</code></td> <td></td> <td>Remove the attention request</td> </tr> <tr> <td><code>--reason</code></td> <td><code>string</code></td> <td>Short note that tells the user what you need</td> </tr> <tr> <td><code>--self</code></td> <td></td> <td>Target the current session (resolved via whoami)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-backends">af sessions backends<a class="headerlink" href="#af-sessions-backends" title="Permanent link">¶</a></h2> <p>List the runtimes this project can create sessions on</p> <p>Report which backends 'af sessions create --backend' accepts for this project, whether each one is usable as the project is configured right now, and which backend a create with no --backend resolves to.</p> <p>--backend names the enum, but knowing that "docker" is spelled correctly is not the same as knowing this project can use it. The daemon checks each backend's preconditions against the project's config and answers one of three things:</p> <p>available every precondition that can be checked was checked and passed unavailable a precondition FAILED — a create would fail; "reason" says what to fix unknown the preconditions could NOT be evaluated (e.g. the project's config would not parse) — neither yes nor no is honest, so "reason" says what stopped the check</p> <p>"unknown" is deliberately not folded into either of the other two: reporting an unchecked backend as available is a promise nobody verified.</p> <p>"default" is the backend a create with no --backend resolves to here. It is EMPTY when the project's 'backend' config key names something unrecognized, or its effective configuration cannot be resolved — such a create fails rather than quietly running local, and "default_reason" names the cause.</p> <p>The reasons are the same text a create prints when it refuses, because both come from the same precondition checks.</p> <p>An available backend may also carry "callback_unavailable_reason": a create on it succeeds but the session gets no af callback, because the daemon cannot mint a credential while its dedicated sandbox callback endpoint is not running. It is advisory, not a precondition — the session still works, it just cannot call back into af.</p> <p>Example: af sessions backends af sessions backends --repo ~/src/myproject</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-61-1" name="__codelineno-61-1" href="#__codelineno-61-1"></a>af sessions backends </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-create">af sessions create<a class="headerlink" href="#af-sessions-create" title="Permanent link">¶</a></h2> <p>Create a new session</p> <p>Create a new session running an agent in its own git worktree.</p> <p>With --prompt, unconfirmed or incomplete delivery adds a warning field to the JSON session result. Outside --json mode, it also prints the warning on stderr. The session remains created; inspect its pane before retrying, since an unverified prompt may already have run. Creation still exits successfully and does not automatically resend.</p> <p>With --here (alias --in-place) the session instead attaches to the repo's existing working tree at its current branch: no worktree or branch is created, the agent runs in the repo root, and killing the session never removes the working tree or branch. Requires running inside a git repository (or --repo pointing at one).</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-62-1" name="__codelineno-62-1" href="#__codelineno-62-1"></a>af sessions create [title] [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--account</code></td> <td><code>string</code></td> <td>Credential account <code>name</code> to run the agent as (register it with af accounts add; defaults to this project's default_accounts entry for the agent, else the ambient identity)</td> </tr> <tr> <td><code>--backend</code></td> <td><code>string</code></td> <td>Runtime to run the session on (one of: local, docker, ssh, sandbox, hook; defaults to the repo's backend config, or local). docker runs the session in a container (set docker.image in the repo config); ssh runs it on a remote host (set ssh.host in the repo config). Run "af sessions backends" for which of these this project can actually use, and why not</td> </tr> <tr> <td><code>--here</code></td> <td></td> <td>Run in the repo's existing working tree at its current branch (no new worktree/branch; kill preserves both)</td> </tr> <tr> <td><code>--host</code></td> <td><code>string</code></td> <td>Listed host to run the session on, by name from the global host list (af config set hosts …); implies --backend ssh. Run "af sessions backends" to see each host and whether it is usable</td> </tr> <tr> <td><code>--in-place</code></td> <td></td> <td>Alias for --here</td> </tr> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Session title (alternative to positional <title>)</td> </tr> <tr> <td><code>--program</code></td> <td><code>string</code></td> <td>Program to run (one of: claude, codex, aider, gemini, amp, opencode, devin; defaults to config default)</td> </tr> <tr> <td><code>--prompt</code></td> <td><code>string</code></td> <td>Initial prompt to send</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-get">af sessions get<a class="headerlink" href="#af-sessions-get" title="Permanent link">¶</a></h2> <p>Get a session by title</p> <p>Titles are unique within a project, not across projects, so the same name can exist in several repos. The title resolves inside the repo given by --repo, or the current directory's repo when --repo is omitted.</p> <p>With no repo context, a title held by exactly one session still resolves; one held by sessions in several projects is ambiguous and reports an error naming those projects instead of guessing between them. A title no project holds reports that no project holds it, with the ways to scope the lookup. A miss inside a project names that project, and whether --repo or the current directory chose it.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-63-1" name="__codelineno-63-1" href="#__codelineno-63-1"></a>af sessions get <title> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-handoff">af sessions handoff<a class="headerlink" href="#af-sessions-handoff" title="Permanent link">¶</a></h2> <p>Continue a session under a different agent, in place</p> <p>Hand a session's work over to another agent or account without losing it.</p> <p>Use --account to choose a registered account. Omit --to to keep the same agent and stored prompt, or combine both flags to change agent and account. A manual handoff moves an explicit account pin; automatic rotation still respects it. Targets with current usage-limit evidence are refused on a local session; an off-box account rotation does not re-check the ledger.</p> <p>An account belongs to one agent, so a scoped session that changes agents must name the incoming agent's account with --account — unless the target has no account support at all, which drops the scope instead and reports it on from_account. What decides capability is the command the target resolves to, not the enum: program_overrides can make aider launch codex (a codex account is then required) or codex launch something unscopable (the scope is dropped). A resolved command af cannot classify as an agent at all — a wrapper like "npx codex" may launch an account-capable agent underneath — refuses rather than drop the pin on an unproven answer. The drop is one-way: handing back to an account-capable agent later does not restore it, so name the account again with --account. Dropping the scope restarts only the agent pane, so a session with shell, process, or VS Code sibling tabs is refused until those tabs are closed — they would keep running under the dropped account's environment.</p> <p>The session keeps its identity, its git worktree, and its branch — only the agent process changes. A different agent starts a fresh conversation and is given a mission brief: the session's goal, and what is already on the branch.</p> <p>A same-agent account handoff (--account alone, or --to naming the current agent) keeps the conversation for claude and codex on a local worktree: af copies the transcript into the new account's home and resumes it. If that copy cannot be made, the new account starts a fresh conversation, and its brief says why. An off-box (listed-host sandbox) account swap cannot reach the previous account's transcript and always starts a fresh conversation with a notice saying why.</p> <p>The output's conversation object reports the same outcome to the caller: carried=true when the transcript was copied and resumed, or carried=false with carry_failure naming why the replacement starts fresh — a copy that could not be made, a sandbox store af cannot reach, or a different program that cannot read its predecessor's transcript. A completed handoff's ledger entry keeps the same answer under 'af sessions get'.</p> <p>This is the answer to an agent that has stopped and cannot continue — most often one blocked at its provider's usage limit, where the alternative is waiting for the window to reset (see 'af sessions list' for a [limit] badge, and docs/usage-limits.md for the waiting path).</p> <p>Agent conversations are not portable between providers: after a cross-agent handoff the incoming agent cannot read what its predecessor was thinking, only the working tree and the git history. The brief points it at both. Because of that, a handoff is recorded — the swap and the branch tip at the moment it happened — so a reviewer reading the resulting diff can tell which agent wrote which part. An off-box account rotation is the exception: it updates the session's account and runtime metadata only, with no handoff record and no recorded branch tip.</p> <p>Local-worktree sessions, ssh/sandbox sessions whose agent-server advertises agent-swap, and an already account-scoped listed-host ssh/sandbox session whose agent-server advertises account-swap (same-agent --account only, rotating its existing scope) can be handed off in place: the sandbox's agent-server swaps the agent in the same workspace and resolves the new agent's program on its own host. A cross-agent --to on an account-scoped sandbox session, and any handoff on docker or hook sessions, cannot be handed off yet.</p> <p>Examples: af sessions handoff fix-auth --account personal af sessions handoff fix-auth --to claude af sessions handoff fix-auth --to gemini --brief "finish the retry test, skip the docs"</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-64-1" name="__codelineno-64-1" href="#__codelineno-64-1"></a>af sessions handoff <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--account</code></td> <td><code>string</code></td> <td>Registered target account; omit --to to keep the same agent</td> </tr> <tr> <td><code>--brief</code></td> <td><code>string</code></td> <td>Mission for the incoming agent, replacing the session's stored prompt</td> </tr> <tr> <td><code>--to</code></td> <td><code>string</code></td> <td>Agent to hand the session off to (one of claude, codex, aider, gemini, amp, opencode, devin)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-kill">af sessions kill<a class="headerlink" href="#af-sessions-kill" title="Permanent link">¶</a></h2> <p>Permanently delete a session and af-owned resources</p> <p>Permanently delete the session record and stop its terminals. Remove only worktrees and branches owned by af; user-owned resources stay.</p> <p>For normal "done with this session" cleanup, prefer: af sessions archive <title></p> <p>Deletion is permanent. Uncommitted or unmerged work in af-owned resources may be lost. Archive instead to keep the session restorable. --force is accepted but has no effect (kept for backward compatibility).</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-65-1" name="__codelineno-65-1" href="#__codelineno-65-1"></a>af sessions kill <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--force</code></td> <td></td> <td>Deprecated no-op, accepted for compatibility: kill always destroys the session (use 'af sessions archive' to keep it restorable)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-list">af sessions list<a class="headerlink" href="#af-sessions-list" title="Permanent link">¶</a></h2> <p>List sessions in the current project</p> <p>List sessions in the current project.</p> <p>Scope follows the shared project-context contract: --repo names a project, otherwise the current directory's project is used, and --all spans every project. Run from outside a git repository with no --repo, there is no project context and every project's sessions are listed — one stderr line says so, so an empty list cannot be misread as an empty fleet. An empty list scoped by the current directory likewise prints one stderr line naming that project. Under --json neither line is printed. Lifecycle, age, and limit filters compose and are applied by the daemon before transfer. With no filter flags, the complete list and its existing order are unchanged.</p> <p>Every row names its own integers. liveness_name is the one --status matches, and it round-trips exactly; status_name only names the legacy status integer and is not a filter value. tabs[].kind_name uses the tab_kinds[].kind words.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-66-1" name="__codelineno-66-1" href="#__codelineno-66-1"></a>af sessions list [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--all</code></td> <td></td> <td>List sessions across every project instead of only the current one</td> </tr> <tr> <td><code>--limit</code></td> <td><code>int</code></td> <td>Return at most N sessions after filtering (must be greater than 0 when set; omitted is unbounded) (default <code>0</code>)</td> </tr> <tr> <td><code>--live</code></td> <td></td> <td>Exclude archived sessions</td> </tr> <tr> <td><code>--max-age</code></td> <td><code>duration</code></td> <td>Only list sessions created within this duration (for example 24h or 7d) (default <code>0s</code>)</td> </tr> <tr> <td><code>--status</code></td> <td><code>stringArray</code></td> <td>Filter by lifecycle status; repeat for more than one (running, ready, lost, dead, archived, limit-reached). Matches each row's liveness_name; status_name names the legacy status integer and is not a filter value</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-preview">af sessions preview<a class="headerlink" href="#af-sessions-preview" title="Permanent link">¶</a></h2> <p>Preview a session's terminal content</p> <p>Titles are unique within a project, not across projects, so the same name can exist in several repos. The title resolves inside the repo given by --repo, or the current directory's repo when --repo is omitted.</p> <p>With no repo context, a title held by exactly one session still resolves; one held by sessions in several projects is ambiguous and reports an error naming those projects instead of guessing between them.</p> <p>By default this captures the session's AGENT tab (slot 0), visible screen only. Address another tab with --tab-name (the tab name "af sessions tab-create" printed, as reported by "af sessions get" — not the TUI's "Agent"/"Terminal" label), --tab-id (the stable id, for scripts that must not follow a reused name), or --tab (the 0-based slot). They resolve in that precedence — id, then name, then slot — the same order every tab verb uses. An id or name that does not resolve is an error, never a silent fall back to a slot: that would capture whatever tab had shifted into it.</p> <p>--full returns the entire scrollback instead of the visible screen. The default capture is the VISIBLE SCREEN, so for a pane that has scrolled it omits whatever is above — the output says so ("partial" in the JSON, a note on stderr) and names how many lines were left out, because a partial capture that looks complete is how a working session gets read as a wedged one (#3169).</p> <p>--plain strips ANSI escape sequences from the captured content, for callers that parse it rather than render it.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-67-1" name="__codelineno-67-1" href="#__codelineno-67-1"></a>af sessions preview <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--full</code></td> <td></td> <td>Capture the entire scrollback instead of the visible screen</td> </tr> <tr> <td><code>--plain</code></td> <td></td> <td>Strip ANSI escape sequences from the captured content</td> </tr> <tr> <td><code>--tab</code></td> <td><code>int</code></td> <td>Tab slot to capture, 0-based as the tab bar reads left to right (slot 0 is the agent tab) (default <code>0</code>)</td> </tr> <tr> <td><code>--tab-id</code></td> <td><code>string</code></td> <td>Stable id of the tab to capture (#1738); wins over --tab-name and --tab</td> </tr> <tr> <td><code>--tab-name</code></td> <td><code>string</code></td> <td>Name of the tab to capture, as reported by "af sessions get" (not the TUI's "Agent"/"Terminal" label); wins over --tab</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-prune">af sessions prune<a class="headerlink" href="#af-sessions-prune" title="Permanent link">¶</a></h2> <p>List (or with --apply, delete) old archived worktrees</p> <p>Report archived sessions older than --older-than, measured from each session's archive time.</p> <p>Without --apply this is a dry run: it lists each archived session a reclaim would remove (title, archive time, allocated bytes) plus a total, and the reasons every other session was skipped. af writes nothing — no deletion, no record update, no git mutation — so it is safe to run at any time.</p> <p>With --apply, af prints that plan, asks you to confirm it (or pass --yes; a non-interactive run requires it), and then deletes exactly the worktrees the plan listed — the SAME judgment as the dry run, re-made under each session's lock just before it deletes. The branch is always kept and the session row stays, marked pruned, naming the branch; restore refuses a pruned session and tells you where the work is. A refusal names the first offending paths so you can clean up and re-run. Nothing outside the archived worktree is touched: provider transcripts and other sessions' registrations are left alone.</p> <p>Only archived sessions are eligible; live, lost, dead or in-flight sessions, archives whose move is incomplete, and worktrees still holding uncommitted or ignored files are skipped with their reasons. A session whose origin repository is gone is refused too: the archived tree may be the work's last copy, so it is reported, not counted reclaimable.</p> <p>Bytes are ALLOCATED disk space, not apparent file size — sparse holes and hard links whose other end lives outside the tree are not counted. It is an upper bound on what a reclaim frees: extents shared with a copy-on-write reflink clone outside the tree are still counted, so on Btrfs/XFS the free space recovered can be less than the total.</p> <p>The listing reads the running daemon's in-flight claims and will not spawn one — a read must not write even a socket or a log. With no daemon up it refuses with guidance; pass --daemon-url or start af first.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-68-1" name="__codelineno-68-1" href="#__codelineno-68-1"></a>af sessions prune --older-than <duration> [--repo <path> | --all] [--apply [--yes]] [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--all</code></td> <td></td> <td>Span every project instead of only the current/--repo one</td> </tr> <tr> <td><code>--apply</code></td> <td></td> <td>Delete the archived worktrees the dry run lists (the branch is kept; the row stays as a pruned tombstone)</td> </tr> <tr> <td><code>--older-than</code></td> <td><code>string</code></td> <td>Report sessions archived longer than this duration ago (required, for example 30d or 720h for thirty days)</td> </tr> <tr> <td><code>--yes</code></td> <td></td> <td>With --apply: skip the confirmation prompt (required when stdin is not a terminal)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-restore">af sessions restore<a class="headerlink" href="#af-sessions-restore" title="Permanent link">¶</a></h2> <p>Restore an archived, lost, or dead session</p> <p>Restore a session that is currently archived, lost, or dead.</p> <p>Archived sessions are moved back next to the repository, re-registered, re-spawned, and marked running. Lost/dead sessions are recovered in place, rebuilding a missing worktree when possible and resuming the recorded agent conversation when required.</p> <p>Fails if the session is not restorable, or if its origin repository is gone. The restored worktree path is printed on success.</p> <p>For a sandbox session (docker/ssh/hook) whose sandbox still ANSWERS but whose agent is gone, restore relaunches the agent in place: the sandbox's agent-server stops the agent and starts it again in its existing workspace, so the branch, the tree and any uncommitted work are untouched, and nothing is pushed, reaped, re-cloned or re-provisioned. A sandbox whose agent-server does not advertise the relaunch feature on /v1/health (an older build, before the relaunch route existed) falls back to replacing the sandbox: that pushes its work to origin first, because recovery re-clones from there and anything unpushed would be destroyed. If that push fails, or if af cannot tell whether the sandbox is gone or merely unreachable, the restore REFUSES and the session stays recoverable.</p> <p>--force-reap replaces the sandbox anyway, skipping the relaunch and the push. It discards whatever that sandbox has not pushed, so it is for a sandbox you know is expendable. It applies to this one session and this one command; there is no global equivalent.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-69-1" name="__codelineno-69-1" href="#__codelineno-69-1"></a>af sessions restore <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--force-reap</code></td> <td></td> <td>replace a reachable sandbox WITHOUT pushing its work first (discards anything it has not pushed)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-retry-limit">af sessions retry-limit<a class="headerlink" href="#af-sessions-retry-limit" title="Permanent link">¶</a></h2> <p>Retry a usage-limit resume or inspected handoff</p> <p>Retry a session parked at a provider usage-limit wall, or explicitly retry a handoff whose mission delivery could not be confirmed.</p> <p>The daemon runs the same recovery action as the TUI's c key and the web's Retry button: it re-spawns an exited agent when necessary, re-delivers the pending prompt (or "continue" for an interactive session with no stored prompt), and clears the limit state after delivery succeeds.</p> <p>Before retrying an unconfirmed handoff, inspect its pane: the first submission may already have landed, and this command is the operator's explicit decision to send the pending mission again. When the pane shows the incoming agent ALREADY acting on its mission, use --delivered instead: it retires the pending obligation and clears the leftover operation/startup flags WITHOUT sending the mission a second time.</p> <p>The command fails when neither recovery obligation exists. Use 'af sessions list' to find sessions carrying the [limit] badge; the TUI and web expose Retry handoff and Mark delivered for an unconfirmed handoff.</p> <p>A startup-unknown agent handoff parked at its limit is not resent: the daemon queues the mission into the session's stored prompt for the next limit resume. That committed transfer exits 0 with a "note" field naming how the send happens — the scheduled retry when limit_auto_resume is on, or an explicit 'c'/'retry-limit' when it is off (the default). The TUI offers the same verb as "Queue for limit resume" and the web as the Queue for limit resume button.</p> <p>The output's conversation object says whether the agent serving the session afterwards can read its previous conversation: carried=true when the retry resumed it (the committed account swap's carry, the recorded conversation id, or a worktree-scoped resume), or carried=false with carry_failure naming why it starts fresh — including a retry that had no recorded conversation id to resume and came up clean rather than guessing at the account's latest. For a sandbox session the answer is whatever the sandbox's own recovery reported: carried=true only when the in-place relaunch it performed resumed this session's own conversation, and carry_failure otherwise — a re-provision, a fresh start, or an older sandbox build that sent no report.</p> <p>Example: af sessions retry-limit fix-auth af sessions retry-limit fix-auth --delivered</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-70-1" name="__codelineno-70-1" href="#__codelineno-70-1"></a>af sessions retry-limit <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--delivered</code></td> <td></td> <td>Mark the pending handoff mission as delivered and retire it WITHOUT resending — use after inspecting the pane and confirming the incoming agent already received it</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-send-prompt">af sessions send-prompt<a class="headerlink" href="#af-sessions-send-prompt" title="Permanent link">¶</a></h2> <p>Send a prompt to a session (or broadcast to all with --all)</p> <p>Send a prompt to an existing session. The session must already exist unless --create is used.</p> <p>If the session does not exist, use --create to automatically create it first, or use 'af sessions create --name <title> --prompt <prompt>' instead.</p> <p>For one target, the JSON acknowledgement includes status: delivered, not-delivered, sent-unverified, or could-not-confirm. sent-unverified means tmux accepted the paste and Enter while a readable pane did not render exact content proof; could-not-confirm means the pane observer itself was unavailable. Neither status claims delivery. A draft still staged in the composer shortly after Enter gets one more Enter only when it is exactly the single paste chip bound to this delivery and nothing in the composer changed; every other staged shape is reported sent-unverified. It is never re-pasted.</p> <p>If --create made the session but could not confirm its start, the command still exits 0: the JSON carries a warning, the status stays could-not-confirm, and stderr says the session was created. Do not retry; inspect it with 'af sessions list'.</p> <p>With --all, broadcast a single prompt to every live session in scope:</p> <div class="highlight"><pre><span></span><code>af sessions send-prompt --all "<prompt>" </code></pre></div> <p>Broadcast scope defaults to the current repo (honoring --repo). Pass --all-repos to broadcast across every repo. The reserved root session is excluded unless --include-root is given. Delivery is best-effort per session: unreachable (Lost, Dead) and Archived sessions are skipped and reported, and one failure never aborts the rest. The command prints a JSON summary whose delivery observations are delivered / not-delivered / sent-unverified / could-not-confirm, alongside failed and skipped targets. It exits 0 even when some sessions fail, so scripts can inspect per-session results.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-71-1" name="__codelineno-71-1" href="#__codelineno-71-1"></a>af sessions send-prompt <title> <prompt> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--all</code></td> <td></td> <td>Broadcast the prompt to every live session in scope (current repo by default; excludes the reserved root session)</td> </tr> <tr> <td><code>--all-repos</code></td> <td></td> <td>With --all, broadcast across every repo instead of only the current/--repo one</td> </tr> <tr> <td><code>--create</code></td> <td></td> <td>Auto-create the session if it doesn't exist</td> </tr> <tr> <td><code>--host</code></td> <td><code>string</code></td> <td>With --create: place a NEWLY created session on a host from your global <code>hosts</code> list, over ssh (see <code>af sessions backends</code>). If the session already exists the prompt is sent to it unchanged</td> </tr> <tr> <td><code>--include-root</code></td> <td></td> <td>With --all, also deliver to the reserved root session (excluded by default)</td> </tr> <tr> <td><code>--program</code></td> <td><code>string</code></td> <td>Program to run when creating a new session (one of: claude, codex, aider, gemini, amp, opencode, devin; defaults to config default)</td> </tr> <tr> <td><code>--prompt</code></td> <td><code>string</code></td> <td>The prompt to send (alias for the positional <prompt>, matching 'sessions create --prompt')</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-set-conversation">af sessions set-conversation<a class="headerlink" href="#af-sessions-set-conversation" title="Permanent link">¶</a></h2> <p>Record a session's provider conversation id</p> <p>Record a provider conversation id on a session's Agent tab — the repair for a conversation af never captured, or captured stale before the store had a capture arm on it (#6769).</p> <p>The daemon refuses unless the session's own conversation store proves the id belongs to it: today that means a Codex rollout-…-<uuid>.jsonl whose session_meta launches in the session's working directory and is not a sub-agent thread. A remote session, a non-Codex agent, a malformed or absent rollout, and a session mid-operation all refuse with the reason.</p> <p>The running pane is not touched: the recorded id only matters the next time af builds a resume command (respawn, restore, handoff). The recorded id stands while the pane stays on the thread it was on when you set it, and it outranks the other threads already in the session's worktree.</p> <p>Once the pane moves to another thread, the id no longer names the thread you were last in. af records the thread the pane moved to (#7120); if it could not see the move, the next restore or handoff starts a fresh conversation rather than resume the id (#7122). A move is a new thread (/new, or the first prompt of a fresh Codex, which is on no thread until then) or an older thread the pane resumes. A pane af starts after you set the id, or one af finds behind the session's name that it did not start, was on no thread when you set it, so any thread it opens or writes to is a move, even the one the old pane was on; what the old pane wrote before af replaced it is judged as before (#7129). If af could not read which thread the pane was on as you set the id, the thread it is on the first time af can read it stands in for that: af follows only a move off it, and any other thread written to since you set the id then counts as a move. A restore keeps the id over that thread only if the thread already existed when you set the id. Until af has read the pane, an older thread it resumes does not count as a move. So set the id after a fresh pane's first prompt, not before. Re-running with the same id renews the repair as of now.</p> <p>Example: af sessions set-conversation fix-auth 0195f8e2-7c3a-7b1d-9e4f-2a6c8d0b1e2f</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-72-1" name="__codelineno-72-1" href="#__codelineno-72-1"></a>af sessions set-conversation <title> <id> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tab-create">af sessions tab-create<a class="headerlink" href="#af-sessions-tab-create" title="Permanent link">¶</a></h2> <p>Spawn a shell, process, web, VS Code, or docs tab in a session</p> <p>Create a new tab in an existing session.</p> <p>Shell tab (--kind shell): starts the user's $SHELL in the session's git worktree. This is the same Terminal tab the TUI and web UI open; "shell" is its canonical kind and name, while "Terminal" is only the label those UIs display.</p> <p>Process tab (default): runs --command in the session's git worktree (e.g. a data explorer TUI or a test watcher). If --name is omitted, a name is derived from the command's basename. The command runs once, at creation, and af never runs it again. If it exits non-zero immediately (a mistyped command, for example), tab-create fails with the exit status and the command's last output, and no tab is added. Across a daemon/af restart, af reattaches to the pane: a running command keeps running, and a finished one keeps its output and records its exit status in the tab's "exit" field. A process tab whose tmux session is gone entirely restores inert.</p> <p>In an account-scoped session, af stops a running process tab it did not start under the session's account, once, at restart; an account swap stops every running process tab. Neither runs the command again, and the tab's exit.stopped_by says why ("account-scope" or "account-swap"). A finished process tab with nothing left running is kept as it is.</p> <p>Web tab (--kind web): a URL/iframe tab with NO process — an agent injects a live browser view into the user's screen. Point it at a local dev server with --port <n> (= http://localhost:<n>) or --url <addr>, or at an external site with --url https://... A localhost/loopback target is reverse-proxied by the daemon so the preview works even when the web UI is viewed remotely (Tailscale/SSH); an external URL is iframed directly (best-effort — many sites block embedding). The web tab renders as an iframe in the web UI and as a placeholder in the TUI.</p> <p>Proposal tab (--kind docs --proposal <slug>): the web UI's editor for a proposal of the session's project (see af proposal). It has no process. The TUI shows a placeholder, because the editor is web only. af proposal start and attach create this tab for you.</p> <p>The tab persists and reconnects across a daemon/af restart like every other tab — for a process tab "reconnect" means reattach-only, never re-running the command (see above).</p> <p>--name sets a process, web, VS Code, or Proposal tab's name — the handle every other tab verb addresses it by. A shell tab does not accept --name: its canonical name is "shell" (auto-suffixed on collision), while the TUI renders the presentation-only label "Terminal". Other names are sanitized before use: characters outside [A-Za-z0-9_-] become "-". The name is then made unique within the session (auto-suffixed -2, -3, …). So the name you pass is not always the name you get — the resolved tab name is printed on success, and that is the one the other tab verbs address.</p> <p>For remote sessions, web and VS Code tabs are admitted. A VS Code tab opens the editor running on the session's host, rooted at the workspace (code-server or openvscode-server must be installed there). A web tab is metadata-only: it needs no PTY and spawns no process. An external HTTPS URL is iframed directly, and a loopback target (including --port) is served from the session's own workspace through the agent-server's port relay, so it shows what listens on that port in the sandbox rather than on the daemon host. Plain-HTTP external URLs cannot be framed by an HTTPS Agent Factory UI. Shell and process tabs are admitted when the session's agent-server advertises "tab-api" (a current build does): they run on the session's host. An older agent-server without that advertisement keeps the refusal, because those kinds then need a daemon-side worktree the off-box session does not have.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-73-1" name="__codelineno-73-1" href="#__codelineno-73-1"></a>af sessions tab-create <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--command</code></td> <td><code>string</code></td> <td>Command to run in a process tab (required when --kind is empty)</td> </tr> <tr> <td><code>--kind</code></td> <td><code>string</code></td> <td>Tab kind: "shell" for a $SHELL terminal, empty for a process command, "web" for a URL/iframe, "vscode" for VS Code, or "docs" for a Proposal tab</td> </tr> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Tab name — sanitized to [A-Za-z0-9_-] and auto-suffixed on collision (not valid with --kind shell)</td> </tr> <tr> <td><code>--port</code></td> <td><code>int</code></td> <td>Web tab convenience for --url http://localhost:<port> (with --kind web) (default <code>0</code>)</td> </tr> <tr> <td><code>--proposal</code></td> <td><code>string</code></td> <td>Proposal <code>slug</code> the tab edits (required with --kind docs)</td> </tr> <tr> <td><code>--url</code></td> <td><code>string</code></td> <td>Web tab target URL (with --kind web): a localhost dev-server address or an external https URL</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tab-delete">af sessions tab-delete<a class="headerlink" href="#af-sessions-tab-delete" title="Permanent link">¶</a></h2> <p>Delete a single tab from a session</p> <p>Delete the named tab from an existing session — the counterpart of tab-create.</p> <p>The tab is removed from the daemon's session state and its tmux window is killed. The removal is persistent: the daemon will not respawn the tab, and it does not return on a daemon/af restart. The name to pass is the tab name tab-create printed, as reported by "af sessions get" — not the label the TUI tab bar shows, which is a fixed "Agent"/"Terminal" for agent and shell tabs. A miss lists the tabs that exist, with those labels, so a wrong name is a next step rather than a dead end.</p> <p>The agent tab can't be deleted — use "af sessions kill" to tear down the whole session. Deleting a tab or session that doesn't exist is an error, not a silent success. On remote sessions, metadata-only web tabs can be deleted, and so can shell and process tabs when the session's agent-server advertises "tab-api" (it closes them on the session's host); an older agent-server without that advertisement never admits those kinds.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-74-1" name="__codelineno-74-1" href="#__codelineno-74-1"></a>af sessions tab-delete <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Name of the tab to delete (required; the tab's name, not the TUI's "Agent"/"Terminal" label)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tab-rename">af sessions tab-rename<a class="headerlink" href="#af-sessions-tab-rename" title="Permanent link">¶</a></h2> <p>Rename a tab of a session</p> <p>Rename an existing tab — the fix for a name you have to live with all day, typically one an agent picked when it created the tab.</p> <p>Only web, process, VS Code and docs tabs can be renamed: those are the tabs that display their name. The agent tab always shows "Agent" and shell tabs always show "Terminal" on every surface, so renaming one would change the handle you address it by without changing anything you can see — confusing rather than useful, so it is refused.</p> <p>--new-name follows the same rules as tab-create's --name: characters outside [A-Za-z0-9_-] become "-", and the name is made unique within the session (auto-suffixed -2, -3, …). A name that sanitizes away to nothing is an error rather than a silent fall back to a default. The resolved name is printed on success — that is what the tab is actually called, and what the other tab verbs now address it by.</p> <p>The rename persists across a daemon/af restart and does not disturb the tab's running process. On remote sessions, metadata-only web tabs can be renamed, and so can process tabs when the session's agent-server advertises "tab-api"; an older agent-server without that advertisement never admits process tabs. Archived sessions still have to be restored first.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-75-1" name="__codelineno-75-1" href="#__codelineno-75-1"></a>af sessions tab-rename <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Name of the tab to rename (required; the tab's name, not the TUI's "Agent"/"Terminal" label)</td> </tr> <tr> <td><code>--new-name</code></td> <td><code>string</code></td> <td>New name for the tab (required; sanitized and auto-suffixed on collision)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tab-reorder">af sessions tab-reorder<a class="headerlink" href="#af-sessions-tab-reorder" title="Permanent link">¶</a></h2> <p>Move a tab within a session's tab order</p> <p>Move a tab to a different slot, so the tab order is yours rather than whatever order the tabs happened to be created in.</p> <p>--index is the destination slot, 0-based, counting the tab bar left to right, and read as the tab's FINAL position: moving a tab to --index 3 of a 4-tab session puts it last.</p> <p>Slot 0 is reserved for the agent tab: the agent tab can't be moved, and no tab can be moved in front of it. That is structural, not cosmetic — the agent tab is identified by its position throughout a session's lifecycle.</p> <p>The new order persists across a daemon/af restart and does not disturb any tab's running process. On remote sessions, metadata-only web tabs can be reordered, and so can shell and process tabs when the session's agent-server advertises "tab-api"; an older agent-server without that advertisement never admits those kinds. Archived sessions still have to be restored first.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-76-1" name="__codelineno-76-1" href="#__codelineno-76-1"></a>af sessions tab-reorder <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--index</code></td> <td><code>int</code></td> <td>Destination slot, 0-based, as the tab bar reads left to right (required; slot 0 is the agent tab and can't be targeted) (default <code>0</code>)</td> </tr> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Name of the tab to move (required; the tab's name, not the TUI's "Agent"/"Terminal" label)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tabs">af sessions tabs<a class="headerlink" href="#af-sessions-tabs" title="Permanent link">¶</a></h2> <p>Manage a session's tabs (create/delete/rename/reorder)</p> <p>Noun-subcommand aliases for the tab-create/tab-delete/tab-rename/tab-reorder verbs.</p> <p>"sessions tabs create" is identical to "sessions tab-create", and the same holds for delete, rename and reorder; the hyphen verbs remain supported for existing scripts. To list a session's tabs, use "sessions get <title>".</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-77-1" name="__codelineno-77-1" href="#__codelineno-77-1"></a>af sessions tabs </code></pre></div> <p><strong>Subcommands</strong></p> <ul> <li><a href="#af-sessions-tabs-create"><code>af sessions tabs create</code></a> — Spawn a shell, process, web, VS Code, or docs tab in a session</li> <li><a href="#af-sessions-tabs-delete"><code>af sessions tabs delete</code></a> — Delete a single tab from a session</li> <li><a href="#af-sessions-tabs-rename"><code>af sessions tabs rename</code></a> — Rename a tab of a session</li> <li><a href="#af-sessions-tabs-reorder"><code>af sessions tabs reorder</code></a> — Move a tab within a session's tab order</li> </ul> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tabs-create">af sessions tabs create<a class="headerlink" href="#af-sessions-tabs-create" title="Permanent link">¶</a></h2> <p>Spawn a shell, process, web, VS Code, or docs tab in a session</p> <p>Alias for "sessions tab-create". See "af sessions tab-create --help" for details.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-78-1" name="__codelineno-78-1" href="#__codelineno-78-1"></a>af sessions tabs create <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--command</code></td> <td><code>string</code></td> <td>Command to run in a process tab (required when --kind is empty)</td> </tr> <tr> <td><code>--kind</code></td> <td><code>string</code></td> <td>Tab kind: "shell" for a $SHELL terminal, empty for a process command, "web" for a URL/iframe, "vscode" for VS Code, or "docs" for a Proposal tab</td> </tr> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Tab name — sanitized to [A-Za-z0-9_-] and auto-suffixed on collision (not valid with --kind shell)</td> </tr> <tr> <td><code>--port</code></td> <td><code>int</code></td> <td>Web tab convenience for --url http://localhost:<port> (with --kind web) (default <code>0</code>)</td> </tr> <tr> <td><code>--proposal</code></td> <td><code>string</code></td> <td>Proposal <code>slug</code> the tab edits (required with --kind docs)</td> </tr> <tr> <td><code>--url</code></td> <td><code>string</code></td> <td>Web tab target URL (with --kind web): a localhost dev-server address or an external https URL</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tabs-delete">af sessions tabs delete<a class="headerlink" href="#af-sessions-tabs-delete" title="Permanent link">¶</a></h2> <p>Delete a single tab from a session</p> <p>Alias for "sessions tab-delete". See "af sessions tab-delete --help" for details.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-79-1" name="__codelineno-79-1" href="#__codelineno-79-1"></a>af sessions tabs delete <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Name of the tab to delete (required; the tab's name, not the TUI's "Agent"/"Terminal" label)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tabs-rename">af sessions tabs rename<a class="headerlink" href="#af-sessions-tabs-rename" title="Permanent link">¶</a></h2> <p>Rename a tab of a session</p> <p>Alias for "sessions tab-rename". See "af sessions tab-rename --help" for details.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-80-1" name="__codelineno-80-1" href="#__codelineno-80-1"></a>af sessions tabs rename <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Name of the tab to rename (required; the tab's name, not the TUI's "Agent"/"Terminal" label)</td> </tr> <tr> <td><code>--new-name</code></td> <td><code>string</code></td> <td>New name for the tab (required; sanitized and auto-suffixed on collision)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-tabs-reorder">af sessions tabs reorder<a class="headerlink" href="#af-sessions-tabs-reorder" title="Permanent link">¶</a></h2> <p>Move a tab within a session's tab order</p> <p>Alias for "sessions tab-reorder". See "af sessions tab-reorder --help" for details.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-81-1" name="__codelineno-81-1" href="#__codelineno-81-1"></a>af sessions tabs reorder <title> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--index</code></td> <td><code>int</code></td> <td>Destination slot, 0-based, as the tab bar reads left to right (required; slot 0 is the agent tab and can't be targeted) (default <code>0</code>)</td> </tr> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Name of the tab to move (required; the tab's name, not the TUI's "Agent"/"Terminal" label)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-watch">af sessions watch<a class="headerlink" href="#af-sessions-watch" title="Permanent link">¶</a></h2> <p>Wait for idle, or a fleet stop-state change or disappearance</p> <p>Watch a session and exit 0 when its agent is idle and awaiting input. Idle does not mean the work is complete.</p> <p>Polls the daemon's snapshot (the same read path as 'af sessions get') every --interval (default 2s). Exits non-zero if the session reaches a terminal state it can't leave on its own (lost, dead, or archived), if it disappears (killed), or if --timeout elapses first (default 30m). A session that is still working, a usage-limit block that auto-resumes, or a create/archive/restore in progress all keep the watch waiting.</p> <p>By default prints a concise line on transition; with --json emits the final session record. Honors --repo to scope the title lookup to one repository.</p> <p>With NO title (or --all) it watches every session in scope and returns on the first stop-state change or disappearance, printing which session and why. It is edge-triggered: the first poll establishes a baseline and reports nothing, so a session that was already idle before you called does not fire. Pass --include-current to report those too, for a driver that wants a starting snapshot; that snapshot omits archived sessions, which are inert by construction and cannot change on their own (a session archived WHILE you watch is still reported).</p> <p>Each reported session carries a reason a driver can act on: idle, usage-limited (af resumes it automatically — do not prompt it), lost, dead, archived, killed, gone, or unknown. "idle" covers both "finished its work" and "waiting on input": af records both as the same state and does not distinguish them, so neither does this. A session af cannot classify reports "unknown" and is never reported as idle, because an idle report tells a driver to act.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-82-1" name="__codelineno-82-1" href="#__codelineno-82-1"></a>af sessions watch [title] [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--all</code></td> <td></td> <td>Watch every session in scope and return when the first one changes state (the default when no title is given)</td> </tr> <tr> <td><code>--include-current</code></td> <td></td> <td>Fleet form: also report sessions that are already stopped at the first poll, instead of only transitions</td> </tr> <tr> <td><code>--interval</code></td> <td><code>duration</code></td> <td>How often to poll the session's status (default <code>2s</code>)</td> </tr> <tr> <td><code>--timeout</code></td> <td><code>duration</code></td> <td>Give up and exit non-zero if the session is not idle within this window (0 = wait forever) (default <code>30m0s</code>)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-sessions-whoami">af sessions whoami<a class="headerlink" href="#af-sessions-whoami" title="Permanent link">¶</a></h2> <p>Identify the current Agent Factory session</p> <p>Returns the session info for the current session. With a session-bound daemon credential (a sandbox credential, supplied as AF_DAEMON_TOKEN or --token), the daemon reports the session that credential is bound to — the narrowed projection a sandbox receives withholds the tmux name and the repository paths. An ordinary operator token (including the output of 'af token show') is bound to no session, so it resolves nothing by itself: whoami then falls back to the tmux path. Otherwise it matches the current tmux session name against stored sessions.</p> <p>The tmux path requires TMUX and TMUX_PANE. Queries that pane on the inherited tmux socket. When tmux supports session environment stamping (3.2+), AF_SESSION must match the pane; otherwise inherited markers are ignored. Missing context or a stamped identity mismatch is an error on that path.</p> <p>Identity is not scoped: you are the session you are, in whatever project it belongs to. --repo therefore acts as an assertion — it checks that the resolved session really is in that project, and errors if it is not. The assertion needs the session's recorded repository: a session-bound credential receives a projection without it, so there --repo is validated as a project but is not compared — a success does not verify the project.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-83-1" name="__codelineno-83-1" href="#__codelineno-83-1"></a>af sessions whoami </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-target">af target<a class="headerlink" href="#af-target" title="Permanent link">¶</a></h2> <p>Point this client at a remote daemon once</p> <p>Save, show or clear the remote daemon this machine's af talks to.</p> <p>A saved target is the lowest-precedence source: --daemon-url / --token win, then AF_DAEMON_URL / AF_DAEMON_TOKEN, then the saved target. It is stored in this machine's af home with 0600 permissions. The saved token is sent only to the saved URL, never to a host named by a flag or environment variable.</p> <p>Run 'af target show' to see which target an invocation will use and why.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-84-1" name="__codelineno-84-1" href="#__codelineno-84-1"></a>af target </code></pre></div> <p><strong>Subcommands</strong></p> <ul> <li><a href="#af-target-clear"><code>af target clear</code></a> — Forget the saved target</li> <li><a href="#af-target-set"><code>af target set</code></a> — Save a remote daemon target</li> <li><a href="#af-target-show"><code>af target show</code></a> — Show which daemon this invocation targets, and why</li> </ul> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-target-clear">af target clear<a class="headerlink" href="#af-target-clear" title="Permanent link">¶</a></h2> <p>Forget the saved target</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-85-1" name="__codelineno-85-1" href="#__codelineno-85-1"></a>af target clear </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-target-set">af target set<a class="headerlink" href="#af-target-set" title="Permanent link">¶</a></h2> <p>Save a remote daemon target</p> <p>Save <url> (http://, ws://, https:// or wss://) as this client's target.</p> <p>Pass the bearer token on stdin with --token-stdin so it never appears in argv or shell history:</p> <div class="highlight"><pre><span></span><code>af token show | ssh box ... # on the daemon host printf '%s' "$TOKEN" | af target set https://box.tailnet.ts.net --token-stdin </code></pre></div> <p>Without --token-stdin no token is saved (the daemon may be unauthenticated, or you can still pass --token / AF_DAEMON_TOKEN per invocation).</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-86-1" name="__codelineno-86-1" href="#__codelineno-86-1"></a>af target set <url> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--token-stdin</code></td> <td></td> <td>Read the bearer token from stdin (first line) and save it with the target</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-target-show">af target show<a class="headerlink" href="#af-target-show" title="Permanent link">¶</a></h2> <p>Show which daemon this invocation targets, and why</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-87-1" name="__codelineno-87-1" href="#__codelineno-87-1"></a>af target show </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks">af tasks<a class="headerlink" href="#af-tasks" title="Permanent link">¶</a></h2> <p>Manage tasks</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-88-1" name="__codelineno-88-1" href="#__codelineno-88-1"></a>af tasks </code></pre></div> <p><strong>Subcommands</strong></p> <ul> <li><a href="#af-tasks-add"><code>af tasks add</code></a> — Add a new task bound to the current project</li> <li><a href="#af-tasks-get"><code>af tasks get</code></a> — Get a task in the current project by ID or name</li> <li><a href="#af-tasks-list"><code>af tasks list</code></a> — List tasks in the current project</li> <li><a href="#af-tasks-remove"><code>af tasks remove</code></a> — Remove a task in the current project</li> <li><a href="#af-tasks-restart"><code>af tasks restart</code></a> — Restart an enabled watch task without process overlap</li> <li><a href="#af-tasks-show"><code>af tasks show</code></a> — Show one task's schedule health and audit trail</li> <li><a href="#af-tasks-trigger"><code>af tasks trigger</code></a> — Trigger a task in the current project to run immediately</li> <li><a href="#af-tasks-update"><code>af tasks update</code></a> — Update a task in the current project</li> </ul> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks-add">af tasks add<a class="headerlink" href="#af-tasks-add" title="Permanent link">¶</a></h2> <p>Add a new task bound to the current project</p> <p>Add a new task bound to the current project.</p> <p>A task is bound to exactly one project, and every run's worktree is created inside it. The binding comes from --repo when given, otherwise from the current directory's git repository (a linked worktree resolves to its main repository). The resolved project is echoed back as <code>project_path</code> so the binding is visible at creation rather than inferred later.</p> <p>Outside a git repository, --repo is required — the binding is never guessed. A current directory that resolves to a clone inside af's own home is refused as a stray checkout (#1891); pass --repo to name the intended project.</p> <p>With --daemon-url/AF_DAEMON_URL set, the task is added to that daemon and --repo is required, naming a path on the DAEMON's host: it is sent as typed and resolved there, since a path on this machine says nothing about the daemon's filesystem. The success line names the daemon URL beside the path. An omitted --program is left to the daemon's own default_program rather than resolved from this machine's config.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-89-1" name="__codelineno-89-1" href="#__codelineno-89-1"></a>af tasks add [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--cron</code></td> <td><code>string</code></td> <td>Cron expression (exactly one of --cron / --watch-cmd)</td> </tr> <tr> <td><code>--host</code></td> <td><code>string</code></td> <td>Place each session this task creates on a host from your global <code>hosts</code> list, over ssh (see <code>af sessions backends</code>); empty uses the repo's backend. A name that is not in the list is refused</td> </tr> <tr> <td><code>--max-concurrent-runs</code></td> <td><code>int</code></td> <td>Cap how many sessions this watch task may have in flight at once; excess events are queued in order instead of spawning runs, subject to the durable queue's retention limits (0 = unlimited; --watch-cmd tasks without --target-session only) (default <code>0</code>)</td> </tr> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>Task name (required)</td> </tr> <tr> <td><code>--on-complete</code></td> <td><code>string</code></td> <td>What happens to the session a run spawns once it finishes: keep (default, leaves it in place), archive (restorable, but retains its whole worktree), or kill (reclaims the worktree and prunes the session's branch). Not for --target-session tasks, whose session is meant to be reused</td> </tr> <tr> <td><code>--program</code></td> <td><code>string</code></td> <td>Program to run (one of: claude, codex, aider, gemini, amp, opencode, devin; defaults to config default)</td> </tr> <tr> <td><code>--prompt</code></td> <td><code>string</code></td> <td>Prompt to send (required for --cron tasks; --watch-cmd tasks default to the emitted line, with {{line}} substituted when present)</td> </tr> <tr> <td><code>--target-session</code></td> <td><code>string</code></td> <td>Deliver the prompt into this session (auto-created if missing); empty creates a new session per run</td> </tr> <tr> <td><code>--watch-cmd</code></td> <td><code>string</code></td> <td>Long-running watch command; each stdout line triggers the task (exactly one of --cron / --watch-cmd)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks-get">af tasks get<a class="headerlink" href="#af-tasks-get" title="Permanent link">¶</a></h2> <p>Get a task in the current project by ID or name</p> <p>Get a task in the current project by ID or name.</p> <p>The task must belong to the resolved project: --repo when given, otherwise the current directory's project. Inspecting another project's task requires naming it with --repo. Outside a git repository there is no project context and the id or name resolves globally.</p> <p>The argument may be the task's id or its exact name. An exact id match always wins — a name that collides with another task's id still resolves to that id. Otherwise an exact name match resolves only when exactly one task in scope has it: a name shared by several tasks is refused with their ids rather than acted on at random, and a name held only by other projects is refused with the --repo that would reach it.</p> <p>With --daemon-url/AF_DAEMON_URL set, the task is looked up on that daemon and never in this machine's store. There is no project context against a remote daemon, so the id or name resolves across its projects and --repo is refused.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-90-1" name="__codelineno-90-1" href="#__codelineno-90-1"></a>af tasks get <id-or-name> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks-list">af tasks list<a class="headerlink" href="#af-tasks-list" title="Permanent link">¶</a></h2> <p>List tasks in the current project</p> <p>List tasks in the current project.</p> <p>Scope follows the shared project-context contract: --repo names a project, otherwise the current directory's project is used, and --all spans every project. Run from outside a git repository with no --repo, there is no project context and every project's tasks are listed.</p> <p>This default changed in #1893: <code>af tasks list</code> inside a repository used to list every project's tasks. Pass --all for the old behavior.</p> <p>With --daemon-url/AF_DAEMON_URL set, the list comes from that daemon and never from this machine's task store — a daemon that cannot be reached is an error, not a fall back to local rows. There is no project context against a remote daemon: your current directory names a repository here, which says nothing about the daemon's projects, so every project's tasks are listed and --repo is refused rather than silently matching nothing.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-91-1" name="__codelineno-91-1" href="#__codelineno-91-1"></a>af tasks list [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--all</code></td> <td></td> <td>List tasks across every project instead of only the current one</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks-remove">af tasks remove<a class="headerlink" href="#af-tasks-remove" title="Permanent link">¶</a></h2> <p>Remove a task in the current project</p> <p>Remove a task in the current project.</p> <p>The task must belong to the resolved project: --repo when given, otherwise the current directory's project. Removing another project's task requires naming it with --repo. Outside a git repository there is no project context and the id or name resolves globally.</p> <p>The argument may be the task's id or its exact name. An exact id match always wins — a name that collides with another task's id still resolves to that id. Otherwise an exact name match resolves only when exactly one task in scope has it: a name shared by several tasks is refused with their ids rather than acted on at random, and a name held only by other projects is refused with the --repo that would reach it.</p> <p>With --daemon-url/AF_DAEMON_URL set, the task is looked up on that daemon and never in this machine's store. There is no project context against a remote daemon, so the id or name resolves across its projects and --repo is refused.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-92-1" name="__codelineno-92-1" href="#__codelineno-92-1"></a>af tasks remove <id-or-name> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks-restart">af tasks restart<a class="headerlink" href="#af-tasks-restart" title="Permanent link">¶</a></h2> <p>Restart an enabled watch task without process overlap</p> <p>Restart an enabled watch task in the current project. The command waits for the old process tree to exit before starting one replacement, so an edited script is re-read without double-emitting events.</p> <p>The task must belong to the resolved project: --repo when given, otherwise the current directory's project. Outside a git repository there is no project context and the id or name resolves globally.</p> <p>The argument may be the task's id or its exact name. An exact id match always wins — a name that collides with another task's id still resolves to that id. Otherwise an exact name match resolves only when exactly one task in scope has it: a name shared by several tasks is refused with their ids rather than acted on at random, and a name held only by other projects is refused with the --repo that would reach it.</p> <p>With --daemon-url/AF_DAEMON_URL set, the task is looked up on that daemon and never in this machine's store. There is no project context against a remote daemon, so the id or name resolves across its projects and --repo is refused.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-93-1" name="__codelineno-93-1" href="#__codelineno-93-1"></a>af tasks restart <id-or-name> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks-show">af tasks show<a class="headerlink" href="#af-tasks-show" title="Permanent link">¶</a></h2> <p>Show one task's schedule health and audit trail</p> <p>Show one task in the current project: its trigger, whether the running daemon has it armed, when it will next fire, whether it has missed scheduled runs, and the bounded audit trail of who created, updated, enabled, disabled, or manually triggered it.</p> <p>Overdue is derived, never stored: a cron task is overdue when it has gone more than one period (or five minutes, whichever is larger) past its most recent scheduled occurrence, measured from the latest of its last run, its last enable, and its creation — so a task paused and switched back on does not report the occurrences it missed while it was off. Watch tasks have no schedule and are never overdue — their arming state is the signal.</p> <p>"Enabled but not armed" means the task is enabled on disk and the running daemon is not holding it: it will not fire until that is fixed. When nothing has reported on it — no daemon running, or one still starting up — the arming state is reported as unknown rather than guessed.</p> <p>The task must belong to the resolved project: --repo when given, otherwise the current directory's project. Outside a git repository there is no project context and the id or name resolves globally.</p> <p>The argument may be the task's id or its exact name. An exact id match always wins — a name that collides with another task's id still resolves to that id. Otherwise an exact name match resolves only when exactly one task in scope has it: a name shared by several tasks is refused with their ids rather than acted on at random, and a name held only by other projects is refused with the --repo that would reach it.</p> <p>Pass --json for the same record <code>af tasks get</code> returns, in the {data,error} envelope.</p> <p>With --daemon-url/AF_DAEMON_URL set, the task is read from that daemon, a Daemon row names it beside the project path, and the schedule verdict is the one the DAEMON derived — a cron expression is evaluated in the scheduler's timezone, and re-deriving it here would answer in this terminal's. There is no project context against a remote daemon, so the id or name resolves across its projects and --repo is refused.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-94-1" name="__codelineno-94-1" href="#__codelineno-94-1"></a>af tasks show <id-or-name> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks-trigger">af tasks trigger<a class="headerlink" href="#af-tasks-trigger" title="Permanent link">¶</a></h2> <p>Trigger a task in the current project to run immediately</p> <p>Trigger a task in the current project to run immediately.</p> <p>The task must belong to the resolved project: --repo when given, otherwise the current directory's project. Triggering another project's task requires naming it with --repo. Outside a git repository there is no project context and the id or name resolves globally.</p> <p>The argument may be the task's id or its exact name. An exact id match always wins — a name that collides with another task's id still resolves to that id. Otherwise an exact name match resolves only when exactly one task in scope has it: a name shared by several tasks is refused with their ids rather than acted on at random, and a name held only by other projects is refused with the --repo that would reach it.</p> <p>With --daemon-url/AF_DAEMON_URL set, the task is looked up on that daemon and never in this machine's store. There is no project context against a remote daemon, so the id or name resolves across its projects and --repo is refused.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-95-1" name="__codelineno-95-1" href="#__codelineno-95-1"></a>af tasks trigger <id-or-name> </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-tasks-update">af tasks update<a class="headerlink" href="#af-tasks-update" title="Permanent link">¶</a></h2> <p>Update a task in the current project</p> <p>Update a task in the current project.</p> <p>The task must belong to the resolved project: --repo when given, otherwise the current directory's project. Updating another project's task requires naming it with --repo. Outside a git repository there is no project context and the id or name resolves globally.</p> <p>The argument may be the task's id or its exact name. An exact id match always wins — a name that collides with another task's id still resolves to that id. Otherwise an exact name match resolves only when exactly one task in scope has it: a name shared by several tasks is refused with their ids rather than acted on at random, and a name held only by other projects is refused with the --repo that would reach it.</p> <p>--repo scopes which task may be updated; it never re-binds one. Pass --project-path to move that task to another existing git repository. The new path becomes the task's working directory and project binding.</p> <p>With --daemon-url/AF_DAEMON_URL set, the patch is applied on that daemon and never to this machine's store. There is no project context against a remote daemon, so the id or name resolves across its projects and --repo is refused; --project-path names a path on the DAEMON's host and is sent as typed for it to resolve.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-96-1" name="__codelineno-96-1" href="#__codelineno-96-1"></a>af tasks update <id-or-name> [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--cron</code></td> <td><code>string</code></td> <td>New cron expression (clears watch-cmd)</td> </tr> <tr> <td><code>--enabled</code></td> <td><code>string</code></td> <td>Enable or disable the task (true/false)</td> </tr> <tr> <td><code>--host</code></td> <td><code>string</code></td> <td>New host for the sessions this task creates (a name from your global <code>hosts</code> list); pass an empty value (--host "") to clear it</td> </tr> <tr> <td><code>--max-concurrent-runs</code></td> <td><code>int</code></td> <td>New in-flight session cap for this watch task; pass 0 to revert to unlimited (default <code>0</code>)</td> </tr> <tr> <td><code>--name</code></td> <td><code>string</code></td> <td>New task name</td> </tr> <tr> <td><code>--on-complete</code></td> <td><code>string</code></td> <td>New spawned-session lifecycle: keep, archive, or kill; pass keep to revert to leaving sessions in place</td> </tr> <tr> <td><code>--program</code></td> <td><code>string</code></td> <td>New program to run (one of: claude, codex, aider, gemini, amp, opencode, devin; leave unset to keep the current one)</td> </tr> <tr> <td><code>--project-path</code></td> <td><code>string</code></td> <td>Move the task to this git repository (distinct from --repo, which scopes its current project)</td> </tr> <tr> <td><code>--prompt</code></td> <td><code>string</code></td> <td>New prompt</td> </tr> <tr> <td><code>--prompt-file</code></td> <td><code>string</code></td> <td>Read the new prompt verbatim from a local file (mutually exclusive with --prompt)</td> </tr> <tr> <td><code>--target-session</code></td> <td><code>string</code></td> <td>New target session; pass an empty value to revert to a new session per run</td> </tr> <tr> <td><code>--watch-cmd</code></td> <td><code>string</code></td> <td>New watch command (clears cron)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--json</code></td> <td></td> <td>Wrap output in the {data,error} JSON envelope (default: bare payload)</td> </tr> <tr> <td><code>--repo</code></td> <td><code>string</code></td> <td>Path to the project's git repository (default: the current directory's project)</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-token">af token<a class="headerlink" href="#af-token" title="Permanent link">¶</a></h2> <p>Manage the daemon's bearer token for the direct-TCP API</p> <p>Manage the bearer token that authenticates the daemon's direct-TCP HTTP API.</p> <p>The token grants full access under the single-owner auth model. It is only used by the TCP listener (enabled with the network.listen_addr config key); the local unix socket stays unauthenticated (its 0600 filesystem perms are the local auth). The token is stored in the af home (~/.agent-factory) with 0600 permissions.</p> <p>The listener serves plain HTTP — af terminates no TLS of its own. The token travels over the connection, so expose the listener only behind a reverse proxy (nginx/caddy) or on a private network (Tailscale/VPN/SSH tunnel).</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-97-1" name="__codelineno-97-1" href="#__codelineno-97-1"></a>af token </code></pre></div> <p><strong>Subcommands</strong></p> <ul> <li><a href="#af-token-rotate"><code>af token rotate</code></a> — Replace the bearer token with a fresh one and print it</li> <li><a href="#af-token-show"><code>af token show</code></a> — Print the bearer token (generating it if absent)</li> </ul> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-token-rotate">af token rotate<a class="headerlink" href="#af-token-rotate" title="Permanent link">¶</a></h2> <p>Replace the bearer token with a fresh one and print it</p> <p>Generate a new bearer token, persist it (overwriting the old one), and print it.</p> <p>Rotation takes effect for new connections immediately — the auth gate re-reads the token file per request — while any in-flight streams keep running until they reconnect.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-98-1" name="__codelineno-98-1" href="#__codelineno-98-1"></a>af token rotate [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--json</code></td> <td></td> <td>Emit the result as JSON wrapped in the {data,error} envelope</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-token-show">af token show<a class="headerlink" href="#af-token-show" title="Permanent link">¶</a></h2> <p>Print the bearer token (generating it if absent)</p> <p>Print the daemon's bearer token.</p> <p>It is generated on first access if it does not yet exist, so this is safe to run before the TCP listener is ever enabled. Present it to a remote daemon with the --token flag (or the AF_DAEMON_TOKEN env var).</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-99-1" name="__codelineno-99-1" href="#__codelineno-99-1"></a>af token show [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--json</code></td> <td></td> <td>Emit the result as JSON wrapped in the {data,error} envelope</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-upgrade">af upgrade<a class="headerlink" href="#af-upgrade" title="Permanent link">¶</a></h2> <p>Upgrade agent-factory to the latest release on the configured channel</p> <p>Upgrade agent-factory to the newest release on the configured update channel (stable by default, or preview via the update_channel config key).</p> <p>You rarely need this: af auto-updates on launch by default, at most once every 6 hours, and re-launches you into the new version. Disable that with auto_update = false in your config to pin the installed version — af upgrade keeps working either way.</p> <p>A manual upgrade never downgrades: if the channel's latest release is older than the running binary — which happens when you switch from the preview channel back to stable — the upgrade is a no-op with an explanation. Pass --allow-downgrade to install the older release anyway.</p> <p>A manual upgrade also refuses to install a build this machine has already rolled back, so this repair path does not silently reinstall the bytes the rollback just recovered from. Publishing a corrected build is the normal fix; pass --allow-rejected to install the rejected build anyway.</p> <p>The same refusal protects launch auto-update and the daemon's transactional upgrade. Neither unattended path can override it; only af upgrade offers --allow-rejected because a human is present to make that choice.</p> <p>af upgrade restarts the running daemon after the swap, and always has: the daemon keeps executing the old code until something restarts it, so a fix that does not reach it is not really installed. Live sessions survive — they run in tmux and the new daemon re-adopts them. Pass --no-restart to leave the daemon on the old binary until you restart it yourself with 'af daemon restart'.</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-100-1" name="__codelineno-100-1" href="#__codelineno-100-1"></a>af upgrade [flags] </code></pre></div> <p><strong>Flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--allow-downgrade</code></td> <td></td> <td>Install the channel's latest release even if it is older than the current binary (e.g. switching from preview back to stable)</td> </tr> <tr> <td><code>--allow-rejected</code></td> <td></td> <td>Install even if this exact build was rolled back on this machine (it failed validation here before)</td> </tr> <tr> <td><code>--ignore-active-upgrade</code></td> <td></td> <td>Install even while a daemon upgrade transaction is in progress (this can leave that upgrade unable to roll back)</td> </tr> <tr> <td><code>--no-restart</code></td> <td></td> <td>Leave the running daemon alone (af upgrade restarts it by default so the new binary takes effect)</td> </tr> </tbody> </table> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> <h2 id="af-version">af version<a class="headerlink" href="#af-version" title="Permanent link">¶</a></h2> <p>Print the version number of agent-factory</p> <div class="highlight"><pre><span></span><code><a id="__codelineno-101-1" name="__codelineno-101-1" href="#__codelineno-101-1"></a>af version </code></pre></div> <p><strong>Global flags</strong></p> <table> <thead> <tr> <th>Flag</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>--daemon-url</code></td> <td><code>string</code></td> <td>Target a REMOTE daemon at this http://, ws://, https:// or wss:// URL instead of the local unix socket (env: AF_DAEMON_URL). https:// and wss:// are verified against the system CAs, for a daemon behind a TLS front such as tailscale serve.</td> </tr> <tr> <td><code>--token</code></td> <td><code>string</code></td> <td>Bearer token for a remote daemon set with --daemon-url (env: AF_DAEMON_TOKEN). Get it with 'af token show' on the daemon host.</td> </tr> </tbody> </table> </article> </div> <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer" > <a href="../../troubleshooting/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Troubleshooting"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg> </div> <div class="md-footer__title"> <span class="md-footer__direction"> Previous </span> <div class="md-ellipsis"> Troubleshooting </div> </div> </a> <a href="../../http-api/" class="md-footer__link md-footer__link--next" aria-label="Next: HTTP API guide"> <div class="md-footer__title"> <span class="md-footer__direction"> Next </span> <div class="md-ellipsis"> HTTP API guide </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> <div class="md-copyright__highlight"> Agent Factory is licensed under the GNU AGPL v3. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> <div class="md-social"> <a href="https://github.com/sachiniyer/agent-factory" target="_blank" rel="noopener" title="Agent Factory on GitHub" class="md-social__link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <div class="md-progress" data-md-component="progress" role="progressbar"></div> <script id="__config" type="application/json">{"annotate": null, "base": "../..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.instant", "navigation.instant.progress", "navigation.tracking", "navigation.footer", "toc.follow", "content.code.copy", "content.code.annotate", "content.tabs.link", "search.suggest", "search.highlight"], "search": "../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../../assets/javascripts/bundle.d7400e89.min.js"></script> </body> </html>