Overview
gizzi exec is a pipe-safe, non-interactive alias for gizzi run. It prints the response and exits without launching the TUI — ideal for scripts, CI pipelines, and shell automation.
Both exit as soon as the run finishes. When the model is an installed coding CLI, the run serves its session tools to that CLI on a loopback port (--port picks it; a free port by default). gizzi run --attach <url> sends the run to an already running gizzi serve instead.
Basic usage
Output formats
stream-json event is a JSON object with a type field (message, tool_use, result, etc.), suitable for piping into jq or another tool.
Permission modes
In headless mode,exec defaults to the dontAsk permission mode — commands and edits run without interactive confirmation.
Override with a named profile:
Piping and composition
Becauseexec is pipe-safe, it composes naturally with standard Unix tools:
Plan models are not for headless runs
gizzi run (with or without -p) refuses a plan model (plan/…, copilot-plan/…, or a model from a direct plan sign-in) before it starts, with exit code 1. A plan answers only messages you type in the TUI. See Connect.
Exit codes
A run whose session pauses before a usage limit (for example your own subscription’s 5-hour limit) ends at once with exit code
1 and the message Paused before a usage limit (…) until <date>. In JSON output it is an error event named SessionPaused. Run again with --model on another provider.
Review in CI
gizzi run --review asks a fresh reviewer to check the uncommitted changes (after the run, or on its own when you give no prompt). The reviewer starts with no knowledge of how the code was written, reads the changed files and their callers, and returns a verdict:
- PASS (exit
0): what it verified. - FAIL (exit
3): each problem with its file and line. - PARTIAL (exit
4): what it could not verify and why.
0, and --format json reports "verdict": null, so a pipeline never mistakes “nothing reviewed” for “checked and passed”.
--review-until-pass [rounds] sends each non-PASS verdict back to the coder as a turn, then reviews again, until PASS or the round limit (default 5, max 12). The reviewer uses the review job model when one is set (see Configuration), else the session’s model.