Skip to content
Esc
↑↓navigate↵open⌘Jpreview
Start
On this page

Configuration

Configure the current Autohand Code CLI through one user config file, an optional project-local overlay, environment variables, and explicit command-line overrides.

Start with the settings UI

Run /settings in an interactive session or autohand --settings from a shell for common UI, agent, session, permission, network, telemetry, auto-mode, team, and search settings. Edit the config file directly for provider blocks, hooks, MCP servers, custom themes, extension providers, and advanced policy.

autohand --setup
autohand --settings
autohand config set ui.promptSuggestions false
autohand config set sessions.awareness coordinate
autohand --permissions

Configuration files and lookup

Autohand selects one user configuration source in this order:

  1. An explicit --config <path>
  2. The AUTOHAND_CONFIG environment variable
  3. $AUTOHAND_HOME/config.toml
  4. $AUTOHAND_HOME/config.yaml
  5. $AUTOHAND_HOME/config.yml
  6. $AUTOHAND_HOME/config.json

AUTOHAND_HOME defaults to ~/.autohand. Keep only one of the four standard config files in that directory; multiple formats are rejected instead of being merged. JSON is created with safe defaults on first run when no file exists.

Project-local overlay

When a workspace is known, Autohand also reads .autohand/settings.local.json. The overlay supports provider, model, agent, network, telemetry, and permissions. Those values override or merge with the user config for that workspace.

{
  "version": 1,
  "provider": "openrouter",
  "model": "anthropic/claude-sonnet-4",
  "agent": {
    "maxIterations": 80
  },
  "permissions": {
    "allowList": ["run_command:npm test", "run_command:npm run lint"],
    "denyList": ["run_command:npm publish"]
  }
}

Keep this file local when it contains personal approvals. Project-scoped extensions, agents, skills, hooks, and MCP servers have their own documented storage and lifecycle; do not place arbitrary top-level user config inside this overlay.

Effective precedence

Explicit CLI flags control the current process. For persistent settings, the project overlay is merged over the selected user config, then supported environment variables override API and provider fields. A selected --profile is layered next, and --set overrides are applied last. A feature-specific runtime flag such as --no-idle-logout, --offline, or --no-browser applies for that run.

Order, lowest first: config file, workspace .autohand overlays, environment variables, --profile, --set.

Profiles and one-run overrides

A profile is a partial config stored under profiles.<name> and selected with --profile <name>. --set key=value overrides one setting by dotted path; repeat it for several. Values are parsed as JSON when they parse (true, 50, ["a","b"]) and kept as text otherwise.

{
  "provider": "openrouter",
  "profiles": {
    "review": {
      "provider": "anthropic",
      "permissions": { "mode": "restricted" },
      "ui": { "showThinking": true }
    }
  }
}
autohand --profile review
autohand --set ui.theme=tuatara --set agent.maxIterations=50
autohand doctor --profile review --json
Key Type Default Description
profiles object Unset Map of profile name to a partial config. Only used when --profile <name> selects it.
profiles.<name> object Unset Any config keys except auth and profiles. Nested objects are applied leaf by leaf.

Profiles and --set exist for the run only. Nothing is written to the config file: a save during the run (for example from /model or /theme) restores the file’s own value for every layered path, unless you changed that setting during the run, in which case your change is kept. Neither layer can change auth or profiles. An unknown profile name stops startup and lists the defined profiles. A --set key must be a dotted path of letters, digits, - and _.

Complete working example

This example shows the main current sections without embedding real credentials. Remove sections you do not use and provide secrets through your normal local secret-management process.

{
  "provider": "openrouter",
  "openrouter": {
    "apiKey": "replace-locally",
    "model": "anthropic/claude-sonnet-4",
    "contextWindow": 200000
  },
  "workspace": {
    "defaultRoot": "/work/projects",
    "allowDangerousOps": false
  },
  "ui": {
    "theme": "aurora",
    "silentToolOutput": false,
    "showThinking": true,
    "renderMarkdown": true,
    "showTips": true,
    "taskListPosition": "above-composer",
    "enterWhileWorking": "select",
    "keybindingProfile": "autohand",
    "completionReportEnabled": true,
    "promptSuggestions": true,
    "activityVerbs": ["Indexing", "Reviewing", "Testing"],
    "activityVerbsEnabled": true,
    "activitySymbol": "✳",
    "statusLine": {
      "showProviderModel": true,
      "showContext": true,
      "showWorkspacePath": true,
      "showGitBranch": true,
      "showCommandHint": true,
      "showPullRequest": true,
      "showSessionLines": false,
      "showQueue": true,
      "showActiveStatus": true,
      "showActiveMetrics": true,
      "showCancelHint": true,
      "showModeLabel": true
    }
  },
  "agent": {
    "maxIterations": 100,
    "enableRequestQueue": true,
    "goalAutoMode": true,
    "idleLogoutEnabled": true,
    "idleTimeoutMs": 14400000,
    "sessionRetryLimit": 3,
    "sessionRetryDelay": 1000,
    "parallelToolConcurrency": 5,
    "toolSelectionCache": true,
    "autoMemory": true,
    "debug": false
  },
  "sessions": {
    "awareness": "warn"
  },
  "permissions": {
    "mode": "interactive",
    "allowList": ["run_command:git status --short"],
    "denyList": ["run_command:npm publish"],
    "rememberSession": true
  },
  "features": {
    "usageV2": false,
    "tokenUsageStatus": false,
    "slashGoal": false
  },
  "teams": {
    "enabled": true,
    "teammateMode": "auto",
    "maxTeammates": 5
  },
  "search": {
    "provider": "browser-profile"
  },
  "shell": {
    "env": {
      "inherit": "all",
      "exclude": ["*_TOKEN"]
    }
  },
  "mcp": {
    "enabled": true,
    "servers": []
  },
  "hooks": {
    "enabled": true,
    "hooks": []
  },
  "telemetry": {
    "enabled": false
  },
  "autoReport": {
    "enabled": true
  },
  "sync": {
    "enabled": true,
    "interval": 300000,
    "exclude": [],
    "includeTelemetry": false,
    "includeFeedback": false
  }
}

