# CLI guide
Parses Clap arguments, validates launch modes, and hands work to runtime owners.
## Where to look
| Arguments, subcommands, startup routing | `mod.rs` |
| Cross-flag/mode validation | `validation.rs` |
| Session operations | `sessions.rs` |
| MCP commands | `mcp.rs` |
## Local rules
- Invalid usage is `AppError::Usage` (exit 2); runtime failure is `AppError::Runtime` (exit 1).
- `--update` runs standalone maintenance before TTY/config/provider/session initialization. TUI handoffs hold restart data only; update/restart follows terminal cleanup, app drop, writer-lease release and Herdr release.
- Validate combinations before session/worker/provider side effects.
- Keep parsing in Clap types and cross-mode rules in `validation.rs`; runtime modules must not parse alternate argument grammars.
- Send overrides to configuration resolution rather than recreating provider/auth precedence in handlers.
- Default launch requires TTY stdin/stdout and hands off to worker-backed Mission Control. `--prompt` queues initial input. There is no `--app` flag or daemon command.
- Session/MCP handlers delegate to their owners; errors must not expose credentials or raw sensitive responses.