Skip to content
Session
AGH RuntimeSession

agh session new

Create a new session

Audience
Operators running durable agent work
Focus
Session guidance shaped for scanability, day-two clarity, and operator context.

agh session new

Create a new session

agh session new [flags]

Examples

  # Start a session in the current workspace using the configured default agent
  agh session new

  # Start a named session for a specific registered workspace and agent
  agh session new --workspace checkout-api --agent reviewer --name review-api

  # Override provider, model, and reasoning effort for this session only
  agh session new --provider codex --model gpt-5.4 --reasoning-effort high

  # Auto-register an absolute workspace path before creating the session
  agh session new --cwd "$PWD" --agent reviewer

Options

      --agent string              Agent definition name (defaults to config default)
      --channel string            Optional network channel opt-in for the session
      --cwd string                Absolute workspace directory to auto-register
  -h, --help                      help for new
      --model string              Optional model override for this session
      --name string               Optional session label
      --provider string           Optional provider override for this session
      --reasoning-effort string   Optional reasoning effort hint (minimal|low|medium|high|xhigh) for providers that support it
      --workspace string          Registered workspace name or ID

Options inherited from parent commands

      --json            Emit JSON output
  -o, --output string   Output format: human, json, jsonl, or toon (default "human")

Output Formats

Every AGH command supports -o, --output:

  • human for interactive terminal use
  • json for scripts and other machine-readable consumers
  • jsonl for wait or streaming commands that emit one JSON record per line
  • toon for compact agent-readable summaries

Example:

agh session new -o json

On this page