Skip to content

fix(codex): use supported safe-yolo approval policy#1079

Merged
tiann merged 1 commit into
tiann:mainfrom
NPUlrk:fix/codex-safe-yolo-approval-policy
Jul 19, 2026
Merged

fix(codex): use supported safe-yolo approval policy#1079
tiann merged 1 commit into
tiann:mainfrom
NPUlrk:fix/codex-safe-yolo-approval-policy

Conversation

@NPUlrk

@NPUlrk NPUlrk commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace Codex safe-yolo's removed on-failure approval policy with on-request
  • keep the existing workspace-write sandbox and HAPI auto-approval behavior
  • update local launcher and app-server regression tests

Problem

Codex CLI 0.144.x no longer accepts on-failure. Starting or resuming a HAPI Codex session in safe-yolo mode sends that value to thread/start or thread/resume, which fails immediately with:

Invalid request: unknown variant `on-failure`, expected one of `untrusted`, `on-request`, `granular`, `never`

For resumed sessions, the user-facing result is:

Task failed: Codex conversation <id> could not be resumed; no new conversation was created

on-request preserves sandbox escalation support, while HAPI's existing CodexPermissionHandler continues to auto-approve requests in safe-yolo mode.

Testing

  • bun typecheck
  • bun run test (CLI, hub, web, and shared suites)

AI disclosure

This focused fix and its tests were prepared with OpenAI Codex assistance and manually verified against Codex CLI 0.144.x behavior.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings
No issues found in the added/modified lines.

Summary
Review mode: initial
No diff-anchored blocker/major/minor findings. Residual risk: remote resume does not have a direct launcher-level assertion for safe-yolo approval params, but the shared thread-param helper now has start/resume-relevant coverage and the local launcher assertion was updated.

Testing
Not run (automation)

HAPI Bot

@tiann
tiann merged commit bfd8c7e into tiann:main Jul 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants