Skip to content

[Windows][Desktop 26.901.20858] "Approve for me" (guardian-approvals) permission mode unavailable with API-key auth (gate 3902016271) #42442

Open

Description

@HaoYue1027

Environmental snapshot: Windows 11 build 26200; MSIX OpenAI.Codex 26.901.1978.0; embedded App 26.901.20858; bundled app-server/CLI 0.153.0; ~/.codex uses API-key auth (preferred_auth_method = "apikey", no auth.json/auth.toml, custom provider). The local config.toml has no features.guardian_approval entry.

Repro

  1. Open any conversation's permission dropdown (composer permissions control or workspace settings).

  2. Observed options: "请求批准 / Ask (default)", "完全访问权限 / Full access", "自定义 / Custom (config.toml)".

  3. The "帮我批准 / Approve for me (guardian-approvals)" option is absent/hidden; where surfaced elsewhere it is disabled with "需要此工作空间中的默认沙盒权限 / Requires the default sandbox permissions in this workspace".

  4. config.toml currently has:

    approval_policy = "on-request"
    sandbox_mode = "workspace-write"
    [sandbox_workspace_write]
    sandbox = "elevated"

Expected vs Actual

Expected: "帮我批准 / Approve for me" mode (guardian-approvals: only request approval for detected risky operations) should be selectable, especially since the runtime auto-review path is active for this user.

Actual: the guardian option is unavailable for this configuration, silently.

Root-cause observations (app.asar of 26.901.20858)

  • The permission dropdown derives agent modes through a selector (zto): u = isAutoReviewRequiredForSelectedModel || isGuardianApprovalEnabledByStatsig || hasAuthoritativeGuardianApprovalDefault; l = axt(resolvedConfig) ?? true, where axt(e) = Hbt(e, 'guardian_approval') and Hbt reads the boolean config.features.guardian_approval (defaults to true when absent). The guardian-approvals mode is retained only when u && l (or when it is the only available mode). isGuardianModeAvailable and showGuardianOption both descend from these values.
  • isGuardianApprovalEnabledByStatsig is dynamicConfig.guardian_approval === true, and the app registers this as gate 3902016271 with featureKey guardian_approval.
  • A separate helper (XNr) requires agentMode === 'auto' && !isConfigDataPending && isGuardianModeAvailable && showGuardianOption for the guardian option to appear.
  • The config-to-mode resolver (ixt) maps workspace-write + a default [sandbox_workspace_write] block into auto/granular/guardian-approvals; with an explicit approval_policy = "on-request" it resolves to auto. Note: the "defaultness" check (rxt) only inspects writable_roots, network_access, exclude_slash_tmp and exclude_tmpdir_env_var; sandbox = "elevated" is not part of that check.
  • Isolation: the same session runs with approvals_reviewer = auto_review (runtime automatic approval review works), so the runtime mechanism is available; only the agent-mode guardian option is gated off at the UI layer.

Correction note

An earlier draft of this issue attributed the missing mode to a non-default [sandbox_workspace_write] block and to a missing guardian-approval permission profile. Re-checking the source shows both are incorrect: rxt ignores the sandbox field, and axt is a config.features.guardian_approval boolean check that defaults to true. The most plausible gating factor is the u branch (Statsig gate 3902016271, a model-specific auto-review requirement, or an authoritative guardian-approval default) rather than the local config.

Related, not duplicates

Notes / boundaries

  • Statsig runtime values and isAutoReviewRequiredForSelectedModel cannot be observed from outside the runtime, so which disjunct of u fails is not proven; the u && l structure, the gate id, and the local-config irrelevance are verified from source.
  • No config/UI change was made while investigating.

Request

