Skip to main content

validate_init_flags

Function validate_init_flags 

Source
pub fn validate_init_flags(
    agent: Agent,
    claude_settings_set: bool,
) -> Result<(), String>
Expand description

Validate init flag combinations against the selected agent. --claude-settings selects between .claude/settings.json and settings.local.json, so it only applies to the Claude Code agent — --agent codex always writes .codex/hooks.json. Returns a human-readable error for an incompatible combo so the CLI rejects it instead of silently ignoring the flag.