Skip to content

compozy session new

Create a new session

For people running agent work62 pages in this section

compozy session new

Create a new session

compozy session new [flags]

Examples

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

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

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

  # Start a recovery session for a failed parent session
  compozy session new --agent codex --parent sess_01J9R2K7M4T1 --lineage-kind recovery

Options

      --agent string                               Agent definition name (defaults to config default)
      --cwd string                                 Absolute workspace directory to auto-register
  -h, --help                                       help for new
      --lineage-kind string                        Relation to --parent: provenance (default) or recovery
      --name string                                Optional session label
      --new-worktree string[="__compozy_auto__"]   Create a worktree before starting; optionally provide its name
      --parent string                              Record a same-workspace parent session as creation provenance
      --workspace string                           Override workspace (ID, name, or path)
      --worktree string                            Start in an existing ready worktree

Options inherited from parent commands

      --json             Emit JSON output
  -o, --output string    Output format: human, json, jsonl, or toon (default "human")
      --profile string   Act as a profile for this command

Output Formats

The root -o, --output flag accepts these values. A renderer is supported only when this command writes that result; jsonl is for commands that emit one JSON record per line.

FormatCommand result
humanInteractive terminal rendering
jsonMachine-readable JSON rendering
jsonlOne JSON record per line when supported
toonCompact agent-readable rendering

Example:

compozy session new -o json

On this page