Skip to content

App stops using the configured beta permissions set after the first prompt #31269

Open

Description

@deg-hrisser

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.623.101652 • Released Jul 3, 2026

What subscription do you have?

Business

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

I have tried to play around with the beta permissions.
Some really great concepts here.

However, I noticed that as of my second prompt in a new thread,
the app falls back to "Asking for approval". This happens for both of my beta permission profiles. This does not happen on the CLI.

What steps can reproduce the bug?

Use beta permission profiles.
Start a new thread with that profile.
Send a message with that profile selected.
Send another message with that profile selected.
-> Here, the profile-selector will switch to "Ask for approval".

What is the expected behavior?

Codex should keep the chosen permission profile for the entire thread.

Additional information

For context, these are all of my broadly permission-specific settings from config.toml:

default_permissions = "workspace-only"

[permissions.workspace-write-read-all]
extends = ":workspace"
[permissions.workspace-write-read-all.filesystem]
":tmpdir" = "deny"
":slash_tmp" = "deny"
"~/.codex-cache" = "write"
[permissions.workspace-write-read-all.network]
enabled = true
[permissions.workspace-write-read-all.network.domains]
"*" = "allow"

[permissions.workspace-only.filesystem]
#":root" = "deny"
":minimal" = "read"
":tmpdir" = "deny"
":slash_tmp" = "deny"
"~/.codex-cache" = "write"
"~/.codex" = "read"

"/opt/homebrew" = "read"
"~/.asdf" = "read"

"~/Development/ceres" = "read"
"~/.ceres" = "read"

"/Library/Developer/CommandLineTools" = "read"
"~/.gitconfig" = "read"
"~/.npmrc" = "read"

[permissions.workspace-only.filesystem.":workspace_roots"]
"." = "write"
".codex" = "read"
".git" = "read"
"module/**" = "read"
"system.sh" = "read"
# "frontend/src" = "write"
# "frontend/src/server" = "write"
# "api/generator-config" = "write"
# "api/specs" = "write"
# "api/openapi-spec.yml" = "write"
# "e2e-test/src" = "write"

[permissions.workspace-only.network]
enabled = true

[permissions.workspace-only.network.domains]
"redacted_internal_domain1" = "allow"
"redacted_internal_domain2" = "deny"

[shell_environment_policy]
set = {
  PATH = "/opt/homebrew/bin:/opt/homebrew/sbin:/Users/hrisser/.asdf/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
  TMPDIR = "/Users/hrisser/.codex-cache/tmp",
  TEMP = "/Users/hrisser/.codex-cache/tmp",
  TMP = "/Users/hrisser/.codex-cache/tmp",
  GRADLE_USER_HOME = "/Users/hrisser/.codex-cache/gradle",
  GRADLE_OPTS = "-Dorg.gradle.daemon=false",
  npm_config_cache = "/Users/hrisser/.codex-cache/npm-cache",
  YARN_CACHE_FOLDER = "/Users/hrisser/.codex-cache/yarn-cache",
  MAVEN_OPTS = "-Dmaven.repo.local=/Users/hrisser/.codex-cache/m2",
  JAVA_TOOL_OPTIONS = "-Duser.home=/Users/hrisser/.codex-cache/home -Dmaven.repo.local=/Users/hrisser/.codex-cache/m2"
}

