Overview

Autohand offers a variety of settings to configure its behavior. You can configure Autohand by running the /config command in interactive mode, which opens a settings interface where you can view status information and modify configuration options.

Settings files

The settings.json file is the primary mechanism for configuring Autohand through hierarchical settings:

  • User settings are defined in ~/.autohand/settings.json and apply to all projects.
  • Project settings are saved in your project directory:
    • .autohand/settings.json for settings checked into source control and shared with your team
    • .autohand/settings.local.json for settings that are not checked in, useful for personal preferences and experimentation. Autohand will configure git to ignore this file when created.
  • For enterprise deployments, managed policy settings take precedence over user and project settings. System administrators can deploy policies to:
    • macOS: /Library/Application Support/Autohand/managed-settings.json
    • Linux: /etc/autohand/managed-settings.json
    • Windows: C:\Program Files\Autohand\managed-settings.json
  • Other configuration is stored in ~/.autohand/config.json. This file contains your preferences (theme, notification settings), API keys, MCP server configurations, per-project state (allowed tools, trust settings), and various caches.
{
  "permissions": {
    "allow": [
      "run_command:npm run lint",
      "run_command:npm run test:*",
      "read_file:~/.zshrc"
    ],
    "deny": [
      "run_command:curl:*",
      "read_file:./.env",
      "read_file:./.env.*",
      "read_file:./secrets/**"
    ]
  },
  "env": {
    "AUTOHAND_ENABLE_TELEMETRY": "1"
  },
  "companyAnnouncements": [
    "Welcome to Acme Corp! Review our code guidelines at docs.acme.com",
    "Reminder: Code reviews required for all PRs"
  ]
}

Available settings

settings.json supports the following options:

KeyDescriptionExample
apiKeyHelperCustom script to generate an auth value for API requests/bin/generate_temp_api_key.sh
cleanupPeriodDaysSessions inactive for longer than this period are deleted at startup. Setting to 0 immediately deletes all sessions. (default: 30)20
companyAnnouncementsAnnouncement to display to users at startup["Welcome to Acme Corp!"]
envEnvironment variables applied to every session{"FOO": "bar"}
attributionCustomize attribution for git commits and pull requests{"commit": "Generated with Autohand", "pr": ""}
permissionsPermission rules for tool access. See permission settings below.
hooksCustom commands to run before or after tool executions{"PreToolUse": {"run_command": "echo 'Running...'"}}
disableAllHooksDisable all hookstrue
modelOverride the default model to use"anthropic/claude-4-sonnet"
statusLineConfigure a custom status line to display context{"type": "command", "command": "~/.autohand/statusline.sh"}
outputStyleConfigure an output style to adjust the system prompt"Explanatory"
forceLoginMethodRestrict login to specific account types"api"
enableAllProjectMcpServersAutomatically approve all MCP servers defined in project .mcp.json filestrue
enabledMcpjsonServersList of specific MCP servers from .mcp.json to approve["memory", "github"]
disabledMcpjsonServersList of specific MCP servers from .mcp.json to reject["filesystem"]
alwaysThinkingEnabledEnable extended thinking by default for all sessionstrue
contextCompactEnable context compaction to automatically compress conversation history when nearing context limitstrue
localeSet the display language for the UI and agent responses (e.g., en, es, ja)"en"

UI settings

Control how Autohand displays information in the terminal:

KeyDescriptionDefault
showThinkingDisplay LLM reasoning process during executionfalse
showCompletionNotificationShow system notification when tasks completetrue
readFileCharLimitMaximum characters to display when reading files300
useInkRendererUse experimental React-based terminal renderingfalse
themeTerminal color theme (dark or light)"dark"
localeDisplay language for UI elements and agent responses"en"
contextCompactEnable automatic context compactionfalse

Agent settings

Control how the AI agent operates:

KeyDescriptionDefault
maxIterationsMaximum tool iterations per request before stopping100
enableRequestQueueQueue additional requests while agent is working (max 10)true

Network settings

Configure network behavior for API requests:

KeyDescriptionDefault
maxRetriesNumber of retry attempts for failed requests (max 5)3
timeoutRequest timeout in milliseconds30000
retryDelayDelay between retries in milliseconds1000
{
  "network": {
    "maxRetries": 3,
    "timeout": 30000,
    "retryDelay": 1000
  }
}

Search settings

Configure web search behavior for the agent:

KeyDescriptionDefault
providerSearch engine provider (google, brave, duckduckgo)"google"
apiKeyAPI key for the search provider-
maxResultsMaximum number of search results to return5
{
  "search": {
    "provider": "brave",
    "apiKey": "BSA-...",
    "maxResults": 10
  }
}

Sync settings

Configure settings synchronization across devices:

KeyDescriptionDefault
enabledEnable settings sync across devicesfalse
intervalSync interval in seconds300
excludeKeys to exclude from sync["apiKey"]
consentWhether the user has consented to syncfalse
{
  "sync": {
    "enabled": true,
    "interval": 300,
    "exclude": ["apiKey", "mcp.servers"],
    "consent": true
  }
}

Extended thinking settings

Configure the agent's reasoning depth:

KeyDescriptionDefault
alwaysThinkingEnabledEnable extended thinking by default for all sessionsfalse
thinkingLevelDefault thinking level (none, normal, extended)"normal"
{
  "alwaysThinkingEnabled": true,
  "thinkingLevel": "extended"
}

YOLO mode settings

Configure auto-approval patterns in the permission settings:

{
  "permissions": {
    "allow": [
      "run_command:npm test:*",
      "run_command:git status:*",
      "run_command:git diff:*"
    ],
    "deny": [
      "run_command:rm -rf *",
      "run_command:sudo *"
    ],
    "yolo": {
      "enabled": false,
      "patterns": "allow:npm *,deny:rm *",
      "timeout": 30
    }
  }
}

The yolo block in permissions configures default YOLO mode behavior. Override at runtime with --yolo and --timeout flags.

Permission settings

Configure granular permissions to control which tools Autohand can use:

KeyDescriptionExample
allowArray of permission rules to allow tool use["run_command:git diff:*"]
askArray of permission rules to ask for confirmation upon tool use["run_command:git push:*"]
denyArray of permission rules to deny tool use. Use this to exclude sensitive files from Autohand access.["read_file:./.env", "read_file:./secrets/**"]
additionalDirectoriesAdditional working directories that Autohand has access to["../docs/"]
defaultModeDefault permission mode when opening Autohand"acceptEdits"
disableBypassPermissionsModeSet to "disable" to prevent unrestricted mode from being activated"disable"

Excluding sensitive files

To prevent Autohand from accessing files containing sensitive information like API keys, secrets, and environment files, use the permissions.deny setting:

{
  "permissions": {
    "deny": [
      "read_file:./.env",
      "read_file:./.env.*",
      "read_file:./secrets/**",
      "read_file:./config/credentials.json",
      "read_file:./build"
    ]
  }
}

Files matching these patterns will be completely invisible to Autohand, preventing any accidental exposure of sensitive data.

Sandbox settings

Configure advanced sandboxing behavior. Sandboxing isolates commands from your filesystem and network:

KeyDescriptionExample
enabledEnable command sandboxing (macOS/Linux only). Default: falsetrue
autoAllowIfSandboxedAuto-approve commands when sandboxed. Default: truetrue
excludedCommandsCommands that should run outside of the sandbox["git", "docker"]
allowUnsandboxedCommandsAllow commands to run outside the sandbox via escape hatch. Default: truefalse
network.allowUnixSocketsUnix socket paths accessible in sandbox["~/.ssh/agent-socket"]
network.allowLocalBindingAllow binding to localhost ports (macOS only). Default: falsetrue
{
  "sandbox": {
    "enabled": true,
    "autoAllowIfSandboxed": true,
    "excludedCommands": ["docker"],
    "network": {
      "allowUnixSockets": ["/var/run/docker.sock"],
      "allowLocalBinding": true
    }
  },
  "permissions": {
    "deny": [
      "read_file:.envrc",
      "read_file:~/.aws/**"
    ]
  }
}

Attribution settings

Autohand adds attribution to git commits and pull requests. These are configured separately:

  • Commits use git trailers (like Co-Authored-By) by default, which can be customized or disabled
  • Pull request descriptions are plain text
KeyDescription
commitAttribution for git commits, including any trailers. Empty string hides commit attribution
prAttribution for pull request descriptions. Empty string hides PR attribution

Default commit attribution:

Generated with Autohand CLI

Co-Authored-By: Autohand <[email protected]>

Example custom attribution:

{
  "attribution": {
    "commit": "Generated with AI\n\nCo-Authored-By: AI <[email protected]>",
    "pr": ""
  }
}

Settings precedence

Settings apply in order of precedence. From highest to lowest:

  1. Enterprise managed policies (managed-settings.json) - Deployed by IT/DevOps, cannot be overridden
  2. Command line arguments - Temporary overrides for a specific session
  3. Local project settings (.autohand/settings.local.json) - Personal project-specific settings
  4. Shared project settings (.autohand/settings.json) - Team-shared project settings in source control
  5. User settings (~/.autohand/settings.json) - Personal global settings

This hierarchy ensures that enterprise security policies are always enforced while still allowing teams and individuals to customize their experience.

For example, if your user settings allow run_command:npm run:* but a project's shared settings deny it, the project setting takes precedence and the command is blocked.

Key points about configuration

  • Memory files (AGENTS.md): Contain instructions and context that Autohand loads at startup
  • Settings files (JSON): Configure permissions, environment variables, and tool behavior
  • Slash commands: Custom commands that can be invoked during a session with /command-name
  • MCP servers: Extend Autohand with additional tools and integrations
  • Precedence: Higher-level configurations (Enterprise) override lower-level ones (User/Project)
  • Inheritance: Settings are merged, with more specific settings adding to or overriding broader ones

Environment variables

Autohand supports the following environment variables to control its behavior. All environment variables can also be configured in settings.json:

VariablePurpose
AUTOHAND_API_KEYAPI key for Autohand services
AUTOHAND_AUTH_TOKENCustom value for the Authorization header
AUTOHAND_CONFIGPath to configuration file
AUTOHAND_MODELName of the model to use
AUTOHAND_SECRETCompany secret for enterprise deployments
AUTOHAND_API_URLCustom API endpoint URL
AUTOHAND_MAX_OUTPUT_TOKENSMaximum number of output tokens for requests
AUTOHAND_SHELL_PREFIXCommand prefix to wrap all commands (for logging or auditing)
AUTOHAND_DISABLE_TELEMETRYSet to 1 to opt out of telemetry
AUTOHAND_DISABLE_AUTOUPDATERSet to 1 to disable automatic updates
AUTOHAND_DISABLE_ERROR_REPORTINGSet to 1 to opt out of error reporting
BASH_DEFAULT_TIMEOUT_MSDefault timeout for long-running commands
BASH_MAX_OUTPUT_LENGTHMaximum characters in command outputs before truncation
BASH_MAX_TIMEOUT_MSMaximum timeout the model can set for commands
MAX_THINKING_TOKENSToken budget for extended thinking process
MCP_TIMEOUTTimeout in milliseconds for MCP server startup
MCP_TOOL_TIMEOUTTimeout in milliseconds for MCP tool execution
HTTP_PROXYSpecify HTTP proxy server for network connections
HTTPS_PROXYSpecify HTTPS proxy server for network connections
NO_PROXYList of domains and IPs to bypass proxy

Tools available to Autohand

Autohand has access to a set of powerful tools that help it understand and modify your codebase:

ToolDescriptionPermission Required
ask_user_questionAsks multiple choice questions to gather informationNo
run_commandExecutes shell commands in your environmentYes
read_fileReads the contents of filesNo
write_fileCreates or overwrites filesYes
apply_patchMakes targeted edits to specific filesYes
searchSearches for patterns in file contentsNo
list_treeFinds files based on pattern matchingNo
git_statusView repository stateNo
git_commitStage and commit changesYes
delegate_taskRuns a sub-agent to handle complex tasksNo
todo_writeCreates and manages structured task listsNo
web_fetchFetches content from a specified URLYes
web_searchPerforms web searches with domain filteringYes

Permission rules can be configured using /allowed-tools or in permission settings.

Subagent configuration

Autohand supports custom AI subagents that can be configured at both user and project levels. These subagents are stored as Markdown files with YAML frontmatter:

  • User subagents: ~/.autohand/agents/ - Available across all your projects
  • Project subagents: .autohand/agents/ - Specific to your project and can be shared with your team

Subagent files define specialized AI assistants with custom prompts and tool permissions. Create new subagents with /agents-new.

MCP server configuration

Configure MCP (Model Context Protocol) servers to extend Autohand with external tools. Servers can use stdio, SSE, or Streamable HTTP transports.

{
  "mcp": {
    "servers": [
      {
        "name": "database",
        "transport": "stdio",
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-postgres"],
        "autoConnect": true
      },
      {
        "name": "context7",
        "transport": "http",
        "url": "https://mcp.context7.com/mcp",
        "headers": { "CONTEXT7_API_KEY": "your-key" },
        "autoConnect": true
      }
    ]
  }
}

Manage servers via CLI (autohand mcp add/list/remove) or interactively with /mcp. See MCP Servers for full documentation.

Hook configuration

You can run custom commands before or after any tool executes using hooks. For example, you could automatically run a formatter after Autohand modifies files:

{
  "hooks": {
    "PostToolUse": {
      "write_file": {
        "matcher": "*.py",
        "command": "black {file}"
      }
    },
    "PreToolUse": {
      "run_command": {
        "matcher": "rm *",
        "command": "echo 'Warning: Deleting files'"
      }
    }
  }
}