codex entrypoint: pin -C workspace + bypass sandbox/approvals#13
Merged
Conversation
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>
94b0c8c to
caa586e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per Nate (2026-05-07), the codex pod's startup command going forward should be exactly:
Two targeted additions to the existing codex launch command in
bin/entrypoint.sh:-C "$HOME/workspace"— explicit workspace dir.--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
sha-XXXXX-codextag, Flux reconciles, codex pod restarts.🤖 Generated with Claude Code