Skip to content

feat(codex): emit and preserve :minimal filesystem baseline#1960

Open
saitota wants to merge 5 commits into
dyoshikawa:mainfrom
saitota:i1876
Open

feat(codex): emit and preserve :minimal filesystem baseline#1960
saitota wants to merge 5 commits into
dyoshikawa:mainfrom
saitota:i1876

Conversation

@saitota

@saitota saitota commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Background

Codex CLI v0.112.0-alpha.8 introduced :minimal as a FileSystemSpecialPath that enables include_platform_defaults(), providing the platform/runtime read access needed for sandboxed command execution on macOS, Linux, and Windows. Without :minimal = "read" in the profile, commands fail inside the sandbox on those platforms.

Rulesync's existing model had no concept of these Codex-native sandbox baseline paths (:minimal, :root, :tmpdir, :slash_tmp), so they were silently dropped on import and never emitted on generate.

Changes

  • Always emit ":minimal" = "read" in the generated permissions.<profile>.filesystem table
  • Skip :minimal, :root, :tmpdir, :slash_tmp on import so they never pollute rulesync's permission model (they're Codex-native baselines, not user rules)
  • Preserve existing :root, :tmpdir, :slash_tmp values verbatim on regeneration via mergeWithExistingProfile
  • Remove dead Object.keys(filesystem).length > 0 guard (filesystem is always non-empty after :minimal init)
  • Add :minimal = "read" assertion to E2E test per Tool × Feature matrix requirement
  • Document the new behavior in docs/reference/file-formats.md

Closes #1876

References

Test plan

  • pnpm fmt:check / oxlint / typecheck — clean
  • cspell / secretlint — clean
  • codexcli-permissions.test.ts — 39 pass (6 new cases covering :minimal emit, import skip, round-trip, :root/:tmpdir/:slash_tmp pass-through)
  • E2E codexcli permissions case updated to assert filesystem[":minimal"] === "read"

saitota and others added 5 commits June 19, 2026 09:50
Always emit `:minimal = "read"` in the Codex permission profile so that
`include_platform_defaults` is enabled, providing the platform/runtime
read access needed for basic sandboxed command execution on macOS, Linux,
and Windows (openai/codex#13434, rust-v0.112.0-alpha.8).

Also preserve existing :root and :tmpdir baseline values on round-trips
so user-customized Codex-native sandbox settings survive Rulesync
generate passes without being imported into Rulesync's permission model.

Closes dyoshikawa#1876
…E assert

- Add `:slash_tmp` to CODEX_FILESYSTEM_BASELINE_KEYS to match all 5 special
  paths defined in codex-rs parse_special_path (:minimal/:root/:tmpdir/:slash_tmp/:workspace_roots)
- Remove dead `Object.keys(filesystem).length > 0` guard since filesystem is
  always non-empty after being initialized with `:minimal = "read"`
- Add `filesystem[":minimal"] === "read"` assertion to E2E test to catch
  regressions per CLAUDE.md Tool x Feature matrix requirement
- Clarify :minimal comment to reference FileSystemSpecialPath::Minimal
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.

Codex CLI permissions should emit and preserve :minimal filesystem baseline

1 participant