Top-level keys

Key Purpose
provider Active built-in, custom, or trusted extension provider.
autohandai, openrouter, anthropic, ollama, llamacpp, openai, mlx, llmgateway, azure, zai, sakana, vertexai, xai, cerebras, nvidia, deepseek, bedrock Built-in provider-specific settings.
customProviders User-defined OpenAI-compatible endpoints selected as custom:<id>.
extensionProviders Settings owned by a trusted runtime provider selected as extension:<id>.
workspace Default root and dangerous-operation preference.
ui Theme, terminal output, activity, notification, prompt, and status-line behavior.
agent Iteration, queue, retry, parallelism, memory, and idle-session behavior.
sessions Concurrent-session awareness for the same workspace.
permissions Permission mode, allow/deny policy, rules, and decision caching.
network Retry, timeout, and retry-delay values.
shell Environment inherited by commands Autohand launches (shell.env).
profiles Named partial configs layered for one run with --profile <name>.
externalAgents Discovery of configured external agent directories.
api, auth Autohand service endpoint, account state, and bare-mode API-key helper.
communitySkills Community skill discovery, suggestions, and backup.
hooks Configured shell lifecycle hooks.
automode Autonomous-loop limits, checkpoints, worktree behavior, and circuit breakers.
share, sync Session sharing and cross-device settings/data sync.
telemetry, autoReport Opt-in telemetry and opt-out operational error reporting.
features Local experimental flags and opt-outs for eligible remote flags.
search Web-search provider and provider-specific API keys.
mcp MCP enablement and server definitions.
teams Multi-agent team enablement, display mode, and concurrency.
chrome Browser bridge settings. The config key remains chrome; the public command is /browser.

Provider settings

Set the top-level provider to the provider Autohand should use. Common provider fields are model, apiKey, baseUrl, port, contextWindow, and reasoningEffort. Provider-specific integrations add fields such as Azure deployment/authentication data, Vertex project and region, xAI OAuth state, NVIDIA chat-template options, or Bedrock region and API mode.

Provider value Notes
openrouter Default provider; requires an API key and model.
ollama, llamacpp, mlx Local server providers; configure model and optional base URL or port.
openai API-key or ChatGPT authentication.
azure, vertexai, bedrock Cloud-platform provider settings and platform credentials.
anthropic, llmgateway, zai, sakana, xai, cerebras, nvidia, deepseek Direct provider integrations.
autohandai Autohand Cloud or Apple Silicon local plan; hidden unless features.autohand_inference is enabled.
custom:<id> A configured OpenAI-compatible endpoint from customProviders.
extension:<id> A provider registered by an installed, enabled, trusted runtime extension.

Custom OpenAI-compatible providers

{
  "provider": "custom:company-gateway",
  "customProviders": {
    "company-gateway": {
      "id": "company-gateway",
      "displayName": "Company Gateway",
      "apiFormat": "openai-compatible",
      "baseUrl": "https://models.example.com/v1",
      "apiKey": "replace-locally",
      "apiKeyRequired": true,
      "model": "company-code",
      "contextWindow": 131072,
      "models": [
        {
          "id": "company-code",
          "label": "Company Code",
          "contextWindow": 131072,
          "reasoningEffort": "high"
        }
      ]
    }
  }
}

The object key and its id must match. apiFormat is currently openai-compatible. Set disabled to hide the provider without deleting its saved settings.

Field Type Required Default Description
id string Yes None Stable provider id. Must match the object key; selected as custom:<id>.
displayName string Yes None Name shown in /model and provider settings.
apiFormat string Yes None Must be openai-compatible.
baseUrl string Yes None Endpoint root such as https://api.example.com/v1.
apiKey string When apiKeyRequired is true None Bearer token sent to the endpoint.
apiKeyRequired boolean No true Set false for local or already-authenticated gateways and omit apiKey.
model string Yes None Active model id.
contextWindow number No Detected Context window used for token budgeting and status.
reasoningEffort string No Unset none, low, medium, high, or xhigh.
models array No Unset Picker entries with id, optional label, contextWindow, and reasoningEffort.
disabled boolean No false Hide the provider from selection without deleting its settings.

Add a provider from /model

Run /model and choose New provider… at the end of the custom provider group. Autohand prompts for:

  1. A display name. The provider id is derived from it and kept when you edit an existing provider.
  2. The base URL, which must start with http:// or https://. A trailing slash is removed.
  3. Whether the endpoint requires an API key, then the key (optional when not required).
  4. The model id.
  5. An optional context window (a positive number).
  6. Whether to set a reasoning effort, and which level.

Before saving, Autohand calls <baseUrl>/models with the key as a bearer token. The provider is saved and selected only when that request succeeds and, if the endpoint returns a model list, the list contains your model id. Otherwise Autohand prints the HTTP status or the available model ids and saves nothing.

OpenAI ChatGPT sign-in

The openai block supports authMode of api-key (default) or chatgpt. In chatgpt mode Autohand signs in with your ChatGPT account and stores the resulting tokens under openai.chatgptAuth; you do not write this object by hand.

Field Type Description
openai.authMode "api-key" or "chatgpt" Authentication mode. Defaults to api-key.
openai.chatgptAuth.accessToken string Access token written by the sign-in flow. Required in chatgpt mode.
openai.chatgptAuth.accountId string ChatGPT account id. Required in chatgpt mode.
openai.chatgptAuth.refreshToken, idToken, expiresAt, lastRefresh string Optional token metadata maintained by the CLI.

Treat chatgptAuth as a credential: keep it out of repositories and shared config. Browser sign-in uses a temporary local callback listener; see Required ports and agent transports.

Trusted extension providers

{
  "provider": "extension:company-release",
  "extensionProviders": {
    "extension:company-release": {
      "model": "release-model",
      "apiKey": "replace-locally",
      "baseUrl": "https://models.example.com"
    }
  }
}

The extension controls additional fields, but every provider entry requires a non-empty model. The matching extension must be installed, enabled, trusted, and successfully activated. See Extension API v1.

Model catalog

Autohand Code CLI ships a bundled model catalog and can layer newer model definitions over it without a CLI release. The remote catalog is published at:

https://code.autohand.ai/cli/models.json

At startup, after the first screen is drawn, Autohand refreshes the remote catalog when the last successful check is at least four hours old. A failed check waits 15 minutes before retrying. Network, HTTP, validation, and write errors never stop the CLI from starting; the previous valid cache is kept.

Model definitions are merged by provider and model id, highest priority first:

  1. ~/.autohand/models.json, or the file named by AUTOHAND_MODELS_CATALOG
  2. The last valid downloaded catalog at ~/.autohand/model-catalog/models.json
  3. The catalog bundled with the installed CLI

Paths follow AUTOHAND_HOME when it is set.

An entry with cliSupported: false stays in the catalog, but CLI model pickers, team assignments, ACP, and RPC model discovery leave it out.

# Refresh now (either alias); skips the four-hour wait
autohand update --models
autohand upgrade --models

# Skip startup network refreshes
autohand --offline
AUTOHAND_OFFLINE=1 autohand

--models cannot be combined with --check. AUTOHAND_OFFLINE accepts 1, true, yes, or on. AUTOHAND_MODELS_URL points the updater at a different endpoint for development or controlled rollouts. Remote responses must be JSON, at most 5 MiB, and contain complete model records; the updater uses ETags and writes the cache atomically with owner-only permissions.

UI settings

Field Default Description
theme "aurora" Built-in, Ghostty, file-based, or inline custom theme name. See Themes.
customThemes {} Inline theme definitions keyed by name.
autoConfirm false Skip confirmation for operations already considered safe; it does not override immutable security.
readFileCharLimit 300 Terminal display limit for read/find output; full output remains available to the model.
silentToolOutput false Hide tool-output blocks without removing their transcript/model context.
taskListPosition "above-composer" up places the live task list above the working status line; above-composer keeps it directly above the composer.
showCompletionNotification true Show an OS notification when work completes.
completionReportEnabled true Ask for a concise completion report after action turns.
showThinking false Display returned model thinking/reasoning blocks.
renderMarkdown true Render assistant markdown (headings, lists, code, tables) in the terminal. Set false to show it as written.
showTips true Rotate tips about slash commands, composer triggers, and shortcuts beside the idle composer.
enterWhileWorking "select" Enter behavior while a turn runs. See Composer input while working.
mouseComposerCursor On, except iTerm2 Click-to-position editing in the composer. Leave unset for the per-terminal default.
keybindingProfile "autohand" Composer shortcut profile: autohand, claude-code, codex, cursor, antigravity, devin, or factory.
statusLine All on except showSessionLines Composer status-line fields. See Status line.
terminalBell true Ring the terminal bell on completion.
checkForUpdates true Check for CLI releases on startup.
updateCheckInterval 24 Hours between update checks.
activityVerbs Built-in pool One fixed string or a non-empty string array for the working indicator.
activityVerbsEnabled true Rotate activity labels; when false, show Working....
activitySymbol "✳" Symbol before the working label.
locale Detected Display locale such as en, fr, or ja.
notifications true Boolean or { enabled, title, sound } native-notification settings.
promptSuggestions true Show generated next-step suggestions in the prompt placeholder.
useInkRenderer Ignored Deprecated. Ink 7 + React 19 is the interactive renderer.

Themes

New configs use aurora. Built-in theme names:

Theme Notes
aurora Default. Charcoal surfaces, periwinkle focus, mint/rose/amber status colors.
tuatara Lichen green focus, warm stone text, clay red errors.
dark Base dark palette; custom themes inherit missing tokens from it.
light Light palette.
dracula, sandy, tui, github-dark Alternative palettes.
cappadocia, rio, australia Alternative palettes. The legacy names turkey and brazil still load as aliases for cappadocia and rio.

Pick one with /theme, set ui.theme, or try one for a single run with --set ui.theme=tuatara. Custom themes can be defined inline under ui.customThemes or as JSON files in ~/.autohand/themes/, and Ghostty theme names are also accepted.

{
  "ui": {
    "theme": "company",
    "customThemes": {
      "company": {
        "vars": { "brand": "#7c3aed" },
        "colors": { "accent": "brand", "mdHeading": "brand" }
      }
    }
  }
}

Composer input while working

enterWhileWorking Enter Shift+Enter
select (default) Queues the draft. Select a queued message with the arrow keys and submit it to steer. Newline, or saves an edited queued message.
steer Sends the draft to the running turn immediately. Queues the draft.
queue Queues the draft. Sends the draft to the running turn immediately.

Shell (!), slash, and :peer inputs run immediately regardless of this setting.

Status line

Every ui.statusLine field is a boolean that defaults to true except showSessionLines, which defaults to false.

Field Default Controls
showProviderModel true Provider and model.
showContext true Remaining context percentage.
showWorkspacePath true Current workspace path.
showGitBranch true Branch or worktree label.
showCommandHint true Composer hints for commands, mentions, skills, and shell entry.
showPullRequest true Associated pull request number.
showSessionLines false Lines added and removed in the current session.
showQueue true Queued request count.
showActiveStatus true Current turn status while the agent works.
showActiveMetrics true Elapsed time and token metrics while the agent works.
showCancelHint true Escape-key cancellation hint while the agent works.
showModeLabel true Mode word (PLAN, YOLO, AUTO) next to the mode glyph in the help line.

Use /statusline for the interactive editor.

Agent and concurrent-session settings

Field Default Description
agent.maxIterations 100 Maximum tool iterations for one request.
agent.enableRequestQueue true Allow follow-up input while an active turn runs.
agent.goalAutoMode true Switch an interactive session into auto mode while a /goal is active. Set false to keep the current interaction mode. Non-interactive runs never switch.
agent.idleLogoutEnabled true Log out an authenticated interactive session after inactivity.
agent.idleTimeoutMs 14400000 Positive idle duration in milliseconds before logout (4 hours).
agent.sessionRetryLimit 3 Maximum session-level retries.
agent.sessionRetryDelay 1000 Delay between retries in milliseconds.
agent.parallelToolConcurrency 5 Maximum parallel tool calls; use 1 for sequential execution.
agent.toolSelectionCache true Cache local tool-schema selection for equivalent turns.
agent.autoMemory true Persist durable, evidence-backed lessons after successful, failed, and cancelled interactive turns.
agent.debug false Enable verbose internal logging.
sessions.awareness "warn" How this session reacts to other live sessions in the same workspace.
Awareness mode Behavior
passive Publish presence and expose peer status without proactive warnings.
warn Warn about overlapping sessions and repository drift.
coordinate Add coordination claims so concurrent agents can see active work ownership.
{
  "agent": {
    "autoMemory": true,
    "idleLogoutEnabled": true,
    "idleTimeoutMs": 7200000
  },
  "sessions": {
    "awareness": "coordinate"
  }
}

Use --no-idle-logout for one long-running process without changing the saved config. Run autohand agents --once to print the live local agent/session snapshot.

Permission settings

Autohand’s immutable security checks run before configurable policy. Configuration can narrow or approve supported actions, but it cannot override the immutable blacklist.

{
  "permissions": {
    "mode": "interactive",
    "allowList": [
      "run_command:git status --short",
      "run_command:npm test"
    ],
    "denyList": [
      "run_command:npm publish"
    ],
    "rules": [
      {
        "tool": "run_command",
        "pattern": "git diff *",
        "action": "allow"
      }
    ],
    "rememberSession": true
  }
}
Field Description
mode interactive, unrestricted, restricted, or programmatic external.
allowList Canonical exact or glob-like tool/context entries that do not require another prompt.
denyList Canonical entries that are always denied.
whitelist, blacklist Deprecated compatibility aliases for allowList and denyList.
rules Objects with tool, optional pattern, and action of allow, deny, or prompt.
rememberSession Cache approval decisions for the current session; defaults to true.
allowPatterns, denyPatterns Structured tool patterns with kind and optional argument.
availableTools, excludedTools Structured allow-only and deny tool filters.
allPathsAllowed, allUrlsAllowed Approve file-path or URL-fetching tool classes after higher-priority denials.

Use /permissions or autohand --permissions to inspect the effective user, project, and session policy. Saved “always” decisions may be written to user or project scope; keep project-local approvals reviewable.

Workspace safety

At startup, before sign-in, Autohand checks the workspace directory and refuses to run in locations where an agent could affect far more than one project. It prints an Unsafe Workspace Directory warning and exits with a non-zero code.

Category Blocked locations
Filesystem roots /, and Windows drive roots such as C:\
Home directories Your home directory itself, and its parents such as /Users or /home; C:\Users and C:\Users\<name>
Unix and Linux /etc, /var, /usr, /opt, /bin, /sbin, /lib, /lib64, /root, /sys, /proc, /dev, /boot, /run, /snap
macOS /System, /Library, /Applications, /private, /cores, /Volumes
Windows C:\Windows, C:\Program Files, C:\Program Files (x86), C:\ProgramData, their subdirectories, the same paths on other drives, and the SystemRoot/windir directory
WSL Windows drive mounts such as /mnt/c, plus /mnt/c/Users, /mnt/c/Users/<name>, and /mnt/c/Windows

Unix and macOS system paths are matched exactly, so a project under /usr/local/src/app or a subdirectory of your home directory is allowed. Windows system paths also block their subdirectories and are compared case-insensitively. Paths are resolved before the check, including trailing slashes, .. segments, and symlinks.

# Blocked
cd ~ && autohand
autohand --path /
autohand --path /etc

# Allowed
cd ~/projects/my-app && autohand
autohand --path ~/projects/my-app

Features and experiments

Use autohand experiments list or /experiments to see the effective feature state. Local flags persist to their config path. Eligible server-controlled flags may be turned off locally through features.remoteOverrides, but a local config cannot force on a server-disabled remote flag.

Feature id Config path Default
mcp mcp.enabled On
hooks hooks.enabled On
teams teams.enabled On
community_skills communitySkills.enabled On
prompt_suggestions ui.promptSuggestions On
request_queue agent.enableRequestQueue On
thinking_display ui.showThinking On
completion_notifications ui.showCompletionNotification On
terminal_bell ui.terminalBell On
tool_selection_cache agent.toolSelectionCache On
usage_v2 features.usageV2 Off
cli_usage_v2 features.cliUsageV2 On
aws_bedrock_provider features.awsBedrockProvider On; restart required
slash_goal features.slashGoal Off
token_usage_status features.tokenUsageStatus Off
experimental_fork features.experimentalFork Off
experimental_clone features.experimentalClone Off
experimental_handoff features.experimentalHandoff Off
chrome_integration chrome.enabledByDefault Off; restart required
telemetry telemetry.enabled Off
autohand experiments list
autohand experiments status token_usage_status
autohand experiments enable token_usage_status
autohand experiments disable token_usage_status
autohand experiments refresh

Autohand inference rollout flag

features.autohand_inference separately gates the Autohand Cloud/local provider, setup choices, model discovery, RPC, and ACP surfaces. It is off unless deliberately enabled in config or with AUTOHAND_FEATURE_AUTOHAND_INFERENCE=1 (also accepted in AUTOHAND_FEATURES).

Auto-mode and teams

Auto-mode field Default Description
maxIterations 50 Maximum autonomous-loop iterations.
maxRuntime 120 Maximum runtime in minutes.
maxCost 10 Maximum estimated API cost in dollars.
checkpointInterval 5 Iterations between Git checkpoints.
completionPromise "DONE" Completion marker.
useWorktree true Use an isolated Git worktree by default.
noProgressThreshold 3 No-change circuit breaker.
sameErrorThreshold 5 Repeated-error circuit breaker.
testOnlyThreshold 3 Repeated test-only iteration breaker.
sameFileThreshold 3 Repeated same-file-only iteration breaker.
Team field Default Description
enabled true Enable team commands and teammate execution.
teammateMode "auto" auto, in-process, or tmux display/execution mode.
maxTeammates 5 Maximum simultaneous teammates.

Local peer communication

Communication is independent of sessions.awareness and defaults off. Enable it to address other local sessions and published workers with the : composer or peer tools. Peer communication uses local Unix-domain sockets on macOS/Linux and requires no TCP or UDP port. See Required Ports and Agent Transports for agent IPC, local model servers, browser integration, and optional HTTP listeners.

{
  "sessions": {
    "communication": {
      "enabled": true,
      "scope": "workspace",
      "idleBehavior": "notify",
      "alias": "builder"
    }
  }
}
Option Default Behavior
enabled false Start authenticated local IPC and peer tools.
scope workspace Maximum authorized scope: workspace, repository, or machine. Both peer policies must allow it.
idleBehavior notify Notify while idle; auto explicitly allows peer-triggered turns within existing budgets.
alias Generated Up to 64 letters, digits, dashes and underscores; starts with a letter.
coordinationDirectory AUTOHAND_HOME Shared discovery/resource namespace; private inboxes stay in each profile.
allowResourceControl false Permit explicit controller policy installation and resource grants.
resourceWaitTimeoutMs 300000 Maximum parked command-admission wait.
limits Built-in bounded limits Positive integer overrides documented in the protocol reference.

Use /peers list workspace, /peers list repository, or /peers list machine to choose a directory. The listing includes your own ID for controller setup. /peers send, /peers inbox, /peers reply, and /peers status expose delivery without requiring the user to relay model-to-model messages. Leading :peer message sends immediately; an inline selected :peer supplies an exact reference to the local model.

See the user guide, resource coordination, the technical reference, and the two-session lab. The Unix IPC adapter is implemented for macOS/Linux. Windows communication remains unavailable until private pipe and process-job adapters are implemented; keep communication disabled there. Changing auto-confirmation never bypasses an enabled resource policy.

Required ports and agent transports

Autohand Code has no single required inbound TCP port. Normal cloud inference uses outbound HTTPS, usually TCP 443. Local agent communication does not open a TCP listener. Additional ports depend on the provider and optional features you enable. The network settings above control retries and timeouts; they do not configure a listener, peer port, or firewall rule.

Feature Connection and default port Configuration and when it is needed
Peer messages, discovery queries, receipts, and resource coordination Local Unix-domain sockets; no TCP/UDP port Opt in with sessions.communication.enabled. Each root session owns a private socket, normally under <coordinationDirectory>/peer-runtime/; the directory defaults to AUTOHAND_HOME. Long paths use a verified private temporary directory. There is no sessions.communication.port setting.
In-process subagents and teammate communication In-process calls or parent/child stdio; no TCP/UDP port Workers use their owning root’s peer runtime. Running more agents does not require allocating a port per agent. Their model requests still use the selected provider’s connection.
RPC and ACP agent interfaces JSON messages over stdin/stdout; no TCP/UDP port The embedding application launches the CLI and owns its stdio pipes. These modes do not start an HTTP or WebSocket server.
MCP tools over stdio Child-process stdin/stdout; no CLI transport port Configure mcp.servers[].command and args. A tool server may make its own network connections.
MCP tools over http or sse Outbound to mcp.servers[].url; HTTPS 443, HTTP 80, or the explicit URL port Autohand is the client. A local MCP server must already listen on the port in its URL; there is no fixed Autohand MCP listener.
Cloud inference, account sign-in/sync, downloads, and enabled online services Outbound HTTPS, normally TCP 443 Use the selected provider’s baseUrl and the relevant service URL. api.baseUrl / AUTOHAND_API_URL select the account API; AUTOHAND_AUTH_URL selects the sign-in origin. Custom URLs can use other ports.
Ollama CLI connects to http://localhost:11434; TCP 11434 ollama.baseUrl, or ollama.port when no explicit base URL is set. Only required when using that server.
llama.cpp server CLI connects to http://localhost:8080; TCP 8080 llamacpp.baseUrl, or llamacpp.port when no explicit base URL is set. Setup can discover an existing server on another port, including 80.
MLX server CLI connects to http://localhost:8080; TCP 8080 mlx.baseUrl, or mlx.port when no explicit base URL is set. The server must use the same address and port.
Autohand AI Local Local model server, normally http://127.0.0.1:8080; TCP 8080 autohandai.baseUrl and autohandai.port. Setup may start the chosen model on the next port, normally 8081, if a reachable server is serving another model; it saves the resulting endpoint.
OpenAI ChatGPT browser sign-in Temporary callback listener on 127.0.0.1:1455; TCP 1455 If occupied, the CLI asks the OS for a free port. The browser uses the actual http://localhost:<port>/auth/callback redirect. No public inbound rule is needed; the listener closes after sign-in or failure. Device-code sign-in does not use this listener.
autohand review serve HTTP listener on 127.0.0.1; OS-assigned port by default --port 0 selects a free port; --port <1–65535> selects a fixed one. Use the URL printed by the command. The host stays loopback-only.
Chrome extension / native messaging bridge Native messaging and local IPC; no fixed TCP port chrome settings and --browser enable the integration. This is separate from the browser-profile search fallback below.
Browser-profile search’s headless Chrome fallback Browser debugging TCP port randomly selected from 9222–10221 Used when this fallback launches Chrome with --remote-debugging-port. There is no CLI setting to pin that port. It is unrelated to agent messaging; the browser also needs outbound access to the search site.
Optional Squad runtime Separate runtime; CLI fallback URL is http://127.0.0.1:19821 Check the separate runtime’s status for its actual listener. /squad forwards --host and --port; AUTOHAND_SQUAD_FIXED_PORT is passed through runtime configuration. Core CLI peer messaging does not depend on Squad or port 19821.

Peer communication across sessions and profiles

Peers communicate on the same machine, under the same OS user. The workspace, repository, and machine scopes control which local peers can discover and address each other; machine does not enable LAN or cross-host communication. No router forwarding, public inbound rule, or reserved TCP port is required for peers.

Profiles using different AUTOHAND_HOME directories must set the same sessions.communication.coordinationDirectory to discover one another. Each profile retains its private inbox in its own home. The runtime requires a private local directory and access to its Unix sockets; a shared network folder or opened firewall port does not create cross-host peer support. Windows peer communication is currently unavailable.

Choosing ports and diagnosing conflicts

For a local provider, an explicit baseUrl takes precedence over the provider’s port. Change the server’s listening port and the matching CLI URL together. For example, after starting Ollama on port 11435, use:

{
  "provider": "ollama",
  "ollama": {
    "baseUrl": "http://127.0.0.1:11435",
    "model": "your-installed-model"
  },
  "sessions": {
    "communication": {
      "enabled": true,
      "scope": "workspace"
    }
  }
}

For a predictable review URL, run autohand review serve --port 4173. If that port is occupied, choose another or use --port 0. Local providers that default to 8080 need distinct ports when running as separate servers at the same time. Optional local listeners should remain reachable only where you intend to use them.

On macOS/Linux, lsof -nP -iTCP:11434 -sTCP:LISTEN identifies the process listening on a model port; substitute the port you are diagnosing. For peer failures, use /peers list and check communication enablement, scope, the shared coordination directory, and socket permissions instead of opening a TCP port. Project dev servers, hooks, external tools, and third-party MCP servers can need additional ports defined by those programs. --offline suppresses startup network refreshes; it is not a firewall and does not force a cloud provider or tool to run locally.

Network, search, telemetry, and reporting

Field Default Description
network.maxRetries 3 Maximum request retries, capped at five where enforced.
network.timeout 30000 Request timeout in milliseconds.
network.retryDelay 1000 Delay between retries in milliseconds.
search.provider "browser-profile" browser-profile, exa, google, brave, duckduckgo, or parallel.
search.braveApiKey Unset Brave Search API key; falls back to BRAVE_SEARCH_API_KEY.
search.parallelApiKey Unset Parallel API key; falls back to PARALLEL_API_KEY.
search.exaApiKey Unset Exa API key; falls back to EXA_API_KEY.
telemetry.enabled false Opt in to product telemetry.
telemetry.apiBaseUrl Autohand API Telemetry endpoint override.
telemetry.enableSessionSync true when telemetry is active Enable session sync in the telemetry client.
telemetry.companySecret Unset Company API authentication value.
autoReport.enabled true Opt out of automatic operational-error reports by setting false.

--offline disables startup network operations such as model-catalog and feature/announcement refreshes while preserving useful cached local state.

The web_search tool uses one provider at a time. browser-profile is the default and needs no API key.

Provider API key Behavior
browser-profile None Searches through the connected Chromium browser and its current profile, or a local Chrome/Chromium install. Falls back to google when neither is available.
google None Search through local headless Chrome.
brave search.braveApiKey or BRAVE_SEARCH_API_KEY Brave Search API. Keys from brave.com/search/api.
parallel search.parallelApiKey or PARALLEL_API_KEY Parallel search API. Keys from platform.parallel.ai.
exa search.exaApiKey or EXA_API_KEY Exa search API.
duckduckgo None Often rate-limited or challenged with a CAPTCHA.

Resolution order:

  1. The provider: --search-engine <provider> for this run, then search.provider, then browser-profile.
  2. The API key: the search.*ApiKey value in config, then the matching environment variable.

Set up a keyed provider with /search (select the provider and enter the key), in the config file, or through the environment:

export BRAVE_SEARCH_API_KEY=your-brave-key
autohand --search-engine brave
{
  "search": {
    "provider": "parallel",
    "parallelApiKey": "replace-locally"
  }
}

Troubleshooting:

  • web_search is not offered to the model. The selected provider cannot run: a keyed provider has no key, duckduckgo is selected, or browser-profile has no connected browser and no local Chrome. Configure a key or pick another provider. fetch_url and repository tools stay available.
  • “Brave Search requires an API key” or “Parallel.ai Search requires an API key”. Set the key with /search, the config field, or the environment variable above.
  • DuckDuckGo CAPTCHA or timeouts. Switch to browser-profile, brave, or parallel.
  • Check the current state with /search, which shows the active provider and which keys are set.

Keys stored in the config file are plain text. Prefer environment variables in shared or CI environments, and never commit keys.

Shell environment

shell.env controls which environment variables reach commands Autohand launches: run_command, ! terminal commands, interactive shells, hook commands, and stdio MCP server processes.

{
  "shell": {
    "env": {
      "inherit": "essential",
      "include": ["NODE_*", "NVM_DIR"],
      "exclude": ["*_TOKEN", "AWS_*"],
      "set": { "CI": "1" }
    }
  }
}
Field Type Default Description
shell.env.inherit "all", "essential", or "none" "all" all passes the parent environment; essential keeps PATH, HOME, USER, SHELL, temp-directory, locale, terminal, and SSH_AUTH_SOCK variables plus Windows system equivalents; none starts empty.
shell.env.include string[] [] Names or globs added back on top of the inherited set.
shell.env.exclude string[] [] Names or globs removed after inheritance and includes.
shell.env.set object {} Fixed string values applied last.

AUTOHAND_* variables are always passed and cannot be excluded, and Autohand sets AUTOHAND_CLI, AUTOHAND_HOME, and CODEX_HOME for child processes. A server’s own mcp.servers[].env and explicit per-command overrides still win over the policy.

MCP and hooks

MCP servers

{
  "mcp": {
    "enabled": true,
    "servers": [
      {
        "name": "repository-tools",
        "transport": "stdio",
        "command": "npx",
        "args": ["-y", "@company/repository-mcp"],
        "env": {
          "LOG_LEVEL": "warn"
        },
        "autoConnect": true
      },
      {
        "name": "remote-tools",
        "transport": "http",
        "url": "https://mcp.example.com/mcp",
        "headers": {
          "Authorization": "Bearer replace-locally"
        },
        "autoConnect": true
      }
    ]
  }
}

A server requires name and transport. stdio requires command; http and sse require url. Optional fields are args, env, headers, autoConnect (default true), and stdioFraming.

stdioFraming sets JSON-RPC message framing for stdio servers: content-length or newline. When unset, Autohand tries content-length and retries with newline when that first attempt fails in a retryable way; npx mcp-remote bridges default to newline. Set it explicitly for a server that only speaks newline-delimited JSON to skip the retry. Manage servers with autohand mcp or /mcp. See MCP servers.

Lifecycle hooks

{
  "hooks": {
    "enabled": true,
    "hooks": [
      {
        "event": "post-tool",
        "command": "./scripts/record-tool-result.sh",
        "description": "Record completed tool calls",
        "enabled": true,
        "timeout": 5000,
        "async": false,
        "filter": {
          "tool": ["run_command"]
        }
      }
    ]
  }
}

Each definition requires event and command. It may also set description, enabled, timeout, async, matcher, and a tool/path filter. Current events cover tool, prompt, response, file, session, permission, notification, sub-agent, auto-mode, auto-research, learning, goals, teams, review, mode, and context lifecycles. See Hooks and events for the event payload and control-flow contract.

Authentication, community skills, sharing, and sync

Section Fields
auth token, user, expiresAt, and apiKeyHelper. The helper prints an explicit API key for bare mode.
api baseUrl and companySecret; environment overrides are preferred for deployment-specific values.
communitySkills enabled, showSuggestionsOnStartup, and autoBackup; each defaults to true.
share enabled; defaults to true for the /share surface.
sync enabled, interval in milliseconds, glob exclude, includeTelemetry, and includeFeedback.
externalAgents enabled and an array of directory paths.
{
  "communitySkills": {
    "enabled": true,
    "showSuggestionsOnStartup": true,
    "autoBackup": true
  },
  "share": {
    "enabled": false
  },
  "sync": {
    "enabled": true,
    "interval": 300000,
    "exclude": ["temp/*"],
    "includeTelemetry": false,
    "includeFeedback": false
  },
  "externalAgents": {
    "enabled": true,
    "paths": ["/work/shared-agents"]
  }
}

Sync handles canonical memory event logs by event id instead of overwriting one device’s history with another. Derived memory caches and locks are not synced. Sensitive config fields are encrypted for account sync, but you should still avoid committing secrets to a repository.

Browser integration

The historical config object remains chrome for compatibility. The public CLI and slash-command surface is browser-neutral: --browser, --no-browser, and /browser. The older --chrome aliases remain hidden compatibility inputs.

{
  "chrome": {
    "extensionId": "installed-extension-id",
    "browser": "auto",
    "userDataDir": "/path/to/browser/user-data",
    "profileDirectory": "Default",
    "installUrl": "https://autohand.ai/chrome",
    "enabledByDefault": false
  }
}
Field Description
extensionId Installed extension id for direct handoff.
browser auto, chrome, chromium, brave, or edge.
userDataDir Browser user-data root.
profileDirectory Profile directory such as Default or Profile 1.
installUrl Fallback install/continue URL.
enabledByDefault Start the bridge with the CLI; defaults to false.

Environment variables

Variable Purpose
AUTOHAND_HOME Base directory for user config, extensions, agents, skills, sessions, memory, and caches.
AUTOHAND_CONFIG Explicit config path when --config is not supplied.
AUTOHAND_PROVIDER Select the provider for this process, overriding global and workspace selection. An unsupported value fails startup.
AUTOHAND_MODELS_CATALOG Local model-catalog override file; defaults to $AUTOHAND_HOME/models.json. See Model catalog.
AUTOHAND_MODELS_URL Remote model-catalog endpoint; defaults to https://code.autohand.ai/cli/models.json.
AUTOHAND_OFFLINE 1, true, yes, or on skips the startup model-catalog refresh, like --offline does for that refresh.
AUTOHAND_DISABLE_STATEFUL_READ 1 turns off every read-state experiment (features.readStateLedger, readStateDedup, readBeforeWrite) regardless of config.
AUTOHAND_CLIENT_NAME Client identifier recorded in session metadata and error reports; defaults to terminal. ACP mode sets acp; editor integrations may set their own name.
AUTOHAND_CLIENT_VERSION Client version recorded in session metadata, set by editor integrations.
BRAVE_SEARCH_API_KEY, PARALLEL_API_KEY, EXA_API_KEY Web search keys used when the matching search.*ApiKey is unset.
AUTOHAND_API_URL Autohand API base URL; overrides api.baseUrl.
AUTOHAND_AUTH_URL Sign-in and account-sync origin.
AUTOHAND_SECRET Company secret; overrides api.companySecret.
AUTOHAND_API_KEY Explicit Autohand API key, including bare-mode authentication.
AUTOHAND_AI_PLAN, AUTOHAND_AI_API_KEY, AUTOHAND_AI_BASE_URL Autohand AI provider overrides when the rollout flag is enabled.
AUTOHAND_FEATURE_AUTOHAND_INFERENCE, AUTOHAND_FEATURES Enable the gated Autohand inference surface.
AZURE_OPENAI_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENT, AZURE_OPENAI_API_VERSION Azure OpenAI overrides.
AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET Azure Entra/service-principal authentication.
AWS_REGION, AWS_DEFAULT_REGION Bedrock region fallback.
AUTOHAND_PERMISSION_CALLBACK_URL, AUTOHAND_PERMISSION_CALLBACK_TIMEOUT Experimental external permission callback.
AUTOHAND_NON_INTERACTIVE, AUTOHAND_YES Non-interactive and auto-confirm runtime controls.
AUTOHAND_NO_BANNER, AUTOHAND_STREAM_TOOL_OUTPUT, AUTOHAND_DEBUG Terminal and diagnostic controls.
AUTOHAND_THINKING_LEVEL none, normal, or extended reasoning depth.
AUTOHAND_CODE_SIMPLE Enable bare mode without --bare.
AUTOHAND_SKIP_UPDATE_CHECK Skip startup release checks.

Runtime-only controls

Some current CLI capabilities intentionally do not persist as config:

Control Contract
--bare Minimal startup: disables ambient hooks, LSP, plugin sync/loading, attribution, auto-memory, background prefetches, keychain/browser login fallback, AGENTS.md discovery, telemetry/reporting/sync, and slash commands. Explicit extensions, MCP config, agents, plugin directories, system prompts, and added directories remain available through their normal explicit inputs.
--offline Suppress startup network refreshes while retaining local/cached state.
--output-format stream-json One JSON object per command lifecycle event for a one-shot prompt.
--json stream Alias for streamed JSON Lines.
--json local One final machine-readable result object.
--no-idle-logout Disable idle logout for this process.
--profile <name> Layer profiles.<name> over the loaded config for this run.
--set key=value Override one dotted config path for this run; repeatable.
--browser, --no-browser Enable or disable browser integration for the current run.

Structured output requires a one-shot prompt. --output-format stream-json cannot be combined with --json local.

Uninstall

Use the command that matches how you installed Autohand Code CLI.

npm

npm uninstall -g autohand-cli

Homebrew

brew uninstall autohand-code

Shell installer

Delete the autohand binary from ~/.local/bin, or from the directory you set with AUTOHAND_INSTALL_DIR. Running the installer as root uses /usr/local/bin. If you installed the ahtraces companion, delete its binary from the same directory too.

PowerShell installer

Delete the installed files from $env:LOCALAPPDATA\autohand, or from your custom -InstallDir or AUTOHAND_INSTALL_DIR directory: autohand.exe, ahtraces.exe and the autohand-code.cmd, agent.cmd and ah.cmd launchers. You can also remove that directory from your user PATH in Windows Environment Variables.

Your settings, memory and local sessions are stored in ~/.autohand (%USERPROFILE%\.autohand on Windows), or in AUTOHAND_HOME if you set it. Keep this folder to reuse them after reinstalling, or delete it to remove that local data.

Last updated on

Was this helpful?

Send Feedback

Help us improve this documentation page. Your feedback is valuable.

We'll only contact you if we need clarification