Skip to content

feat: support base_permission_profile :danger-full-access via default_permissions#2292

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-2282-codex-danger-baseline
Jul 16, 2026
Merged

feat: support base_permission_profile :danger-full-access via default_permissions#2292
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-2282-codex-danger-baseline

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Codex CLI ships three built-in permission profiles, but its config loader rejects extends = ":danger-full-access", so rulesync accepted only the two extendable baselines — leaving no way to express "run Codex with full access" through the canonical model. Codex CAN select the built-in directly, though: default_permissions = ":danger-full-access" is valid at the top level (verified against the Codex permissions docs: "It must match a profile under [permissions] or a built-in", while extends "cannot extend :danger-full-access").

Changes

  • codexcli.base_permission_profile now accepts ":danger-full-access". The extendable-baseline set stays [":read-only", ":workspace"] via the new CODEX_EXTENDABLE_BASELINE_PROFILES constant (still the single source for the import-side extends check).
  • When :danger-full-access is selected, generation emits default_permissions = ":danger-full-access" and skips the managed [permissions.rulesync] profile entirely — with the sandbox removed there is nothing for filesystem/network rules to refine, so canonical read/edit/write/webfetch rules are ignored for Codex CLI with a warning. A stale managed profile from a previous generate is pruned; hand-written sibling profiles are preserved. The other codexcli override keys (approval_policy etc.) keep flowing through computeCodexcliOverridePatch unchanged.
  • Import: a config.toml with default_permissions = ":danger-full-access" (no managed profile) round-trips into codexcli.base_permission_profile: ":danger-full-access" from the top-level key, complementing the existing extends-based derivation.
  • Tests cover generation (managed-profile skip + prune, sibling preservation, ignored-rules warning) and the import round-trip; the enum-rejection test is updated since :danger-full-access is now a valid override value.
  • Docs: the base_permission_profile sections in docs/reference/file-formats.md describe the direct-selection mode (synced to skills/rulesync/).

Closes #2282

🤖 Generated with Claude Code

cm-dyoshikawa and others added 2 commits July 16, 2026 01:35
…_permissions

Codex rejects extends = ":danger-full-access" but allows selecting the
built-in directly via default_permissions. The override now accepts the
third built-in: when set, rulesync emits
default_permissions = ":danger-full-access", skips the managed
[permissions.rulesync] profile entirely (there is no sandbox for
filesystem/network rules to refine — canonical read/edit/write/webfetch
rules are ignored with a warning), prunes a stale managed profile from a
previous generate while preserving hand-written sibling profiles, and
round-trips the baseline from the top-level default_permissions key on
import. The extendable-baseline set stays [:read-only, :workspace] via
the new CODEX_EXTENDABLE_BASELINE_PROFILES constant.

Closes #2282

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review follow-ups: the danger-mode branch no longer prunes the managed
[permissions.rulesync] profile silently (hand-written keys such as
network.unix_sockets live there per the FAQ), the ignored-categories
warning now covers every non-bash category instead of a fixed list, and
no empty [permissions] header is left behind when no sibling profiles
exist (undefined deletes the owned key).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dyoshikawa
dyoshikawa merged commit 9dc5038 into main Jul 16, 2026
9 checks passed
@dyoshikawa

Copy link
Copy Markdown
Owner Author

@dyoshikawa Thank you!

@dyoshikawa
dyoshikawa deleted the resolve-scrap-issue-2282-codex-danger-baseline branch July 16, 2026 13:07
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: support base_permission_profile: ":danger-full-access" via default_permissions instead of extends

2 participants