Skip to content

Desktop project task creation forces :read-only and ignores trusted project permission profile #41410

Open

Description

@garpunzel

What version of the Codex App are you using?

Codex Desktop 26.820.60940; bundled codex-cli 0.150.0-alpha.8.

What subscription do you have?

ChatGPT Pro.

What platform is your computer?

macOS 15.1, Apple Silicon.

What issue are you seeing?

Codex Desktop project tasks created through the built-in create_thread path receive the global :read-only permission profile even when the target is a trusted saved project whose project-local .codex/config.toml selects a valid named permission profile.

The target project configuration is equivalent to:

approval_policy = "on-request"
default_permissions = "project-write"

[permissions.project-write]
extends = ":read-only"

[permissions.project-write.filesystem]
"/Users/me/project" = "write"
"/Users/me/project-vault" = "write"

[permissions.project-write.network]
enabled = true

The exact saved project path is trusted in the user-level config. There are no legacy sandbox_mode or sandbox_workspace_write settings. The saved project primary path points to the execution root, not the Vault.

Despite this, every created task reports:

active_permission_profile.id = :read-only
sandbox_policy.type = read-only
permission_profile.filesystem = read :root
permission_profile.network = restricted

Source evidence isolates the transition:

  1. The create_thread request contained the correct saved project id and environment, but no permission-profile parameter.
  2. At the same launch boundary, the Desktop log recorded:
requestPermissionProfile=:read-only
useAppServerPermissionDefault=false

The transport therefore selected :read-only explicitly instead of allowing the trusted project default to resolve.

What steps can reproduce the bug?

  1. Set global default_permissions = ":read-only".
  2. Trust a saved Git project.
  3. In that project, define and select a named write profile in .codex/config.toml, with project writes and network enabled.
  4. Create a project task through Codex Desktop task creation using a worktree environment.
  5. Inspect the first turn_context: it receives :read-only.
  6. Hand the same task from the worktree to the saved-project checkout and start another turn: it remains :read-only.
  7. Create a second task directly in the saved-project checkout using the local environment.
  8. Inspect its first turn_context: it also receives :read-only.

Observed finite reproduction set: 2/2 fresh creation modes fail (worktree, local); handoff also preserves the wrong profile.

What is the expected behavior?

For a trusted project target, Desktop should either:

  1. resolve and pass the projects selected default_permissions profile to app-server thread/start; or
  2. expose a named permission-profile parameter in create_thread and select it after permissionProfile/list validates it for the target cwd.

Desktop should not silently force global :read-only while the UI identifies the task as belonging to a project whose selected permission profile is different.

Additional information

  • The project selector, saved primary path, trust entry, and project config were independently verified.
  • Worktree versus local checkout does not change the result.
  • Handoff is not a permission-refresh mechanism.
  • Existing task snapshots are not the whole problem: a genuinely new local project task reproduces it.
  • No Codex database, rollout, app bundle, or private Desktop state was modified during diagnosis.
  • Raw task ids, user paths, and task contents are omitted. Exact timestamps and sanitized log spans can be supplied privately if needed.

Relevant app-server documentation already supports named permissions on thread/start and recommends permissionProfile/list with the target cwd; the Desktop task-creation wrapper appears to omit that selection and then disable the app-server default.

Activity

  1. added
    bug
    app
    app-server
    sandbox
    on Aug 28, 2026
  2. Xexr commented on Sep 9, 2026

    @Xexr

    Additional macOS reproduction: a named project profile is ignored by the agent-created task path, while a manually created task works.

    Environment

    • Codex Desktop 26.707.31428, macOS.
    • A trusted saved Git project with a project-local named permission profile.
    • The profile name below is a generic replacement, not the actual project/profile name.

    Observed comparison

    Creation route Effective execution policy
    Agent calls create_thread for the saved project with a new worktree Built-in :workspace; broad root read; network restricted
    User manually creates a task with the project environment and named profile selected Intended named profile; root denied except the reviewed allowlist; network enabled

    In the failing task, the composer displayed the intended custom profile even though the actual runtime policy was :workspace. The difference was checked against the effective turn context, not inferred only from command errors or the UI label.

    A subsequent tool-sent message to the failing task retained the wrong policy. A tool-sent follow-up to the manually created control retained the correct policy. This narrows our observed discrepancy to task creation rather than all inter-task messaging.

    Reproduction outline

    1. Configure a trusted project's .codex/config.toml with default_permissions = "project-scoped" and a matching named profile extending :workspace, with a restricted filesystem allowlist and network enabled.
    2. From a task outside the saved project's primary directory, call the built-in create_thread for that project with environment: { type: "worktree" }.
    3. Inspect the child's first effective permission context before running project operations.
    4. Compare with a task manually created using the same project, environment and intended profile.

    Packaged-client inspection

    Read-only inspection of the installed client shows the worktree-creation path filtering the source permission selection by source working directory versus destination project directory. A custom selection can be discarded across directories. The fallback uses the host's general agent mode with permission overrides enabled, rather than selecting the destination project's named default. The exposed create_thread schema provides no permission-profile argument.

    This is consistent with the observations above, but does not establish the cause of every related report or behavior on later builds. No app bundle, permission database, private desktop state or global default was changed to obtain these results.

    Expected behavior

    Resolve and validate the intended profile against the destination project, or expose an explicit supported profile-selection mechanism. The composer should distinguish the effective runtime policy from a pending/default selection. This request is to preserve the intended restricted profile, not to grant Full Access.

    Manual creation is a temporary workaround in this test. See the follow-up below for the completed existing-task reselection test.

    No raw logs, screenshots, personal paths, project identifiers, task identifiers or credentials are attached.

    Follow-up: scheduled runs also bypass the named project profile

    Tested on the same installed Desktop build (26.707.31428, macOS).

    Two genuine scheduler-triggered, single-run diagnostics were used: one in a local project checkout and one in a scheduler-created worktree. Environment setup was disabled. Both first-turn runtime contexts reported:

    • Legacy sandbox: read-only.
    • Managed filesystem policy: root read allowed.
    • Network: restricted.
    • Approval policy: on-request; reviewer: auto_review.
    • No active named project profile.

    This is a different launch path from the agent-created task reproduction above; it should not be assumed to have the identical cause.

    Installed scheduler path

    Read-only inspection of the packaged client shows the cron scheduler:

    1. Reads the target configuration and the host's saved agent mode.
    2. Resolves that mode through a legacy sandbox resolver.
    3. Explicitly sends a legacy sandbox at thread start and sandboxPolicy at turn start, without forwarding the named permission profile.

    In this reproduction, the saved host mode was custom. Configuration specified default_permissions, approval_policy = "on-request", and approvals_reviewer = "auto_review", with no legacy sandbox_mode. The custom-mode resolver switches on sandbox_mode; when absent, it falls back to read-only instead of resolving default_permissions.

    This static trace is consistent with both actual scheduled runs. It is not a maintainer-confirmed diagnosis or a claim about later builds.

    Why a legacy-setting workaround is not equivalent

    Adding sandbox_mode = "workspace-write" may avoid the read-only fallback but would not preserve the named profile's root-deny and selective filesystem/network rules. Likewise, selecting Full Access is not the requested solution.

    The exposed automation controls do not provide a named permission-profile selector. Please make the scheduled launch path resolve and validate the target project's intended profile and preserve it through both thread and turn creation.

    Existing-task reselection result

    The previously unverified reselection test is now complete: switching an idle failed task from Ask for approval back to Custom (config.toml), then starting a fresh turn, did not repair its effective permission boundary. This does not rule out other supported reselection behavior on other versions.

    Both diagnostic schedules have been paused. No application workflow or credential retrieval was performed. One diagnostic attempted an unnecessary automation-memory write despite the no-write instruction; auto-review rejected it.

    No personal paths, actual project/profile names, task identifiers, configuration files, raw logs, screenshots, or secrets are included.

  3. info618 commented on Oct 15, 2026

    @info618

    Additional macOS evidence observed October 15, 2026. Last recorded Desktop build: 26.1007.71326 (20398); bundled runtime manifest: 0.162.0-alpha.17.2.

    A trusted saved project selects an existing named permission profile in project configuration. The user default is :workspace. Neither inspected config has a top-level sandbox_mode. The built-in create_thread schema exposes project/environment/model controls but no permissions/profile argument; existing-thread follow-up tools expose no profile-setting operation.

    Actual receiving observations on one retained tooling chat:

    • Initial startup: :workspace, command network disabled, on-request / auto_review.
    • Later ordinary turn: intended named profile, command network enabled.
    • After selecting Custom: no active profile, root-read-only filesystem, restricted network.
    • After selecting Approve for me: :workspace, workspace writes available, on-request / auto_review. Separately reviewed operations could proceed; this was not automatic named-profile repair.

    The automatic local-environment setup transcript exited 0. Environment setup and permission selection must remain distinct claims.

    A client log recorded requestPermissionProfile=:workspace and useAppServerPermissionDefault=false. These are request-construction log fields, not a captured complete wire RPC. Read-only installed-source inspection is consistent with saved host selection/destination-cwd filtering overriding the target default; exact UI-click causality and universal reproduction remain unproved.

    No app bundle, database, internal state, private RPC, managed policy, global permission boundary, helper or timer was changed. No synthetic proof task was created for this addendum. The public app-server docs describe experimental named permissions and permissionProfile/list(cwd), but the Desktop tool catalog does not expose that control.

    Please identify a supported project-scoped persistent selection mechanism or a fixed Desktop build that:

    1. Resolves and validates the destination project's named profile before a create_thread child's first turn, without repeated manual selection.
    2. Exposes a supported existing-thread profile update when correction is needed.
    3. Keeps the displayed selection and actual receiving permission snapshot consistent.

    A per-chat composer selection is a manual workaround, not evidence of an automatic-dispatch fix. A machine-wide allowlist would change unrelated sessions and is not the requested scoped repair.

    Official references:
    https://learn.chatgpt.com/docs/permissions
    https://learn.chatgpt.com/docs/config-file/config-basic
    https://learn.chatgpt.com/docs/app-server

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

    appapp-serverbugsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions