Skip to content

fix: bypass codex inner sandbox in sandboxes#15

Merged
samuelclay merged 2 commits into
mainfrom
codex/fix-codex-bwrap
Jun 19, 2026
Merged

fix: bypass codex inner sandbox in sandboxes#15
samuelclay merged 2 commits into
mainfrom
codex/fix-codex-bwrap

Conversation

@samuelclay

Copy link
Copy Markdown
Collaborator

Summary

  • launch Codex app-server with the explicit externally-sandboxed bypass flag by default
  • keep an env var escape hatch to re-enable Codex's inner bwrap sandbox
  • update wrapper tests for the new launch command

Testing

  • uv run pytest tests/test_codex_app_wrapper.py (from services/api)
  • uv run ruff check ../sandbox/codex-app-wrapper.py tests/test_codex_app_wrapper.py (from services/api)
  • docker build --target sandbox -t centaur-agent:latest -f services/sandbox/Dockerfile .
  • docker run --rm --entrypoint codex centaur-agent:latest --dangerously-bypass-approvals-and-sandbox app-server --help
  • docker run --rm --entrypoint /bin/bash centaur-agent:latest -lc 'python3 - <<'''PY'''
    import importlib.machinery
    import importlib.util
    loader = importlib.machinery.SourceFileLoader(wrapper, /usr/local/bin/codex-app-wrapper)
    spec = importlib.util.spec_from_loader(wrapper, loader)
    mod = importlib.util.module_from_spec(spec)
    loader.exec_module(mod)
    print(mod._codex_app_server_command(high))
    PY'

@samuelclay samuelclay merged commit f77c929 into main Jun 19, 2026
7 checks passed
@samuelclay samuelclay deleted the codex/fix-codex-bwrap branch June 19, 2026 17:51
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