Skip to content

Preserve hook trust bypass in codex exec threads#26434

Merged
abhinav-oai merged 2 commits into
mainfrom
abhinav/preserve-exec-hook-trust
Jun 16, 2026
Merged

Preserve hook trust bypass in codex exec threads#26434
abhinav-oai merged 2 commits into
mainfrom
abhinav/preserve-exec-hook-trust

Conversation

@abhinav-oai

@abhinav-oai abhinav-oai commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Addresses #26383 and #26452

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 abhinav-oai marked this pull request as ready for review June 14, 2026 19:04
@abhinav-oai abhinav-oai enabled auto-merge (squash) June 16, 2026 00:25
@abhinav-oai abhinav-oai merged commit d007b08 into main Jun 16, 2026
31 checks passed
@abhinav-oai abhinav-oai deleted the abhinav/preserve-exec-hook-trust branch June 16, 2026 00:36
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants