Skip to Content
CLI ReferenceCommandsagent start

ah agent start

Start an agent session.

ah agent start [OPTIONS]

Agent Options

OptionDescriptionDefault
--agent <TYPE>Agent: claude, codex, copilot, gemini, opencode, qwen, cursor-cli, goose, acpmock
--model <NAME>Model to use (can be overridden by agent-specific flags)
--claude-model <NAME>Model for Claude (overrides —model)
--codex-model <NAME>Model for Codex (overrides —model)
--copilot-model <NAME>Model for Copilot (overrides —model)
--gemini-model <NAME>Model for Gemini (overrides —model)

Execution Options

OptionDescriptionDefault
--prompt <TEXT>Task prompt to pass to the agent
--cwd <PATH>Working directory for agent execution
--non-interactiveSingle turn, then exitfalse
--output-format <FMT>text, basic-text, json, stream-jsontext
--agent-ui-style <TYPE>native or ah (Agent Harbor unified TUI)native

Sandbox Options

OptionDescriptionDefault
--sandboxEnable sandbox modefalse
--sandbox-type <TYPE>Type: local, devcontainer, vmlocal
--allow-network <BOOL>Allow network access
--allow-containers <BOOL>Allow container access
--allow-kvm <BOOL>Allow KVM access

Filesystem Options

OptionDescriptionDefault
--fs-snapshots <TYPE>auto, zfs, btrfs, agentfs, agentfs-fuse, agentfs-interpose, git, disableauto
--working-copy <MODE>auto, cow-overlay, worktree, in-placeauto
--from-snapshot <ID>Restore workspace from filesystem snapshot

MCP Options

OptionDescription
--mcp-config <PATH>Path to MCP config file

Examples

Start Claude with a prompt:

ah agent start --agent claude --prompt "Add unit tests"

Use a specific model:

ah agent start --agent claude --claude-model sonnet --prompt "Refactor"

Non-interactive mode (single turn):

ah agent start --agent claude --non-interactive --prompt "Fix typo"

With sandbox enabled:

ah agent start --agent claude --sandbox --prompt "Run tests"

With sandbox and network access:

ah agent start --agent claude --sandbox --allow-network true --prompt "Install deps"

With MCP servers:

ah agent start --agent claude --mcp-config ~/.config/mcp.json --prompt "Task"

JSON output:

ah agent start --agent claude --output-format json --prompt "Task"