Prompt: Configurable Sandbox Hooks (2025-10-17)
View Source
Required Reading
docs/20251017/sandbox-hooks.mddocs/design/sandbox-approvals.mdlib/codex/approvals.ex and lib/codex/thread/options.extest/codex/thread_auto_run_test.exs
TDD Checklist
- Red – add tests covering sync + async hooks:
- New unit tests for
Codex.Approvals dispatcher (sync allow/deny, async with timeout). - Integration test simulating delayed approval via fake hook module.
- Telemetry capture test asserting
[:codex, :approval, ...] events.
- Green – implement behaviour, ETS registry, and dispatcher updates to make tests pass.
- Refactor – cleanup duplication, document new options, ensure
mix format, mix test, mix compile --warnings-as-errors are green, update relevant docs.