Activity

  1. added
    app
    on Jul 6, 2026
  2. added
    bug
    sandbox
    config
    on Jul 6, 2026
  3. github-actions commented on Jul 6, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. TyceHerrman commented on Jul 9, 2026

    @TyceHerrman

    also see Desktop app alternates between configured default path and an explicit requestPermissionProfile=:workspace

    Related to #30485: both involve mid-thread permission-profile replacement, but this issue reproduces during ordinary local follow-up turns without mobile or remote continuation. This may indicate a shared thread-settings hydration sink reached through different client paths.

  5. patterns-complexity commented on Oct 8, 2026

    @patterns-complexity

    I can reproduce this on the Windows desktop app after reinstalling, with a named profile that extends :workspace. The profile appears in the permissions dropdown and can be selected, but the dropdown reverts to Ask for approval when I send a message. On the following turn, the effective permissions also lose the profile's additional writable directories.

    Environment

    • Desktop runtime version: 26.1002.52244 (from the local app runtime configuration).
    • Installed Windows Store package: OpenAI.Codex_26.1002.7124.0_x64.
    • Bundled CLI: codex-cli 0.162.0-alpha.2.
    • Native Windows x64, local desktop chat.
    • Windows sandbox setting: unelevated.
    • Reproduced in the original existing chat, in another fresh chat, and after reopening the app. The fresh-chat and app-reopen reproductions were subsequently verified by me.

    Relevant configuration

    The global config.toml has the following permission settings. The home path below is sanitized:

    default_permissions = "projects-write"
    
    [permissions.projects-write]
    description = "Workspace editing plus projects and the global Codex directory"
    extends = ":workspace"
    
    [permissions.projects-write.workspace_roots]
    'D:\Projects' = true
    'C:\Users\<USER>\.codex' = true
    
    [permissions.projects-write.filesystem]
    'D:\Projects' = "write"
    'C:\Users\<USER>\.codex' = "write"

    There is no top-level sandbox_mode or [sandbox_workspace_write] in this global config.

    Steps and observed behavior

    1. Open an existing local chat originally using Ask for approval.
    2. Add the named permission profile above and restart the Windows app.
    3. Select projects-write from the permission dropdown.
    4. Send a message.
    5. Observe that the dropdown reverts to Ask for approval.
    6. Send a follow-up without selecting a different permission mode.
    7. Inspect the effective turn context: it now uses :workspace and no longer includes either additional writable directory.

    The first submitted turn after selection did receive write entries for both extra directories. The next turn did not. This is therefore more than a visual label mismatch.

    The same dropdown reversion was also verified in another fresh chat and after reopening the app. It is not limited to the original existing chat. The detailed logs below were captured from the original chat; separate logs from the fresh-chat/app-reopen tests are not included.

    Redacted diagnostic evidence

    The persisted host selection remained:

    {
      "kind": "profile",
      "profileId": "projects-write"
    }

    Meanwhile, the cached permissions for this chat identified its active profile as :workspace.

    Two consecutive desktop log entries on October 8, 2026 show the transition. Only relevant fields are included; account, chat, request IDs, usernames and private paths are omitted:

    08:06:14 UTC — turn-start config resolved
    useAppServerPermissionDefault=true
    requestPermissionProfile=null
    requestSandboxPolicyType=workspaceWrite
    requestSandboxWritableRootCount=4
    
    08:06:45 UTC — turn-start config resolved
    useAppServerPermissionDefault=false
    requestPermissionProfile=:workspace
    requestSandboxPolicyType=null
    requestSandboxWritableRootCount=0
    

    The second request uses a named built-in profile, so the zero sandbox-root count in that request is not by itself proof of lost access. The loss of the extra directories is independently visible in the next turn's effective permission context.

    Possible cause, not confirmed

    Read-only inspection of the shipped Electron JavaScript bundle found:

    • The existing-chat picker derives its displayed selection from cached thread permissions.
    • In the turn-preparation path, a branch using the app-server default retains the chat's existing currentPermissions.
    • Subsequent requests can select the profile ID from cached thread settings/current permissions.

    These paths are consistent with the custom profile's filesystem access being applied for one turn without updating its cached profile identity, followed by a return to :workspace. The exact trigger and root cause are not proven. No installed app code or session database was modified.

    Expected behavior: sending a message should preserve the selected named profile and its additional writable roots until I explicitly change the permission mode. If the selection cannot be applied, the app should explain that instead of silently reverting.

    Related Windows report: #32338.

  6. FelixDiLenarda commented on Nov 9, 2026

    @FelixDiLenarda

    I can reproduce a closely matching issue on Ubuntu 24.04, using the Codex desktop app with bundled codex-cli 0.159.2.

    My configuration is:

    default_permissions = "workspace-only"
    
    [permissions.workspace-only]
    extends = ":workspace"
    
    [permissions.workspace-only.filesystem]
    ":root" = "deny"
    ":minimal" = "read"
    ":tmpdir" = "deny"
    ":slash_tmp" = "deny"
    "/usr/lib/chatgpt/resources" = "read"

    Reproduction:

    1. Start a new desktop chat with workspace-only selected.
    2. Ask Codex to execute commands. The initial turn succeeds, including creating, reading and deleting a test file inside the workspace.
    3. Send a second message requesting the same checks.
    4. The permission selector switches to “Approve for me”, and command execution fails before the requested command starts:
    bwrap: execvp /usr/lib/chatgpt/resources/codex: No such file or directory
    

    The executable exists on the host and is executable. The permission context supplied to the assistant also changes: the explicit :minimal and /usr/lib/chatgpt/resources read entries disappear, while the root-deny rule remains.

    After resolving a separate Ubuntu AppArmor prerequisite by loading bwrap-userns-restrict, a direct sandbox test using the same bundled executable and unchanged workspace-only profile succeeds. The desktop chat continues to fail.

    Restarting the app, creating a fresh chat and manually reselecting the profile did not reliably preserve it across messages.

    Expected behavior: the selected profile and its complete filesystem rules should remain active until explicitly changed. If the app cannot preserve the profile, it should report that failure rather than silently switch modes.

    This appears consistent with the profile-loss behavior reported here, although I cannot confirm the same internal root cause. I want to retain the configured restrictions; broadening filesystem access is not an acceptable workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugconfigsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions