ah agent record
Record an agent session with PTY capture.
ah agent record [OPTIONS] <COMMAND> [ARGS]...Arguments
| Argument | Description |
|---|---|
COMMAND | Command to execute |
ARGS | Arguments to pass to command |
Options
| Option | Description | Default |
|---|---|---|
-o, --out-file <PATH> | Output file path (.ahr) | — |
--headless | Disable live viewer (headless mode) | false |
--cols <N> | Terminal columns | current |
--rows <N> | Terminal rows | current |
--brotli-q <N> | Brotli compression quality (0-11) | 4 |
--env <KEY=VALUE> | Environment variable (repeatable) | — |
--gutter <POS> | Snapshot gutter position: right, left, none | left |
--line-numbers | Show line numbers in gutter | false |
Examples
Record a session to file:
ah agent record -o session.ahr -- ah agent start --agent claude --prompt "Add docs"Headless recording:
ah agent record --headless -o session.ahr -- ah agent start --agent claude --prompt "Fix"Custom terminal size:
ah agent record --cols 120 --rows 40 -o session.ahr -- ah agent start --agent claude --prompt "Task"With environment variables:
ah agent record --env DEBUG=1 -o session.ahr -- ah agent start --agent claude --prompt "Debug"