codex icon indicating copy to clipboard operation
codex copied to clipboard

Preserve hook trust bypass in codex exec threads

Open abhinav-oai opened this issue 5 months ago • 0 comments

Addresses #26383.

Summary

codex exec --dangerously-bypass-hook-trust printed the bypass warning, but valid untrusted hooks still did not run.

Exec applied the flag to its initial config, then lost it when app-server reloaded config for the new or resumed thread.

Fix

Forward bypass_hook_trust: true through the existing thread request config override for both start and resume.

The override is omitted when the flag is not enabled, preserving normal trust behavior.

Testing

Added:

  • A test confirming start and resume preserve the override.
  • An end-to-end exec test confirming a SessionStart hook runs and creates a marker file.

abhinav-oai avatar Jun 04 '26 17:06 abhinav-oai