Skip to content

codex entrypoint: pin -C workspace + bypass sandbox/approvals#13

Merged
nprodromou merged 1 commit into
mainfrom
ops-426-codex-auto-launch
May 8, 2026
Merged

codex entrypoint: pin -C workspace + bypass sandbox/approvals#13
nprodromou merged 1 commit into
mainfrom
ops-426-codex-auto-launch

Conversation

@nprodromou

@nprodromou nprodromou commented May 8, 2026

Copy link
Copy Markdown
Owner

Summary

Per Nate (2026-05-07), the codex pod's startup command going forward should be exactly:

codex resume --last -C /home/codex/workspace --dangerously-bypass-approvals-and-sandbox

Two targeted additions to the existing codex launch command in bin/entrypoint.sh:

  1. -C "$HOME/workspace" — explicit workspace dir.
  2. --dangerously-bypass-approvals-and-sandbox — skips codex's internal bwrap sandbox + approval prompts. The apk8s pod boundary is the real security boundary; the inner sandbox fails on hardened k8s anyway and just produces approval-prompt noise.

Fallback chain unchanged: resume → fresh codex → bash on exit. Claude variant of the entrypoint untouched.

Overlap with PR #9

#9 OPS-405 addresses the same approval-prompt noise via image-baked config defaults (sandbox_mode = "danger-full-access", approval_policy = "on-failure"). That's the more elegant approach. This PR is the simpler path Nate requested today; the two are functionally equivalent for the user. If #9 lands, the CLI flag here becomes redundant but harmless.

Test plan

  • CI build runs on PR (push gated to main).
  • After merge: bump the codex-cli helmrelease in apk8s to the new sha-XXXXX-codex tag, Flux reconciles, codex pod restarts.
  • Visit codex.prodromou.com → lands directly in codex resuming last session, no approval prompts on routine tool calls.

🤖 Generated with Claude Code

Per Nate (2026-05-07), the codex pod's startup command going forward
should be exactly:

  codex resume --last -C /home/codex/workspace --dangerously-bypass-approvals-and-sandbox

Two changes vs. the previous launch command:

  1. -C "$HOME/workspace"  — explicit workspace dir, even though WORKDIR
     already lands there. Belt + suspenders, and survives any
     entrypoint-level cd before this point.
  2. --dangerously-bypass-approvals-and-sandbox — skips codex's internal
     bwrap sandbox + approval prompts. The apk8s pod boundary is the
     real security boundary (non-root user, RBAC, PVC isolation), and
     the inner sandbox fails on hardened k8s anyway (see OPS-405).
     Skipping it removes the routine approval-prompt noise.

Fallback chain stays the same: resume → fresh codex → bash on exit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nprodromou nprodromou force-pushed the ops-426-codex-auto-launch branch from 94b0c8c to caa586e Compare May 8, 2026 02:19
@nprodromou nprodromou changed the title entrypoint: boot directly into codex (no more bash → codex) codex entrypoint: pin -C workspace + bypass sandbox/approvals May 8, 2026
@nprodromou nprodromou merged commit 2daafa0 into main May 8, 2026
2 checks passed
@nprodromou nprodromou deleted the ops-426-codex-auto-launch branch May 8, 2026 02:23
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.

1 participant