feat(codex): expose Approve for me as a permission mode (#2016) (#2090)

* feat(codex): expose Approve for me as a permission mode (#2016)

Add autoReview to the Codex permission catalog. It keeps the
workspace-write sandbox with on-request approvals and routes escalations
to Codex's native reviewer (approvals_reviewer = "auto_review"), the same
config as `hapi codex --approve-for-me`. It works at launch and mid-session
via thread/settings/update; explicit modes now reset the reviewer to user,
and sessions report autoReview from the native reviewer setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(native): expect Auto-review in the Codex permission lists (#2016)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(modes): label autoReview as Auto, matching Claude's auto mode (#2016)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SSU-WEI HUANG
2026-10-26 09:59:47 +08:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 60a4971087
commit 878ca2058c
17 changed files with 80 additions and 36 deletions
@@ -10,6 +10,7 @@ export type CodexPermissionModeConfig = {
export function resolveCodexPermissionModeConfig(mode: CodexPermissionMode): CodexPermissionModeConfig {
switch (mode) {
case 'default':
case 'autoReview':
return {
// Remote Codex sessions rely on HAPI's approval UI for sandbox escalation.
// `on-request` keeps workspace-write sandboxing while still surfacing a