Please confirm whether "帮我批准 / Approve for me (guardian-approvals)" is intentionally unavailable for API-key/custom-provider setups (gate 3902016271 not enabled, or a model without an auto-review requirement); if intended, a clear in-UI explanation for why it is missing would help. If not intended, this should restore the mode or surface the actionable requirement instead of hiding it.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    config
    auth
    on Sep 3, 2026
  2. changed the title [-][Windows][Desktop 26.901.20858] "Approve for me" (guardian-approvals) permission mode unavailable with API-key auth and custom sandbox config[/-] [+][Windows][Desktop 26.901.20858] "Approve for me" (guardian-approvals) permission mode unavailable with API-key auth (gate 3902016271)[/+] on Sep 3, 2026
  3. HaoYue1027 commented on Sep 3, 2026

    @HaoYue1027
    Author

    Self-review correction: the first version of this issue attributed the missing Guardian mode to a non-default [sandbox_workspace_write] block and to a missing guardian-approval permission profile. On re-check against the shipped bundle, both were wrong: the rxt defaultness check does not inspect the sandbox field, and axt reads the boolean config.features.guardian_approval (absent -> true). The body and title have been edited accordingly; the likely gating factor is the u branch (Statsig gate 3902016271 / model auto-review requirement / authoritative default), which is not externally observable.

  4. HaoYue1027 commented on Sep 3, 2026

    @HaoYue1027
    Author

    Follow-up investigation (source-excerpt based, 26.901.20858 bundle):

    1. The u branch is precisely: isAutoReviewRequiredForSelectedModel (server-side requirements.autoReview.requiredOnModels), OR Statsig gate 3902016271 (featureKey guardian_approval), OR hasAuthoritativeGuardianApprovalDefault where that flag is threadMode === "guardian-approvals" AND the host supports it. The last one is effectively a one-way gate: a thread that has left guardian mode cannot set threadMode back through the dropdown, because the guardian option itself is only retained when u is already true.

    2. Agent mode is persisted at host/cwd scope (agent-mode-by-host-id, preferred-non-full-access-agent-mode-by-host-id, and a cwd-scoped {isSet,value} override). Selecting "Ask" via the dropdown records an override; no reset UI was found in the bundle.

    3. Practical consequence for this setup: with no auto-review-required model, no statsig gate and no existing guardian thread setting, "Approve for me" cannot be re-enabled from the UI. The only immediate UI path to stop approval prompts is "Full access" (full-access). Note that approval_policy="never" is not equivalent (blocked actions fail instead of being allowed) and "untrusted" is rejected at startup since 0.149 (Retiring approval_policy="untrusted" without deprecation weakens the execution-approval boundary #39973).

    4. A testable hypothesis for maintainers: if the user selects an official model covered by requirements.autoReview.requiredOnModels, u becomes true and the guardian option should appear. If that does not happen, the gate/flag wiring is the blocker.

    Boundaries: requirements.autoReview.requiredOnModels and the statsig gate state are runtime/server-provided and were not observable locally; the "no reset UI" claim is based on bundle inspection only.

  5. Misaka-Nyami commented on Sep 3, 2026

    @Misaka-Nyami

    Confirmed on the same setup: Windows 11 build 26200, Codex Desktop 26.901.1978.0 (embedded App 26.901.20858), API-key auth with a custom DeepSeek provider. “Approve for me” is missing in every chat here as well.
    Additional data points:

    • Older chats created the previous day still record approvals_reviewer = auto_review in their thread settings (and ran with auto-review back then), but reopening them today no longer shows the option either.
    • I also tested with the official OpenAI provider (model gpt-5.6-sol) in a brand-new chat — still missing. So it does not seem specific to the custom provider.
    • No requirements.toml; config.toml has no features.guardian_approval; the local Statsig cache contains no gate data.
      This matches the root-cause analysis above. Happy to provide session IDs or logs if useful.
  6. amanosatosi commented on Sep 13, 2026

    @amanosatosi

    bruh. same. Version 26.908.40834 (chat gpt desktop app)
    it just suddenly gone without warning.

  7. amanosatosi commented on Sep 14, 2026

    @amanosatosi

    it's back now.

  8. darvenQ commented on Oct 14, 2026

    @darvenQ

    对于中国用户有可能能解决:可以检查下你的VPN,是不是当前节点网络状态太差了,我重启了很多次,打开梯子一看700ms,换了一个一百多ms的,重启软件就好了

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

    appauthbugconfigsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions