Skip to content

/permissions Full Access session-only confirmation persists approvals_reviewer to config.toml #19297

@decentralizedblack-maker

Description

Bug

In Codex CLI 0.124.0, selecting:

/permissions -> Full Access -> Yes, continue anyway

is described as applying Full Access "for this session", but it also persists approvals_reviewer = "user" to config.toml.

Expected

The session-only confirmation should update the active session state only.

Actual

approvals_reviewer is written to config.toml, which can overwrite a persisted reviewer such as guardian_subagent.

Reproduction

  1. Start Codex with a non-Full Access permission state and a persisted reviewer, for example approvals_reviewer = "guardian_subagent".
  2. Open /permissions.
  3. Select Full Access.
  4. In the confirmation prompt, select Yes, continue anyway, whose description is Apply full access for this session.
  5. Inspect ~/.codex/config.toml.

Observed locally on codex-cli 0.124.0: the persisted config changed approvals_reviewer to user even though the prompt said the choice was session-scoped.

Patch

I prepared a minimal fix in my fork:

The patch adds a session-only UpdateApprovalsReviewerForSession event and uses it for /permissions preset selection. The existing persistent UpdateApprovalsReviewer event remains available for paths that intentionally write approvals_reviewer to config.toml.

I could not open a PR because this repository currently limits pull request creation to collaborators.

Local verification

  • git diff --check passed

Not run locally:

  • cargo fmt
  • cargo test -p codex-tui permissions_full_access_history_cell_emitted_only_after_confirmation

Reason: the local shell used for preparing the patch does not currently have cargo, rustfmt, or just on PATH.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingconfigIssues involving config.toml, config keys, config merging, or config updatessandboxIssues related to permissions or sandboxing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions