# Configuration

This page is the reference for the files and environment variables that configure dot-agent-deck, and the tasks you do with them. The TUI and the desktop app are both clients of one daemon: settings that belong to the daemon apply to both, while each client also has a file of its own. `dot-agent-deck docs configuration` prints this page for the version you have installed.

## Where configuration lives

| File | What it holds | Read by | Default path | Override |
| --- | --- | --- | --- | --- |
| `config.toml` | `default_command`, `default_dir`, the TUI's bell ([reference](#configtoml-reference)) | the TUI, `dot-agent-deck config`, and the daemon (for the desktop app's New agent and for dispatch) | `~/.config/dot-agent-deck/config.toml` | `DOT_AGENT_DECK_CONFIG` |
| `.dot-agent-deck.toml` | a project's orchestrations, `worker_response_timeout_minutes`, `[features]` ([reference](#dot-agent-decktoml-reference)) | the TUI and the daemon; the desktop app through the daemon | the project directory | none (`DOT_AGENT_DECK_FEATURES_CONFIG` for `[features]` only) |
| `keybindings.toml` | TUI key remapping, see [Keyboard Shortcuts](keyboard-shortcuts.md) | the TUI | `~/.config/dot-agent-deck/keybindings.toml` | `DOT_AGENT_DECK_KEYBINDINGS` |
| `schedules.toml` | scheduled tasks, see [Schedules](scheduled-tasks.md) | the daemon and `dot-agent-deck schedule` | `$XDG_CONFIG_HOME/dot-agent-deck/schedules.toml`, else `~/.config/dot-agent-deck/schedules.toml` | `DOT_AGENT_DECK_SCHEDULES` |
| `remotes.toml` | registered remote hosts, see [Remote Environments](remote-environments.md) | `dot-agent-deck remote`/`connect` and the desktop app | `~/.config/dot-agent-deck/remotes.toml` | `DOT_AGENT_DECK_REMOTES` |
| `desktop.toml` | the desktop app's own settings ([reference](#desktoptoml-reference)) | the desktop app | `~/.config/dot-agent-deck/desktop.toml` | `DOT_AGENT_DECK_DESKTOP_CONFIG` |
| `session.toml` | the TUI's saved session (panes to restore, and its copy of the last command used) | the TUI | `~/.config/dot-agent-deck/session.toml` | `DOT_AGENT_DECK_SESSION` |
| `config-gen-state.json` | small TUI state file | the TUI | beside `config.toml` | `DOT_AGENT_DECK_CONFIG_GEN_STATE` |
| `star-prompt-state.json` | the [star reminder](desktop/index.md#the-star-reminder)'s state, shared by both clients | the TUI and the desktop app | beside `config.toml` | `DOT_AGENT_DECK_STAR_PROMPT` |
| `antigravity-notice-state.json` | the [Antigravity experimental notice](installation.md#antigravity-cli)'s state, shared by both clients | the TUI and the desktop app | beside `config.toml` | `DOT_AGENT_DECK_ANTIGRAVITY_NOTICE` |

`~/.config/dot-agent-deck/` is used on macOS and Linux whatever `XDG_CONFIG_HOME` says; of the files above, only `schedules.toml` consults `XDG_CONFIG_HOME`, and only when it is an absolute path: an empty or relative value is ignored. On Windows the directory is `%APPDATA%\dot-agent-deck`. Every override variable takes the full path of the file, not a directory.

A daemon on a remote host reads the files on *that* host. When you `connect` to a remote, the TUI you see also runs on the remote host, so it reads the remote's `config.toml` and `keybindings.toml`, not yours.

## Set the command new agents start with

`default_command` is the command the new-agent form pre-fills. Set it on the machine the daemon runs on:

```bash
dot-agent-deck config set default_command "claude"
dot-agent-deck config get default_command     # prints: claude
```

What it affects:

- **TUI, `Ctrl+n` New Agent form:** the **Command** field is pre-filled with `default_command`. When `default_command` is empty, it is pre-filled with the deck's last command (below); with neither, it starts blank. A blank command starts your shell. The field is only pre-filled, never run until you submit.
- **TUI, the schedule and dispatcher modes:** a blank **Command** becomes `default_command`, or `claude` when that is empty, because these modes need an agent rather than a shell. The Schedules manager's **Add** and **Edit** pre-fill **Command** the same way.
- **Desktop app, New agent:** the **Command** field is pre-filled with the chosen daemon's `default_command`, else that deck's last command (below), else blank. A blank command starts the daemon's default shell for a plain agent; for the schedule and dispatcher modes a blank command becomes `default_command`, or `claude` when that is empty.
- **Daemon:** a single-agent `dot-agent-deck dispatch` starts the same command as the agent that dispatched it, and `default_command` (or Claude Code) only when that agent was started with no command or with one that only opens a shell. The daemon reads the file each time, so no restart is needed.

The **last command** is the most recent command started from a New Agent form on that deck, from the TUI or the desktop app. The deck remembers it on its own host, so it survives restarting the TUI, the app or the daemon, and both clients offer the same one. Each deck remembers its own last command. When the TUI attaches to a deck that has none yet, it hands that deck the command the TUI last started, from whichever deck that was, so a deck can start out offering a command first used on another. A deck from a release before this one does not remember it: there the TUI offers the last command it started (kept in `session.toml`) and the desktop app the last command it started on that deck since the app was opened.

Check it worked: open the New Agent form (`Ctrl+n` in the TUI, **New agent** in the desktop app) and look at the **Command** field. The TUI reads `config.toml` when it starts, so restart the TUI after changing it; the desktop app picks up the change the next time it opens New agent.

## Set the directory new agents start browsing in

`default_dir` is the directory that creating an agent on this daemon starts browsing in. It must be an absolute path on the daemon's host:

```bash
dot-agent-deck config set default_dir "/home/me/projects"
dot-agent-deck config set default_dir ""      # unset it
```

`config set` refuses a relative path (`Invalid default_dir: "…" is not an absolute path (empty unsets it)`, exit code 1). The TUI's `Ctrl+n` directory picker and the Schedules manager's **Add** open there, and so does the desktop app's New agent dialog. Editing a schedule still opens at that schedule's own directory. It is a starting point, not a limit: you can still go above it with `..`.

If the value is unset, or names something that is missing, not a directory, or cannot be opened, nothing fails: the TUI's picker opens in the directory the TUI was launched from, and the desktop dialog in the home directory on the daemon's host. If the picker does not open where you expect, run `dot-agent-deck config get default_dir` on the daemon's host and check that the directory exists and that you can list it.

## Turn the TUI's terminal bell on or off

The TUI rings the terminal bell when an agent's status changes to one you have enabled. The desktop app does not use these settings.

```bash
dot-agent-deck config set bell.enabled false           # no bell at all
dot-agent-deck config set bell.on_idle true            # also ring when an agent goes idle
```

| Key | Default | Rings when an agent becomes |
| --- | --- | --- |
| `bell.enabled` | `true` | master switch; `false` silences every bell below |
| `bell.on_waiting_for_input` | `true` | waiting for input |
| `bell.on_idle` | `false` | idle, about a second and a half after its turn ends; not **Waiting**, which rings when it turns idle |
| `bell.on_error` | `true` | errored, or blocked by a provider usage limit |

Restart the TUI for a change to take effect.

## Turn the doorbell off for Claude Code, Codex or Antigravity

The deck types a doorbell line into an idle Claude Code, Codex or Antigravity to tell it a message is waiting, and checks the agent's input box before it does where it can ([Delivery in the TUI and desktop app](orchestration.md#delivery-in-the-tui-and-desktop-app)). It does that for every release of each agent, pre-release builds (a version such as `-beta.1` or `-alpha.1`) included. If an agent update makes the doorbell misbehave, turn it off for that agent in `config.toml` on the daemon's host:

```bash
dot-agent-deck config set doorbell.claude false   # no doorbell or input-box check for Claude Code
dot-agent-deck config set doorbell.codex false    # no doorbell or input-box check for Codex
dot-agent-deck config set doorbell.antigravity false   # no doorbell for Antigravity
```

Use the config key, and with the desktop app especially: the daemon reads the file each time it starts an agent, so the key works for a daemon that is already running and for one the app started.

`DOT_AGENT_DECK_DOORBELL_CLAUDE`, `DOT_AGENT_DECK_DOORBELL_CODEX` and `DOT_AGENT_DECK_DOORBELL_ANTIGRAVITY` win over the file: `0`, `false` or `off` turn the doorbell off, `1`, `true` or `on` turn it on. The daemon reads them from its own environment, the one it was started with, so a variable works only when it is set where the daemon starts, for example `DOT_AGENT_DECK_DOORBELL_CLAUDE=0 dot-agent-deck` while no daemon is running. A daemon that is already running keeps its environment and never sees a variable you export in a shell afterwards ([Recycling the daemon](troubleshooting.md#recycling-the-daemon)), and a daemon the desktop app starts when you open the app from the Dock, Finder or an application menu doesn't get variables exported in your shell profile.

For a daemon run as a service, `daemon install` saves these three variables from the installing shell on Linux and macOS: for example, `DOT_AGENT_DECK_DOORBELL_CLAUDE=0 dot-agent-deck daemon install`. Reinstall to update or remove saved overrides; a running service keeps its old environment until its next start (on macOS, the next login). Saved variables still win over the config keys ([Run the Daemon as a Service](daemon-service.md#what-the-service-changes)).

A change applies to agents started after it, in the TUI and the desktop app alike: restart an agent from the deck, once it has taken its messages, to apply it. With the doorbell off, the agent's messages arrive through its own wake-up and hooks or at your next prompt, and its card says `waiting for the agent to fetch it. Send it a prompt.` when nothing else delivers them ([Turn the doorbell off for an agent](orchestration.md#turn-the-doorbell-off-for-an-agent)).

## `config.toml` reference

`dot-agent-deck config get <key>` prints a value; `dot-agent-deck config set <key> <value>` writes one. Both exit `1` with `Unknown config key: <key>` and the list of keys for a key that does not exist. Booleans take exactly `true` or `false`.

| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `default_command` | string | `""` | [Command new agents start with](#set-the-command-new-agents-start-with) |
| `default_dir` | absolute path, or `""` | `""` (unset) | [Directory agent creation starts browsing in](#set-the-directory-new-agents-start-browsing-in) |
| `auto_config_prompt` | boolean | `true` | No effect. It is still accepted, so an existing `config.toml` that sets it keeps working |
| `bell.enabled` | boolean | `true` | [TUI bell](#turn-the-tuis-terminal-bell-on-or-off) master switch |
| `bell.on_waiting_for_input` | boolean | `true` | Bell on waiting for input |
| `bell.on_idle` | boolean | `false` | Bell on idle |
| `bell.on_error` | boolean | `true` | Bell on error or blocked |
| `notifications.question_after_minutes` | integer | `10` | Minutes an agent's question waits before the TUI's one [notification](session-management.md#when-a-question-waits) for it; `0` turns it off |
| `doorbell.claude` | boolean | `true` | [Doorbell and input-box check](#turn-the-doorbell-off-for-claude-code-codex-or-antigravity) for Claude Code |
| `doorbell.codex` | boolean | `true` | [Doorbell](#turn-the-doorbell-off-for-claude-code-codex-or-antigravity) for Codex |
| `doorbell.antigravity` | boolean | `true` | [Doorbell](#turn-the-doorbell-off-for-claude-code-codex-or-antigravity) for Antigravity |

The file is TOML, and you can edit it by hand:

```toml
default_command = "claude"
default_dir = "/home/me/projects"

[bell]
enabled = true
on_waiting_for_input = true
on_idle = false
on_error = true

[doorbell]
claude = true
codex = true
antigravity = true

[notifications]
question_after_minutes = 10
```

`config set` rewrites the keys above and leaves the rest of the file as it is: other tables, such as the [agent cards' `[catalog]`](desktop/agent-cards.md#choose-the-fields-and-actions-agents-use), and comments outside the rewritten keys stay. A comment inside one of their tables, such as `[bell]`, can be lost, and so can a comment on a key that `config set` removes because it is back at its default. If the file does not parse, the TUI and `config` print `Invalid config at <path>: <error>` and use the defaults, and `config set` refuses to save over it (`Not saving config at <path>: it is not valid TOML …`, exit code 1). Fix the parse error by hand, then run `config set` again. A file that parses but gives one of the keys above a value of the wrong type is read as the defaults too, and `config set` then writes the defaults plus the key you set for the keys above, keeping the rest of the file. While the file can't be used, the daemon also holds the doorbell off for both Claude Code and Codex for the agents it starts, rather than turning it on by default ([`turned_off`](troubleshooting.md#a-card-says-waiting-for-the-agent-to-fetch-it-send-it-a-prompt)). That includes a `config.toml` that is a link to a file that is no longer there, for example one that was moved or is on a drive that isn't mounted. For such a link, the TUI and `config` print `Failed to read config at <path>: it is a link whose target is missing`. `config get` then prints the default value and exits `0`, so the value it shows is not the doorbell setting the daemon uses, and `config set` keeps the link and writes a new file at its target with the defaults plus the key you set, or fails if the target's folder is gone too. Put the file back, or point the link at it, before running `config set`. The same goes for a config folder that is a link to a folder that is no longer there, such as `~/.config/dot-agent-deck`, or `~/.config` itself, linked into a dotfiles folder that was moved or is on a drive that isn't mounted: the doorbell stays off, the TUI and `config` print `Failed to read config at <path>: the folder <folder> is a link whose target is missing`, `config get` then prints the default value, and `config set` fails without writing anything. Put the folder back, or point the link at it. A config folder that doesn't exist yet, as on a first run, is not a problem: the deck uses the defaults and the doorbell is on. The deck can't tell a first run from a config folder that is where a drive mounts, while that drive isn't mounted: the folder is there and empty, so the deck uses the defaults, the doorbell is on, and `config set` writes a new file into the folder, which the drive hides once it is mounted again. Mount the drive before you start the deck or change a setting.

`config set` and the desktop app's [Card actions editor](desktop/agent-cards.md#the-card-actions-editor) wait briefly for each other's saves, so neither saves over the other. If the other keeps it waiting for more than a few seconds, `config set` saves nothing, prints `Not saving config at <path>: another program was saving it …; try again` and exits with code 1; run it again. It also saves nothing, and names the file, when the lock file beside the configuration file, `.dot-agent-deck-config.lock`, is not safe to use: one that another user made, that others can read or write, that has another hard link or that is not a regular file. `config set` makes that file itself, readable only by you; remove one you did not make, or ask whoever owns it to, then run `config set` again.

## Create a project configuration

A project's `.dot-agent-deck.toml` sits in the directory you start agents in. It is where orchestrations are defined; [Orchestration](orchestration.md) explains them and has the full role reference.

### Start from the template

```bash
cd your-project
dot-agent-deck init              # or: dot-agent-deck init --path <dir>
```

`init` writes a commented two-role orchestration (`orchestrator` and `worker`, both running `claude`) and prints `Created ./.dot-agent-deck.toml`. In a git repository it also adds `.dot-agent-deck/` (the deck's per-project working directory) to `.git/info/exclude` when it is not listed there yet, and prints `Excluded .dot-agent-deck/ in .git/info/exclude`. It refuses to overwrite an existing file: it prints `<path> already exists` and exits `1`.

### Check it

```bash
dot-agent-deck validate          # or: dot-agent-deck validate --path <dir>
```

| Output | Exit code | Meaning |
| --- | --- | --- |
| `Config is valid.` | `0` | no findings |
| lines of `[warning] '<scope>': <message>` only | `0` | usable; read the warnings |
| any `[error] '<scope>': <message>` line | `1` | the file has a problem the deck will not work around |
| `No .dot-agent-deck.toml found in <dir>` | `1` | wrong directory |
| `Failed to parse <path>: …` | `1` | TOML syntax error, or an `extends` that cannot be resolved |

Errors include: an orchestration with fewer than two roles, not exactly one role with `start = true`, an empty, duplicate or path-like (`/`, `\`, `..`) role name, an empty `command`, and more than one orchestration with `default = true`. Warnings include: a duplicate orchestration name, a worker role with no `description`, an unknown `agent` name, a role whose command does not reveal its agent, several orchestrations with none marked `default`, and a leftover `[[modes]]` block. [Validate your config](orchestration.md#validate-your-config) covers the orchestration checks.

`validate` does not report a key it does not recognise, or a top-level key placed below a table header (see [Top-level keys](#top-level-keys)).

### Generate a config with your agent

Instead of starting from the template, you can ask an agent that is already running in the project to write the file for you, from the TUI or the desktop app.

1. Start an agent in the project.
2. Ask it to generate the config: in the TUI, select its card in command mode and press `g` (or click **Generate** in the footer); in the desktop app, press **Generate config** in the agent's pane, or say "generate config with" and its name.
3. A dialog titled **Generate .dot-agent-deck.toml** opens in both clients. Choose **Yes** to send the agent the request, or **No** (or `Esc`) to close it and send nothing.
4. The agent's pane comes to the front and the agent proposes a config. Tell it what to change; it writes the file after you approve.
5. Run `dot-agent-deck validate` in the project, then start an agent there and choose the orchestration under **Mode** in the New agent form of either client.

When the project already has a `.dot-agent-deck.toml`, the control reads **Update** (`[Update g]` in the TUI, **Update config** in the desktop app) and the dialog **Update .dot-agent-deck.toml**. The agent then reads the existing file and proposes changes to it, keeping what you wrote unless you agree to drop it, and edits it only after you approve. Both clients notice within a few seconds when the file appears or goes away, so after the agent writes it the control reads **Update**. A `.dot-agent-deck.toml` that is a symbolic link counts as an existing config too: the agent edits the file the link points to and keeps the link, and if the link points to a file that does not exist, the agent tells you so instead of writing anything. When the deck can't tell whether the file exists, for example because the project is on a network drive that stopped answering, the control reads **Generate** and the dialog asks whether to have the agent check for `.dot-agent-deck.toml` and create it, or propose updates to it if it already exists.

[Quick setup](orchestration.md#quick-setup) has what each client shows, what the agent is asked to do, and what each message means when it does not work, including `This daemon is too old to generate a config. Upgrade the daemon to use Generate config.`

## `.dot-agent-deck.toml` reference

### Where it is read from

- **Orchestrations** are read from `.dot-agent-deck.toml` in the directory you picked, not from a parent directory. The TUI reads it when you open the New Agent form and when it opens an orchestration tab; the daemon reads it again on each delegation, dispatch and scheduled run, so an edit applies to the next one without restarting anything.
- **The desktop app** asks the daemon for a directory's orchestrations. That read refuses a `.dot-agent-deck.toml` that is a symlink, is not a regular file, or is larger than 1 MiB, and the dialog then offers no orchestrations for that directory. The TUI follows a symlink.
- **`[features]`** is read differently; see [Turn on experimental features](#turn-on-experimental-features).

### Top-level keys

| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `worker_response_timeout_minutes` | integer | `120` | How long a delegated worker may go without `work-done` before the daemon reports it to its orchestrator. `1`–`10080` (seven days) is used as written. `0` turns the report off; it does not mean "immediately". A larger value is ignored, with a warning in the log, and `120` is used. See [Idle Workers & Notifications](idle-workers-and-notifications.md). |
| `[[orchestrations]]` | array of tables | none | Orchestration definitions, including `name`, `default`, `extends` and `[[orchestrations.roles]]` (`name`, `command`, `agent`, `start`, `description`, `prompt_template`, `clear`). The full reference is in [Orchestration](orchestration.md#configuration-reference). |
| `[features]` | table | | `experimental = true` or `false` (default `false`). See [Turn on experimental features](#turn-on-experimental-features). |
| `[fleet_view]` | table | | `guidance`: what dispatchers in this repository should show in their [Fleet view](fleet-view.md). Put it after every top-level key. See [Tell dispatchers what to show in Fleet](#tell-dispatchers-what-to-show-in-fleet). |
| `[[modes]]` | | | Workspace modes were removed. A leftover block is ignored; `validate` warns `workspace modes were removed (#1199); this block is ignored and can be deleted`. |

Unknown keys are ignored without a warning, so a misspelled key silently keeps its default.

**Each orchestration is reviewed before it runs.** The deck starts an orchestration only after you have approved its roles' `name`, `command`, `agent`, `start`, `clear`, `description` and `prompt_template` as they read now, and asks again when any of them changes. Edits to comments, to the top-level keys above, or to another orchestration do not ask again. See [Approving Project Commands](project-trust.md).

**A top-level key must come before the first table header in the file.** TOML assigns every key after a header such as `[[orchestrations]]`, `[[orchestrations.roles]]` or `[features]` to that table, so a `worker_response_timeout_minutes` appended at the end of the file belongs to the last table, where nothing reads it. The file still parses, `validate` still prints `Config is valid.`, and the default stays in effect:

```toml
worker_response_timeout_minutes = 30   # top of the file: applies

[[orchestrations]]
name = "team"
# ... roles ...
```

Scheduled tasks are not in this file; they live in the global `schedules.toml` ([Schedules](scheduled-tasks.md)).

### Tell dispatchers what to show in Fleet

`[fleet_view]` holds one key, `guidance`: text for the dispatchers that compose a [Fleet view](fleet-view.md) in this repository, saying what their views should hold. `dot-agent-deck fleet catalog` prints it at the end of the catalog, under **Guidance for this repository**, when a dispatcher runs it in this folder.

```toml
worker_response_timeout_minutes = 30   # top-level keys first

[[orchestrations]]
name = "team"
# ... roles ...

[fleet_view]
guidance = """
For each issue the view shows, say whether it is ready to start and, if not, why.
Leave out issues a bot opened, such as Renovate's Dependency Dashboard.
"""
```

- **Put it after every top-level key**, at the end of the file is simplest. Like any table, `[fleet_view]` takes every key below its header, so a `worker_response_timeout_minutes` written under it stops applying. `dot-agent-deck validate` and `fleet catalog` both warn when that happens, naming the key.
- **Only `guidance`.** Any other key in the table, or a `guidance` that is not text, is reported by `validate` and `fleet catalog` as a warning. The rest of the file still loads, and orchestrations keep working.
- **Plain text, up to 8000 characters.** Longer text is cut, with a note saying so. Control characters and characters that change the reading direction are removed.
- **The catalog wins.** Guidance says what to show and how to arrange it. A view that breaks the catalog's rules is still refused, whatever the guidance says.
- **Read a repository's guidance before you trust it.** A dispatcher reads it as advice from whoever maintains the repository, labelled as such rather than as a request from you, but an agent can still be swayed by what it says, so review the guidance of a repository you did not write before you run a dispatcher there on its own.
- **Read when the catalog is printed**, so an edit applies to the next `fleet catalog` without restarting anything. It is read from `.dot-agent-deck.toml` in the folder `fleet catalog` runs in, not from a parent folder.

### Subscribe to announcements and job pools

Configure subscriptions in the project's `.dot-agent-deck.toml`. They apply to agents started from either the TUI or the desktop app:

```toml
[dispatch]
subscribe = ["progress"]

[[orchestrations]]
name = "team"
subscribe = ["announcements"]

[[orchestrations.roles]]
name = "orchestrator"
command = "claude"
start = true
subscribe = ["progress"]

[[orchestrations.roles]]
name = "reviewer"
command = "claude"
subscribe = ["review-ready"]
take_offers = ["reviews"]
```

| Key | Who receives it |
| --- | --- |
| `[[orchestrations]] subscribe` | Roles in that orchestration receive announcements on the listed topics. |
| `[[orchestrations.roles]] subscribe` | That role receives announcements on those additional topics. |
| `[[orchestrations.roles]] take_offers` | That role can take jobs offered to the listed pools. |
| `[dispatch] subscribe` | A pane that dispatched a unit receives announcements on these topics from its dispatch tree. |

Each topic or pool name must be 1–64 lowercase letters, digits or hyphens, starting with a letter or digit. A list accepts up to 64 names. With `extends`, omitted subscription keys inherit; an explicit list replaces the inherited list, and `[]` clears it. Run `dot-agent-deck validate` to check the names. See [Announcements and pooled jobs](orchestration.md#announcements-and-pooled-jobs) for the commands agents use.

## Turn on experimental features

Some new surfaces ship behind one switch, `experimental`, which is off by default. In the TUI it adds an `experimental: on` label to the bottom row of the screen; in the desktop app, the deck screen, the Projects, Orchestrations and Agent Profiles screens, and the Dashboard's [Fleet view](fleet-view.md).

For the TUI and the daemon, either set it in the project's `.dot-agent-deck.toml`:

```toml
[features]
experimental = true
```

or set `DOT_AGENT_DECK_EXPERIMENTAL=1` in the environment, which wins over the file. `1` or `true` (any case) turns it on; any other value, including an empty one, turns it off.

- The TUI and the daemon each look for the file starting in the directory they were launched from and walking up to the first `.dot-agent-deck.toml` that is a regular file owned by you. They re-read it about every two seconds, so an edit applies without a restart. `DOT_AGENT_DECK_FEATURES_CONFIG=<file>` names the file outright.
- The daemon's value is fixed by where and how it was started. A daemon started from another directory, or before you set the variable, keeps its own value; stop it with `dot-agent-deck daemon stop` and relaunch.
- The desktop app does not look for a project file. It reads `DOT_AGENT_DECK_EXPERIMENTAL`, or else the file named by `DOT_AGENT_DECK_FEATURES_CONFIG`, from its own environment once at startup, so set one of them before launching the app.

Check it worked: with `DOT_AGENT_DECK_LOG` set (see [Environment variables](#environment-variables)), the log contains `experimental flag: ON` with the file it came from. In the TUI, the `experimental: on` label shows on the bottom row only when the flag is on.

## Environment variables

**Variables are read by the process that has them.** The daemon is usually started for you by the first client that needs one, and it inherits that client's environment and working directory. After that, setting a variable in a new shell does not reach the running daemon. To apply a variable the daemon reads, stop it and start a client from an environment that has the variable:

```bash
dot-agent-deck daemon stop                    # refuses while agents are running; see below
DOT_AGENT_DECK_LOG=1 dot-agent-deck           # the new TUI starts a new daemon with it
```

`daemon stop` refuses while the daemon manages running agents; `--force` stops it anyway and ends those agents. `dot-agent-deck daemon status` lists what it manages. For the desktop app, set the variable in the environment you launch the app from. For a daemon that runs as a service, set it in the service and restart the service ([Run the Daemon as a Service](daemon-service.md#credentials-and-other-environment)).

### Paths and endpoints

| Variable | Default | Read by | Meaning |
| --- | --- | --- | --- |
| `DOT_AGENT_DECK_SOCKET` | `$XDG_RUNTIME_DIR/dot-agent-deck.sock`; without `XDG_RUNTIME_DIR`, `<temp dir>/dot-agent-deck-<uid>/hook.sock` | every process | Socket agents' hooks and `work-done`/`delegate` send events to. The daemon passes its socket path to the agents it starts. |
| `DOT_AGENT_DECK_ATTACH_SOCKET` | `$XDG_RUNTIME_DIR/dot-agent-deck-attach.sock`; without `XDG_RUNTIME_DIR`, `<temp dir>/dot-agent-deck-<uid>/attach.sock` | every process | Socket the TUI and the desktop app connect to. |
| `DOT_AGENT_DECK_STATE_DIR` | `$XDG_STATE_HOME/dot-agent-deck`, else `~/.local/state/dot-agent-deck` (`%LOCALAPPDATA%\dot-agent-deck` on Windows) | the client that starts a daemon, and the daemon | Where a daemon started in the background writes `daemon.log` (its output) and `spawn.lock`, and where the daemon keeps its saved results (`retained-reports/`). An empty value counts as unset. |
| `DOT_AGENT_DECK_BIN` | unset | each agent's hooks | The absolute path of a `dot-agent-deck` executable for agents' hooks to run instead of the installed one their hook settings name. Agents started from an environment that has it report through that binary; every other agent keeps using the installed one. Whoever sets it chooses the program those hooks run, so only an absolute path is honoured: an empty value, a bare name such as `dot-agent-deck` or a relative path such as `./dot-agent-deck` counts as unset, and the hooks run the installed binary. It applies once the hooks have been installed by a release that writes the variable into them (see [Troubleshooting › Hooks](troubleshooting.md#hooks)). On Windows, Claude Code and Codex hooks do not honour it and run the installed binary; the OpenCode plugin and the Pi extension do. It does not change the commands the deck writes for agents to run, such as the doorbell's `inbox fetch` or a task's `work-done`: those name the `dot-agent-deck` the deck daemon runs from. |
| `DOT_AGENT_DECK_CONFIG`, `DOT_AGENT_DECK_SESSION`, `DOT_AGENT_DECK_KEYBINDINGS`, `DOT_AGENT_DECK_SCHEDULES`, `DOT_AGENT_DECK_REMOTES`, `DOT_AGENT_DECK_DESKTOP_CONFIG`, `DOT_AGENT_DECK_CONFIG_GEN_STATE`, `DOT_AGENT_DECK_STAR_PROMPT`, `DOT_AGENT_DECK_ANTIGRAVITY_NOTICE` | see [Where configuration lives](#where-configuration-lives) | the process reading that file | Full path of that file. |

`<temp dir>` is `$TMPDIR` when set, else `/tmp`; on macOS `$TMPDIR` is normally a per-user directory under `/var/folders`. The deck creates `dot-agent-deck-<uid>` with mode `0700`. If another user already owns a directory of that name, the daemon uses a sibling named `dot-agent-deck-<uid>.` followed by 16 random hex digits instead, and clients find it without configuration. On Windows the endpoints are the named pipes `\\.\pipe\dot-agent-deck-<user>-hook` and `\\.\pipe\dot-agent-deck-<user>-attach`.

To see where the running daemon is listening, run `dot-agent-deck daemon endpoint`; it prints the attach endpoint only when a live daemon answered there. When you set either socket variable, set it to the same value for every process that should reach the same daemon, and pick a directory only you can write to. Without them, every such process also needs the same `XDG_RUNTIME_DIR` and `TMPDIR`: a process with a different value looks for a different socket and does not find the running daemon, and a TUI started that way starts a daemon of its own.

### Logging

| Variable | Default | Meaning |
| --- | --- | --- |
| `DOT_AGENT_DECK_LOG` | unset (no log file) | Turns on the log file for the process that has it, including a daemon it starts. `1` or an empty value writes to `/tmp/dot-agent-deck.log` on macOS and Linux and to `dot-agent-deck.log` in the temp directory on Windows; any other value is the file path. The file is appended to. The daemon reads it only when it starts, so a daemon that is already running has to be restarted to pick it up; see [Troubleshooting › Enabling Debug Logs](troubleshooting.md#enabling-debug-logs), which also covers the desktop app. |
| `RUST_LOG` | `error,dot_agent_deck=info` | Verbosity of that log, in [`tracing` filter syntax](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html), added after the default: `RUST_LOG=dot_agent_deck=debug` raises the deck to debug. It does nothing unless `DOT_AGENT_DECK_LOG` is also set. |

A daemon started in the background also writes its standard output and error to `daemon.log` in the state directory above, whether or not `DOT_AGENT_DECK_LOG` is set. [Troubleshooting](troubleshooting.md#enabling-debug-logs) explains how to capture a useful log.

### Features

| Variable | Default | Meaning |
| --- | --- | --- |
| `DOT_AGENT_DECK_EXPERIMENTAL` | unset | `1`/`true` turns the experimental flag on, any other value turns it off; wins over `[features]`. See [Turn on experimental features](#turn-on-experimental-features). |
| `DOT_AGENT_DECK_FEATURES_CONFIG` | unset | Path of the `.dot-agent-deck.toml` whose `[features]` table sets the flag. |

### Daemon behaviour

Set these in the daemon's environment (see the start of this section). Millisecond values must be whole non-negative numbers; a value that is not is ignored with a warning in the log, and a value above the maximum is lowered to it.

| Variable | Default | Meaning |
| --- | --- | --- |
| `DOT_AGENT_DECK_IDLE_SHUTDOWN_SECS` | `30` | The daemon exits this many seconds after it has no attached client, no agents and no pending schedules. `0` keeps it running. A value that is not a whole number uses the default. |
| `DOT_AGENT_DECK_HOOK_PROVENANCE` | enforce | `warn` (any case) makes the daemon accept, with a warning, a `work-done`/`delegate`/`dispatch` or a status update from an agent pane that carries no hook capability token, which happens when the `dot-agent-deck` on the agent's `PATH` is older than the daemon. Any other value keeps refusing. See [Troubleshooting](troubleshooting.md). |
| `DOT_AGENT_DECK_WAITING_NOTICE_DEBOUNCE_MS` | `30000` | How long a delegated worker must stay waiting for input, or stopped on an error, before its orchestrator is told. `0` turns both reports off; maximum `600000`. See [Idle Workers & Notifications](idle-workers-and-notifications.md#tune-or-turn-off-the-other-reports). |
| `DOT_AGENT_DECK_ROLE_START_SPACING_MS` | `3000` | The least time between the starts of the fresh agents of `clear = true` workers handed tasks at the same time, across every orchestration on the daemon, so their first requests do not hit the provider's rate limit together. A worker with no other start just before it starts at once. `0` turns the spacing off; maximum `60000`. See [Orchestration](orchestration.md#what-clear-does-to-delivery). |
| `DOT_AGENT_DECK_COORDINATION_RETENTION_DAYS` | `14` | Each time the deck writes an orchestration's context into the project's `.dot-agent-deck/` directory, Markdown files there last modified more than this many days ago are deleted, except saved copies of long messages (`inbox-message-*.md`), and an `orchestrator-context.md` left by an earlier version is deleted whatever its age, even with `0`. Subdirectories and symlinks are left alone. `0` turns this off; a value that is not a whole number uses the default. Set it where both the TUI and the daemon are started, since either can start an orchestration. |
| `DOT_AGENT_DECK_RETAINED_REPORT_MAX_BYTES` | `268435456` (256 MiB) | How much the daemon keeps in its saved-results directory for one daemon run before it refuses new dispatches. See [Saved results and reports](troubleshooting.md#saved-results-and-reports). A value that is not a whole number uses the default. |
| `DOT_AGENT_DECK_RETAINED_REPORT_MAX_FILES` | `4096` | How many files the daemon keeps there for one daemon run before it refuses new dispatches. Values are kept between `1` and `65536`; one outside that range is moved to the nearer end, with a warning in the log. A value that is not a whole number uses the default. |
| `DOT_AGENT_DECK_DISPATCH_FALLBACK_SLOTS` | `16` | How many dispatch results the daemon holds in memory when it cannot write them to disk, before it refuses new dispatches. A value that is not a whole number uses the default. |
| `OTEL_EXPORTER_OTLP_ENDPOINT` and the other standard `OTEL_*` variables | unset | With an OTLP endpoint set, the daemon sends a record of every agent run to that OpenTelemetry backend and passes the configuration on to the agents it starts. It works the same in the TUI and the desktop app, because the daemon reads the variables when it starts; an app opened from the Dock, Finder or an application menu does not see your shell's variables, so see [Where to set the variables](telemetry.md#where-to-set-the-variables) for the desktop app, a daemon run as a service and remote hosts. See [Telemetry](telemetry.md). |

The retired delivery settings `DOT_AGENT_DECK_DELEGATE_READINESS_BUFFER_MS`, `DOT_AGENT_DECK_DELEGATE_RETRY_SCHEDULE_MS`, `DOT_AGENT_DECK_DELEGATE_NO_EVENT_WINDOW_MS`, `DOT_AGENT_DECK_DRAFT_DEFER_CAP_MS`, `DOT_AGENT_DECK_SEED_FALLBACK_SECS` and `DOT_AGENT_DECK_SESSION_START_WAIT_MS` have no effect. A daemon started with one set logs a warning; remove it from your launch environment.

Agent messages use an inbox in both clients; no readiness delay or forced submission over a draft is needed. [Orchestration → Delivery](orchestration.md#delivery-in-the-tui-and-desktop-app) describes the badge, agent support and diagnostic commands. `worker_response_timeout_minutes` above controls how long you wait for a worker's completed report; it is separate from message receipt.

### Remote and desktop

| Variable | Default | Meaning |
| --- | --- | --- |
| `DOT_AGENT_DECK_SSH_PROBE_TIMEOUT_SECS` | `10` | Seconds `connect` and the remote checks allow an ssh probe, kept within `1`–`3600`. Raise it for slow links; see [Remote Recipes](remote-recipes.md). |
| `DOT_AGENT_DECK_BINARY` | unset | The `dot-agent-deck` executable the desktop app starts a local daemon with. Unset, the app looks next to its own executable, then in its parent directories, then on `PATH`. If it is set to something that is not an executable file, the app reports `DOT_AGENT_DECK_BINARY is not an executable file: <path>`. |

### Set by the deck

The deck puts these in each agent's environment; you do not set them. `DOT_AGENT_DECK_PANE_ID` names the pane and `DOT_AGENT_DECK_PANE_CAPABILITY` carries the token that lets that pane's `work-done`, `delegate`, `dispatch` and status updates be accepted. Running those commands in a shell the deck did not start (a plain terminal, or a tool that strips the environment) fails because these are missing; see [Orchestration](orchestration.md) and [Troubleshooting](troubleshooting.md).

In a pane that another agent drives (an orchestration worker, or a single-agent unit started by `dispatch`) the deck also sets `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false`, which turns off Claude Code's prompt suggestions there: each one costs a model request, and that pane takes its work from the orchestrator or from its task rather than from you. The orchestrator, a dispatcher and the panes you open yourself keep Claude Code's own setting. Other agents start as before.

## `desktop.toml` reference

The desktop app keeps its settings in `desktop.toml`, beside the TUI's files: `~/.config/dot-agent-deck/desktop.toml` on macOS and Linux, or the path in `DOT_AGENT_DECK_DESKTOP_CONFIG`. The app writes it as you change **Settings**, and you can also edit it by hand while the app is closed. The TUI's `config.toml` and `keybindings.toml` do not configure the app, except that the app gets `default_command` and `default_dir` from the daemon, which reads them from `config.toml` on its host. [Desktop app → Settings](desktop/settings.md) describes the screen.

A new file looks like this; `[endpoints]` and `[voice]` appear once you change those settings:

```toml
version = 1

[appearance]
mode = "system"

[zoom]
level = 1.0
```

| Key | Type | Default | Allowed values |
| --- | --- | --- | --- |
| `version` | integer | `1` | written by the app |
| `appearance.mode` | string | `"system"` | `"system"` (follow the OS), `"light"`, `"dark"`; an unrecognised value means `"system"` |
| `zoom.level` | number | `1.0` | `0.75`, `0.9`, `1.0`, `1.1`, `1.25`, `1.5`, `1.75`, `2.0`, `2.5`, `3.0`; another number is snapped to the nearest |
| `endpoints.selection` | string | `"local"` | `"local"`, `"all"` (every daemon at once), or the `id` of a remote deck in `remotes.toml` |
| `voice.activation` | string | `"toggle"` | `"toggle"` |
| `voice.labels` | string | `"shared"` | `"shared"`, `"withheld"`: the [Send on-screen names](desktop/voice.md#settings--voice) switch, On or Off |
| `voice.reading` | string | `"off"` | `"off"`, `"on"` (turns [reading](desktop/voice.md#reading) on: the app reads your agents' turns aloud); an unrecognised value means `"off"` |
| `voice.reading_notice` | string | `"pending"` | `"pending"`, `"shown"`: whether the app has said where replies go, which it does the first time reading is turned on; an unrecognised value means `"pending"` |
| `voice.speech` | string | `"auto"` | `"auto"`, `"provider"`, `"system"`: where reading's voice comes from; an unrecognised value means `"auto"` |
| `voice.read_aloud.route` | string | `"auto"` | `"auto"`, `"chat_audio"`, `"audio_speech"`: how the Commands server is asked for reading's voice ([Where the voice comes from](desktop/voice.md#where-the-voice-comes-from)); an unrecognised value means `"auto"`, and so does `"audio_speech"` with no model or a retired one while Commands is OpenAI's |
| `voice.read_aloud.model` | string | absent: `gpt-audio-1.5` on chat audio, `gpt-4o-mini-tts` on the speech endpoint | `gpt-4o-mini-tts`, `tts-1` and `tts-1-hd` while Commands is OpenAI's are read as absent ([why](desktop/voice.md#where-the-voice-comes-from)) |
| `voice.read_aloud.voice` | string | absent: `alloy` | any voice the server offers |
| `voice.transcription.backend` | string | `"local"` | `"local"` (no key; the endpoint must be on this machine), `"remote"` |
| `voice.transcription.endpoint` | URL | `http://127.0.0.1:18000/v1/audio/transcriptions` for `local`, `https://api.openai.com/v1/audio/transcriptions` for `remote` | any URL; a `local` backend refuses one that is not a loopback address |
| `voice.transcription.model` | string | `Systran/faster-whisper-tiny.en` for `local`, `gpt-transcribe` for `remote` | `whisper-1` at OpenAI's endpoint is read as `gpt-transcribe` ([why](desktop/voice.md#settings--voice)) |
| `voice.transcription.language` | string | `"en"` | `"auto"` (the Speech service detects the language), or the two-letter code of a language the [Language](desktop/voice.md#settings--voice) row offers, such as `"de"` or `"sr"`; an unrecognised value means `"en"` |
| `voice.intent.backend` | string | `"openai_compatible"` | `"openai_compatible"`, `"anthropic"` |
| `voice.intent.endpoint` | URL | `https://api.openai.com/v1/chat/completions` for `openai_compatible`, `https://api.anthropic.com/v1/messages` for `anthropic` | |
| `voice.intent.model` | string | `gpt-6-luna` for `openai_compatible`, `claude-haiku-4-5` for `anthropic` | `gpt-5-mini` at OpenAI's endpoint is read as `gpt-6-luna` ([why](desktop/voice.md#settings--voice)) |
| `voice.intent.max_tokens` | integer | `4096` | `64`–`32768` |

The `voice` keys are absent until you change a voice setting; [Voice Control](desktop/voice.md) explains them. An omitted endpoint or model takes the value for the backend you chose. The app does not write API keys to this file; it keeps them in the operating system's keychain. The list of remote daemons is not in this file either: it is `remotes.toml`, shared with the CLI, and the app moves any `[[endpoints.remote]]` rows written by an older version there the first time it loads the file.

A missing file means the defaults. When the file cannot be read or parsed, the app starts with the defaults and the **Settings** footer says what is wrong instead of showing the path. While the file on disk cannot be read, the app refuses to save over it, so fix or remove it to save settings again. A save writes only the values that changed, so your comments and any keys the app does not know are kept.

## Run a command repeatedly: `dot-agent-deck watch`

A standalone helper, similar to Linux `watch`, for a pane that should show a command's output refreshed:

```bash
dot-agent-deck watch --interval 2 "kubectl get pods"
```

`--interval` is a whole number of seconds and is required. The command is run with `sh -c` on macOS and Linux; the screen is cleared when each run's output starts. Press `Ctrl+C` to stop.

## When a setting does not take effect

| Symptom | Likely cause | What to do |
| --- | --- | --- |
| A `config.toml` change is not visible in the TUI | the TUI reads the file only at startup | restart the TUI |
| A variable you exported changes nothing | the running daemon was started without it | `dot-agent-deck daemon stop`, then relaunch from a shell that has it ([Environment variables](#environment-variables)) |
| `worker_response_timeout_minutes` seems ignored | the key is below a table header, or out of range | move it to the top of the file; use `0`–`10080` ([Top-level keys](#top-level-keys)) |
| The experimental flag stays off | the process read a different `.dot-agent-deck.toml`, or the env var is set to something other than `1`/`true` | check the `experimental flag:` log line ([Turn on experimental features](#turn-on-experimental-features)) |
| The desktop app offers no orchestrations for a directory the TUI handles | the project file is a symlink, not a regular file, or over 1 MiB | make it a regular file under 1 MiB |
| `config set` lost a comment | `config set` rewrites the keys it manages, and a comment inside one of their tables goes with it | keep comments outside those tables, or edit the file by hand instead of using `config set` |
| Settings changes in the desktop app are not saved | `desktop.toml` cannot be read | read the **Settings** footer, then fix or remove the file |

For other problems, see [Troubleshooting](troubleshooting.md).
