Skip to content

Make --yolo include hook trust bypass #22546

@gndk

Description

@gndk

What variant of Codex are you using?

CLI

What feature would you like to see?

Please make --yolo also enable the existing runtime-only hook trust bypass.

Today --yolo is the short form for --dangerously-bypass-approvals-and-sandbox. It sets approval_policy=never and sandbox_mode=danger-full-access, but untrusted enabled hooks still require passing --dangerously-bypass-hook-trust separately.

For the shortcut mode, it would be more ergonomic if --yolo meant "run without interactive safety prompts for this invocation", including hook trust prompts. Users who need finer-grained behavior can still use the explicit --dangerously-* flags.

Additional information

PR #21768 added --dangerously-bypass-hook-trust as an invocation-scoped escape hatch.

Expected behavior for --yolo:

  • sets the existing runtime-only bypass_hook_trust override
  • does not add a durable config.toml setting
  • does not persist hooks.state changes
  • explicitly disabled hooks remain disabled
  • startup warning mentions hook trust bypass

Use cases: ephemeral or repeated trusted dev environments where stable repo-owned hooks are already vetted by the caller, or simply living dangerously.

Related: #21768 added the separate flag

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthooksIssues related to event hooks

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions