Overview

The /usage command is an inline command available inside an interactive Gizzi Code session. It prints a live summary of the current session’s consumption, including the active model, context-window utilization, total cost, duration, and token breakdown. Use it when you want to:
  • Check how much of the model’s context window is occupied
  • See the running cost and duration of the current session
  • Verify which model and directory the session is using
  • Diagnose rate-limit or context-overflow warnings
/usage is a session-local command, not a top-level shell command. Run it from the Gizzi Code REPL/TUI prompt by typing /usage and pressing Enter.

Command reference

/usage works in both interactive and non-interactive sessions. It does not modify session state and can be run any number of times.

Output sections

Running /usage produces a small inline panel with the following sections.

Session context

Context window

A progress bar shows the percentage of the active model’s context window currently consumed. The bar changes color based on utilization: The count includes input tokens, cache-read tokens, and cache-creation tokens.

Session totals

Usage examples

Check usage mid-session

Example output:

Use in non-interactive mode

/usage is also available in non-interactive sessions, making it useful in scripts or remote/attached sessions where you want a quick consumption snapshot without leaving the terminal.

Common flags

/usage does not accept any flags or arguments. All displayed values are derived automatically from the current session state.

Interpreting context-window color

If the context bar is yellow or red, consider one of the following:
  • Start a fresh session for a new task
  • Use gizzi run --continue or gizzi run --session to fork or switch sessions
  • Compact the conversation with /compact if available
  • Reduce the amount of attached context or file attachments