ah agent start
Start an agent session.
ah agent start [OPTIONS]Agent Options
| Option | Description | Default |
|---|---|---|
--agent <TYPE> | Agent: claude, codex, copilot, gemini, opencode, qwen, cursor-cli, goose, acp | mock |
--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
| Option | Description | Default |
|---|---|---|
--prompt <TEXT> | Task prompt to pass to the agent | — |
--cwd <PATH> | Working directory for agent execution | — |
--non-interactive | Single turn, then exit | false |
--output-format <FMT> | text, basic-text, json, stream-json | text |
--agent-ui-style <TYPE> | native or ah (Agent Harbor unified TUI) | native |
Sandbox Options
| Option | Description | Default |
|---|---|---|
--sandbox | Enable sandbox mode | false |
--sandbox-type <TYPE> | Type: local, devcontainer, vm | local |
--allow-network <BOOL> | Allow network access | — |
--allow-containers <BOOL> | Allow container access | — |
--allow-kvm <BOOL> | Allow KVM access | — |
Filesystem Options
| Option | Description | Default |
|---|---|---|
--fs-snapshots <TYPE> | auto, zfs, btrfs, agentfs, agentfs-fuse, agentfs-interpose, git, disable | auto |
--working-copy <MODE> | auto, cow-overlay, worktree, in-place | auto |
--from-snapshot <ID> | Restore workspace from filesystem snapshot | — |
MCP Options
| Option | Description |
|---|---|
--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"