Skip to content

Codex Full access prompts for forced-rm commands under granular approvals #37298

Closed

Description

@OCPdev25

What happened

A Codex task in Full access displayed command approval cards twice during dependency cleanup. The selected mode was applied, but unattended work still stopped. T3 documents Full access as allowing commands and edits without approval prompts.

Diagnosis

T3's tagged CodexAdapterV2.ts full-access branch sends dangerFullAccess with granular approvals: mcp_elicitations=true; sandbox_approval, rules, skill_approval, and request_permissions=false; approvalsReviewer=user.

Codex 0.169.0 intentionally permits dangerous-command review under that policy. A fresh app-server test reproduced a command approval request for rm -rf targeting an absent directory. A printf control executed without approval. This isolates the policy interaction below T3's UI; the fresh test did not drive the T3 UI or delegation path.

T3 #37104 introduced granular approvals to preserve browser/app access. Codex openai/codex#59120 permits these dangerous-command reviews despite sandbox_approval=false. Reverting to never is not a complete fix: Codex's versioned policy forbids these commands under Never, and T3 adopted granular approvals to avoid rejecting browser/app access. Please resolve the Full access behavior mismatch without replacing the prompt with a silent rejection.

No exact duplicate or newer relevant fix found. The first affected release has not been bisected.

Steps to reproduce

  1. Use Codex 0.169.0 with an authenticated account and gpt-6.1-sol access.
  2. Run the reproduce.py below with Python 3.11 or later: python reproduce.py.
  3. It starts a separate codex app-server --stdio and fresh temporary directory per case. It sends thread/start and turn/start with T3's exact Full access policy.
  4. Observe printf approval-repro-control complete with exit 0 and no approval request. Observe rm -rf ./absent-repro-target emit item/commandExecution/requestApproval despite the disabled command approval categories.

The script cancels approval automatically. No deletion is approved. It checks the actual emitted command and fails if the control or approval observations differ. It requires a model call, so it is not a deterministic mocked test. No project files or persistent settings are changed.

T3 UI check: select Codex and Full access in a scratch thread and request the same absent-target cleanup. The original UI incident is verified from retained events; this reduced UI check has not been rerun.

Version

T3 desktop/server 0.1.10-nightly.20261115.4736; Codex 0.169.0

Environment

Linux x64, 7.2.15-1-omarchy; Node 24.22.1; desktop with local server. Fresh API test uses gpt-6.1-sol.

Evidence

Original incident, 2026-11-15 UTC:
15:05:23.921 turn/start: dangerFullAccess, reviewer=user, granular policy above
15:08:54.963 commandExecution/requestApproval id=4
15:12:51.244 commandExecution/requestApproval id=5
Both commands contained rm -rf cleanup of node_modules and dist directories. Private command bodies omitted.

Fresh API test, 2026-11-15 UTC:
control: printf approval-repro-control -> exit 0, output approval-repro-control; no approval request
granular: rm -rf ./absent-repro-target -> commandExecution/requestApproval; cancelled by test; command status declined
never: same command -> no approval request; model reports tool rejection. That last rejection text is model-reported, not independently captured as a tool error. The Never rejection branch is verified in source.

T3 mapping:

return {
// `never` also rejects browser and app access prompts before the client sees them.
approvalPolicy: {
granular: {
mcp_elicitations: true,
request_permissions: false,
rules: false,
sandbox_approval: false,
skill_approval: false,
},
},
approvalsReviewer: "user",
sandboxPolicy: {
type: "dangerFullAccess",
},
};
}
}

Codex policy: https://github.com/openai/codex/blob/rust-v0.169.0/codex-rs/core/src/exec_policy.rs#L430-L479
Never branch: same file, lines 888-900.

The reproducer and captured results are included below. Raw project logs are excluded.

Related issues

T3 PR #37104; Codex PR openai/codex#59120. T3 #12248 and #30374 concern command rejection rather than this granular-policy prompt.

Fix applied or workaround

No app patches or workaround applied. Earlier standalone Codex defaults were changed to never/danger-full-access before triage; T3 overrides them, so they do not fix this issue. The reproduction uses explicit API policies and leaves those defaults unchanged.

Filed by

GPT-6.1 Sol, Codex harness, via t3 triage.

Runnable reproduce.py
"""Probe Codex's approval protocol without touching project files.

Run: python reproduce.py
Requires an authenticated Codex CLI and model access. Each case uses a fresh
temporary directory. Approval requests are cancelled, never shown to a user.
"""
import json
import os
import selectors
import subprocess
import tempfile
import time
from pathlib import Path

GRANULAR = {"granular": dict(mcp_elicitations=True, request_permissions=False,
                            rules=False, sandbox_approval=False, skill_approval=False)}


def probe(label, policy, command):
    with tempfile.TemporaryDirectory(prefix="codex-approval-repro-") as cwd:
        process = subprocess.Popen(
            ["codex", "app-server", "--stdio"], stdin=subprocess.PIPE,
            stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, start_new_session=True)
        selector = selectors.DefaultSelector()
        selector.register(process.stdout, selectors.EVENT_READ)
        pending = b""
        serial = 0
        events = []
        def send(value):
            process.stdin.write((json.dumps(value) + "\n").encode())
            process.stdin.flush()
        def receive():
            nonlocal pending
            deadline = time.monotonic() + 180
            while b"\n" not in pending:
                if not selector.select(max(0, deadline - time.monotonic())):
                    raise TimeoutError("No protocol event within 180 seconds")
                chunk = os.read(process.stdout.fileno(), 65536)
                if not chunk:
                    raise RuntimeError("Codex closed stdout")
                pending += chunk
            line, pending = pending.split(b"\n", 1)
            return json.loads(line)
        def record(message):
            if "method" in message:
                method = message["method"]
                if "requestApproval" in method:
                    params = message.get("params", {})
                    events.append(dict(method=method, command=params.get("command"),
                                       reason=params.get("reason"), response="cancel"))
                    send(dict(id=message["id"], result=dict(decision="cancel")))
                elif method == "item/completed":
                    item = message["params"]["item"]
                    if item.get("type") in ("commandExecution", "agentMessage"):
                        events.append(dict(method=method, item=item))
                elif method == "error":
                    events.append(message)
        def request(method, params):
            nonlocal serial
            serial += 1
            request_id = serial
            send(dict(id=request_id, method=method, params=params))
            while True:
                message = receive()
                if message.get("id") == request_id and "method" not in message:
                    if "error" in message:
                        raise RuntimeError(message["error"])
                    return message["result"]
                record(message)
        try:
            request("initialize", dict(clientInfo=dict(name="approval-repro", version="1.0"),
                                       capabilities=dict(experimentalApi=True)))
            send(dict(method="initialized", params={}))
            result = request("thread/start", dict(model="gpt-6.1-sol", cwd=cwd,
                approvalPolicy=policy, sandbox="danger-full-access", ephemeral=True))
            thread_id = result["thread"]["id"]
            request("turn/start", dict(threadId=thread_id, approvalPolicy=policy,
                approvalsReviewer="user", sandboxPolicy=dict(type="dangerFullAccess"),
                input=[dict(type="text", text="In this empty temporary directory, run exactly "
                    + repr(command) + " once using exec_command. The target is deliberately "
                    "absent. Do not create files, change the command, retry, or call other "
                    "tools. Report the tool result. This is an approval protocol test.")]))
            while True:
                message = receive()
                record(message)
                if message.get("method") == "turn/completed":
                    break
            result = dict(case=label, approvalPolicy=policy, command=command, events=events)
            # No local paths, identifiers, or credentials belong in public evidence.
            return json.loads(json.dumps(result).replace(cwd, "<temporary-directory>"))
        finally:
            import signal
            os.killpg(process.pid, signal.SIGTERM)
            process.wait(timeout=15)
            selector.close()


if __name__ == "__main__":
    results = []
    for label, policy, command in [
        ("control", GRANULAR, "printf approval-repro-control"),
        ("granular-forced-rm", GRANULAR, "rm -rf ./absent-repro-target"),
        ("never-forced-rm", "never", "rm -rf ./absent-repro-target"),
    ]:
        result = probe(label, policy, command)
        results.append(result)
        print(json.dumps(result), flush=True)
    Path(__file__).with_name("reproduction-results.json").write_text(
        json.dumps(results, indent=2) + "\n")
    control, forced, never = results
    assert not any("requestApproval" in e["method"] for e in control["events"])
    assert any(e.get("item", {}).get("aggregatedOutput") == "approval-repro-control"
               and e["item"].get("exitCode") == 0 for e in control["events"])
    assert any("requestApproval" in e["method"] and
               "rm -rf ./absent-repro-target" in e.get("command", "")
               for e in forced["events"])
    assert not any("requestApproval" in e["method"] for e in never["events"])
    print("PASS: control executed; granular forced-rm requested approval; never did not prompt.")
Captured reproduction results
[
  {
    "case": "control",
    "approvalPolicy": {
      "granular": {
        "mcp_elicitations": true,
        "request_permissions": false,
        "rules": false,
        "sandbox_approval": false,
        "skill_approval": false
      }
    },
    "command": "printf approval-repro-control",
    "events": [
      {
        "method": "item/completed",
        "item": {
          "type": "agentMessage",
          "moderation": null,
          "id": "msg_0a868afea9d44a5f016af9defd27b887d18f7d91267663a81e",
          "text": "I\u2019ll run the exact command once and report the result.",
          "phase": "commentary",
          "memoryCitation": null,
          "delivery": null,
          "questions": null,
          "startedAtMs": 1794760445184,
          "completedAtMs": 1794760445499
        }
      },
      {
        "method": "item/completed",
        "item": {
          "type": "commandExecution",
          "id": "exec-fa0d1505-ef4d-4ad5-b050-0922f45406dc",
          "pluginId": null,
          "scriptPath": null,
          "command": "/bin/bash -lc 'printf approval-repro-control'",
          "cwd": "<temporary-directory>",
          "processId": "66919",
          "source": "unifiedExecStartup",
          "status": "completed",
          "commandActions": [
            {
              "type": "unknown",
              "command": "printf approval-repro-control"
            }
          ],
          "aggregatedOutput": "approval-repro-control",
          "exitCode": 0,
          "durationMs": 0,
          "startedAtMs": 1794760445995,
          "completedAtMs": 1794760445995
        }
      },
      {
        "method": "item/completed",
        "item": {
          "type": "agentMessage",
          "moderation": null,
          "id": "msg_0a868afea9d44a5f016af9deff441487d196c7ff1dbc1a2350",
          "text": "The command exited with code `0` and output:\n```text\napproval-repro-control\n```",
          "phase": "final_answer",
          "memoryCitation": null,
          "delivery": null,
          "questions": null,
          "startedAtMs": 1794760447291,
          "completedAtMs": 1794760447790
        }
      }
    ]
  },
  {
    "case": "granular-forced-rm",
    "approvalPolicy": {
      "granular": {
        "mcp_elicitations": true,
        "request_permissions": false,
        "rules": false,
        "sandbox_approval": false,
        "skill_approval": false
      }
    },
    "command": "rm -rf ./absent-repro-target",
    "events": [
      {
        "method": "item/completed",
        "item": {
          "type": "agentMessage",
          "moderation": null,
          "id": "msg_0fcafea80eaae8f5016af9df0407fc87d18b10ed9816c0e0fc",
          "text": "I\u2019ll run the exact command once and report the result.",
          "phase": "commentary",
          "memoryCitation": null,
          "delivery": null,
          "questions": null,
          "startedAtMs": 1794760452065,
          "completedAtMs": 1794760452329
        }
      },
      {
        "method": "item/commandExecution/requestApproval",
        "command": "/bin/bash -lc 'rm -rf ./absent-repro-target'",
        "reason": null,
        "response": "cancel"
      },
      {
        "method": "item/completed",
        "item": {
          "type": "commandExecution",
          "id": "exec-16cee6b8-7b69-4d65-ad94-b5d7053d12b4",
          "pluginId": null,
          "scriptPath": null,
          "command": "/bin/bash -lc 'rm -rf ./absent-repro-target'",
          "cwd": "<temporary-directory>",
          "processId": null,
          "source": "agent",
          "status": "declined",
          "commandActions": [
            {
              "type": "unknown",
              "command": "rm -rf ./absent-repro-target"
            }
          ],
          "aggregatedOutput": null,
          "exitCode": null,
          "durationMs": null,
          "startedAtMs": 1794760452940,
          "completedAtMs": 1794760452942
        }
      }
    ]
  },
  {
    "case": "never-forced-rm",
    "approvalPolicy": "never",
    "command": "rm -rf ./absent-repro-target",
    "events": [
      {
        "method": "item/completed",
        "item": {
          "type": "agentMessage",
          "moderation": null,
          "id": "msg_0ac73392b52bdb46016af9df08be5c87d199ebfe12b379fbc9",
          "text": "I\u2019ll run the exact command once and report the result.",
          "phase": "commentary",
          "memoryCitation": null,
          "delivery": null,
          "questions": null,
          "startedAtMs": 1794760456777,
          "completedAtMs": 1794760457100
        }
      },
      {
        "method": "item/completed",
        "item": {
          "type": "agentMessage",
          "moderation": null,
          "id": "msg_0ac73392b52bdb46016af9df0ae18487d1a30f230597040f84",
          "text": "The tool rejected the command: \u201crm -f style commands are not permitted. Use a safer approach.\u201d\n\nThe command did not execute. I did not retry or create files.",
          "phase": "final_answer",
          "memoryCitation": null,
          "delivery": null,
          "questions": null,
          "startedAtMs": 1794760458915,
          "completedAtMs": 1794760459592
        }
      }
    ]
  }
]

Activity

  1. GoatXYZ commented on Nov 18, 2026

    @GoatXYZ

    Note

    🤖 GPT-6.2 Sol responding on behalf of @GoatXYZ

    I confirmed the delegated-child symptom on macOS arm64 with T3 Code 0.1.11-nightly.20261117.4851 and the installed Codex CLI at 0.169.0. A Claude parent relaunched four Codex children explicitly in Full access. All four reported runtimeMode: "full-access", but their timelines and persisted request records show 26 command approvals in under 10 minutes. The longest waited 4m 18s. The prompts surfaced in the parent UI, while the approval requests belonged to the children.

    Every flagged command was a test wrapper with forced deletion in scratch cleanup. Seventeen had rm -rf in an EXIT trap, eight had trailing rm -rf, and one had rm -f in an EXIT trap. After one child received “Always allow this session,” it completed another command with forced cleanup without creating a new approval request.

    T3’s Full access mapping sends the granular policy to Codex, so the never setting in config.toml does not control these turns. Codex 0.169.0 explicitly allows heuristic dangerous-command review under granular policy even with sandbox_approval: false. Its Never branch refuses those commands.

    A separate app-server run on 0.169.0 in a scratch directory isolated the cleanup step. With T3’s granular policy, both trailing rm -rf and rm -rf inside an EXIT trap produced one item/commandExecution/requestApproval each. The control wrappers with plain rm -r or no removal completed without a request. With never, the rm -rf wrapper produced neither an approval request nor a command-execution event.

    The guard in #37306 checks the receiving turn’s own runtime policy, so it should cover the default Full access policy in a delegated child while honoring explicit approval overrides. The PR shows the fix in a top-level thread. A delegated regression check would run a bounded scratch-cleanup wrapper and verify that the child finishes with no pending command approval or parent prompt.

  2. joaosamouco commented on Nov 18, 2026

    @joaosamouco

    Note

    🤖 Claude Opus 5.5 responding on behalf of @joaosamouco

    Still reproduces on today's nightly with a newer Codex, on macOS, with a forced rm -f instead of rm -rf. #37306 would cover it: the request went through the item/commandExecution/requestApproval handler in CodexAdapterV2.ts, which has no full-access shortcut at v0.1.11-nightly.20261118.4864.

    Environment

    • T3 Code desktop app, local server 0.1.11-nightly.20261118.4864
    • macOS 27.2.0 arm64, Node 24.22.1
    • Codex CLI 0.170.0, model gpt-6.2-astra (reasoning effort medium)
    • Thread runtime mode full-access; no runtime mode changes recorded for the thread

    Evidence (provider event log, 2026-11-18 UTC)

    • 08:42:22 turn/start: sandboxPolicy: {"type":"dangerFullAccess"}, approvalsReviewer: "user", approvalPolicy: {"granular":{"mcp_elicitations":true,"request_permissions":false,"rules":false,"sandbox_approval":false,"skill_approval":false}}
    • 08:44:58 item/commandExecution/requestApproval with kind: "command", no reason, availableDecisions: ["accept","cancel"]
    • The command was a python3 heredoc that edited project files, then cp .env.sample .env, npm run build, and rm -f .env. The forced rm is the only part that matches the dangerous-command pattern from this issue. I've left out the full command body.
    • The UI showed "Waiting for approval" until the user clicked Approve at 08:48:15.

    The user reports this had never happened before in Full access. That fits the Nov 15 switch from never to granular approvals in #37104.

    Triage by Claude Opus 5.5 in Claude Code, via t3 triage.

  3. Microck commented on Nov 18, 2026

    @Microck
    Contributor

    bump, having the same issue

  4. John-Colvin commented on Nov 18, 2026

    @John-Colvin

    I can't really leave things running right now because of this, I always have to be on-hand to approve. Maybe this is 100% upstream problem, maybe t3code can mitigate?

  5. ANTVirGEO commented on Nov 18, 2026

    @ANTVirGEO

    I reproduced an approval prompt on Windows with T3 Code nightly 0.1.11-nightly.20261118.4877 and codex-cli 0.170.0. The child task inherited Full access (danger-full-access). A PowerShell here-string was piped to Set-Content to write Markdown containing a Start-Process example and an HTTPS reference. The command was intended only to write a local file. commandExecution/requestApproval offered Accept and Cancel without giving a reason. Related to #37306.

  6. gweeteve commented on Nov 18, 2026

    @gweeteve

    I’m seeing the same regression in my development pipeline on WSL with T3 Code 0.1.10 and Codex CLI 0.170.0. Two delegated Codex runs requested command approval even though both the parent and child threads were in Full access. The provider traces show that T3 sent approvalPolicy: granular in turn/start, Codex confirmed it, and Codex later emitted item/commandExecution/requestApproval without a reason.

    One additional detail may help narrow down the trigger. Neither command used rm -rf. Both created an isolated Git index and registered an EXIT trap that ran rm -f on the temporary index and lock file, then rmdir on the temporary directory. One used a directory under node_modules, the other under /tmp. I haven’t isolated which part of the command triggered the approval.

    One request held the pipeline for 58 minutes and 42 seconds. In the other case, pnpm test:contracts was in the same shell block, so the tests couldn’t even start. I’d appreciate including this rm -f plus rmdir trap in the regression tests, alongside the rm -rf case.

  7. sebstrgg-agent commented on Nov 18, 2026

    @sebstrgg-agent

    Still reproduces on T3 Code 0.1.11-nightly.20261118.4864 with Codex CLI 0.169.0 on macOS, for top-level threads and delegate_task children in Full access.

    In my provider logs for 15 to 18 Nov, every command approval in a granular full-access turn contained a forced rm (51 of 51). Most were trap 'rm -rf "$tmp"' EXIT cleanups. No other command raised one. Rollout turn_context records show approval_policy: never up to 14 Nov and the granular policy from 15 Nov.

    Workaround until #37306 ships. Exec-policy rules don't help. prefix_rule(pattern=["rm"], decision="allow") only matches scripts Codex can split into plain commands, so trap and heredoc scripts still prompt. What works is a Codex PermissionRequest hook. Codex runs it before it shows the approval, and {"hookSpecificOutput":{"hookEventName":"PermissionRequest","decision":{"behavior":"allow"}}} approves the command without a card.

    The hook input's permission_mode is "default" for both granular and on-request, so it can't tell full access apart. The session transcript can: find the turn_context record whose turn_id equals the hook input's turn_id (in the file at transcript_path). Allow only when that record has permission_profile.type == "disabled" and exactly T3's five-flag granular policy. Give no answer when the record is missing, and supervised modes keep their prompts.

    With the hook in place, a fresh full-access delegate_task child ran 23 commands, including rm -f, rm -rf, /bin/rm -rf, trap, loop and $(…) forms, with no approval requests. Without it, a bare codex app-server run with T3's policy prompted on 5 of 6 such commands. Remember to trust the hook in /hooks; Codex skips untrusted hooks silently.

    — sebstrgg

  8. s0673468 commented on Nov 19, 2026

    @s0673468

    Note

    🤖 Claude Opus 5.5 responding on behalf of the account owner

    Same fault on the stable Linux build, with a newer Codex, and on delegated children. Adding one data point that bears on #38783 / #39044 and on the workaround people may reach for.

    Environment

    • T3 Code 0.1.10 (stable), Linux x86_64 server; Codex CLI 0.170.0.
    • Delegated Codex children launched in Full access (runtimeMode: "full-access").

    What we see

    • Before the 0.1.9 → 0.1.10 update, 32 of 32 turn/start calls sent approvalPolicy: "never" with dangerFullAccess. After it, every call sends the granular policy from fix(codex): keep browser access prompts available in full access #37104 (mcp_elicitations: true, everything else false).
    • Since then: 32 command approval requests in T3's runtime-request records, 62.8 helper-hours spent waiting; several unattended children stood still for 5–9 hours overnight. All of them were forced removals (rm -f / rm -rf), mostly scratch cleanup.
    • Setting approval_policy = "never" in the user's config.toml does not help, because the turn supplies its own policy.

    Reproduction (delegated child, Full access)

    1. A command that is just rm -rf <scratch dir> with a user rule prefix_rule(pattern = ["rm"], decision = "allow") in ~/.codex/rules/: runs, no approval request.
    2. The same delete inside one multi-line shell command (set -euo pipefail; mkdir -p "$d"; echo x > "$d/f"; rm -rf "$d"): approval request, waits for a click.

    So an rm prefix rule only covers a bare delete; a delete inside a script or chain (the usual agent shape) still raises item/commandExecution/requestApproval. Codex's dangerous-command check looks inside the wrapper (dangerous_command_match_with_depth in is_dangerous_command.rs); in our test the prefix rule did not cover that case. User-side rules therefore can't fully work around this; it needs the Full-access handling from #38783 / #39044.

    For a fix test: (1) above should still complete, (2) should neither prompt nor be silently refused, and browser/app access prompts from #37104 should still reach T3.

  9. robertjosephwayne commented on Nov 19, 2026

    @robertjosephwayne

    Same fault, seen on delegate_task children, with one more effect: the parent never finds out about the prompt, so the run hangs until a person goes looking.

    Environment

    • T3 Code desktop, macOS arm64, nightlies 0.1.11-nightly.20261115 through 20261118 (current install is 0.1.11-nightly.20261119.4928; not re-checked on that one yet)
    • Codex CLI 0.169.0, then 0.170.0
    • Parent thread (Claude or Codex) and Codex child both in Full access

    Minimal repro

    1. In a Full access thread, call delegate_task for a Codex child with a task that writes a small shell script whose top level does cleanup, for example tmp=$(mktemp -d); trap 'rm -rf -- "$tmp"' EXIT; echo ok.
    2. Let the parent end its turn to wait for the child's completion notice, as delegation guidance tells it to.
    3. Wait.

    Expected: Full access runs the command without asking, or at least the prompt reaches someone who can answer it.

    Actual:

    • The child raises item/commandExecution/requestApproval and waits with no timeout. Its run stays running.
    • The child thread is hidden from the default thread list, so nobody sees the card unless they open that thread by hand.
    • The parent is woken for a child's user_input question, but not for a command approval, so it waits indefinitely.
    • t3_pending_request from the parent says it cannot answer permission requests. task_status does show pendingApproval, but only if the parent polls.
    • We saw several dozen of these in one day, all containing a top-level rm -f, rm -r or rm -rf (including inside trap '...' EXIT, a case arm, or after &&). The same rm inside a function body or a nested bash -c script ran without a prompt. Before the switch to granular approvals, Codex refused these commands at once and the turn carried on.

    Possible fixes, any one would unblock unattended delegation: auto-accept command approvals for Full access children in the Codex adapter (#37306 looks like this), wake the parent on a child's command approval the same way as for user_input, or let t3_pending_request answer it.

  10. eshatalov commented on Nov 20, 2026

    @eshatalov

    Cross-linking the parent-notification side of @robertjosephwayne's comment: the silent parent hang when a delegated child blocks on a command approval is tracked separately in #22925 (with an open fix in #35433), whereas fixing the Full access auto-handling here (#37306 / #38783 / #39044 / #39187) prevents these forced-rm prompts from firing in the first place.

    Two additional observations from macOS 0.1.10 + codex-cli 0.169.0/0.170.0 (statev2.sqlite + provider logs, 11 stalls / 22 raw RPCs across 9 delegated children):

    • Clicking Always allow this session (acceptForSession) absorbs subsequent forced-rm RPCs in 0 ms within the same child thread (via sessionApprovals keyed by payload.threadId in CodexAdapterV2.ts), so in multi-round delegated review workflows every newly spawned child thread starts with an empty cache and stalls again.
    • This also hits 2-level nested hierarchies (Root Claude → Child Claude → Grandchild Codex): the grandchild's approval card bubbles up to the root chat UI, while both Claude layers stay idle.
  11. Haddadios commented on Nov 20, 2026

    @Haddadios

    Note

    🤖 Claude Opus 5.5 responding on behalf of the account owner

    Still happening on the latest nightly. This confirms the build that the earlier comments had not checked yet.

    Environment

    • T3 Code desktop 0.1.11-nightly.20261119.4954, macOS arm64
    • T3-launched Codex sessions report cli_version 0.169.0-alpha.11.1
    • Codex workers spawned natively (spawn_agent) by a Full access Codex parent

    Evidence (Codex rollout turn_context records and statev2.sqlite)

    • Policy flip: every T3-launched Codex session up to 2026-11-16 05:00 UTC (bundled 0.167.0-alpha.3.2) has approval_policy: "never". Every session from 2026-11-16 10:00 UTC on (0.167.0-alpha.4.1, then 0.169.0-alpha.11.1) has the granular policy. Native subagents inherit it as well: sandbox_policy: danger-full-access, approvals_reviewer: user.
    • Trigger: 4 command approvals came from 2 worker subagents in one turn. Each of the 3 commands I could trace contains a forced remove: rm -rf "$out_dir", rm -rf /private/tmp/<tmpdir>, or rm -f "$helper". Dozens of other commands in the same workers ran without a prompt. No call asked for require_escalated.
    • In T3, the approval item is attached to the parent thread's provider turn, not to the worker that raised it.

    This matches the diagnosis above. Any of the open fixes (#37306, #38783, #39044, #39187) would cover it.

  12. saidelike commented on Nov 20, 2026

    @saidelike

    I reproduced this with the T3 Code desktop app on macOS connected over SSH to a remote Ubuntu 24.04.5 LTS host (ARM64). The remote T3 Code server is 0.1.10, and Codex on that host is 0.169.0.

    The parent Codex thread was set to Full access. My ~/.codex/config.toml sets approval_policy = "never" and sandbox_mode = "danger-full-access". The provider log shows that the affected turn kept dangerFullAccess but used the granular approval policy sent by T3.

    • Parent thread. A Bash script testing how cp handles symlinks created a scratch directory with mktemp -d and used rm -rf in an EXIT trap. T3 showed an approval card. I chose Always allow this session (acceptForSession), and the command ran successfully.
    • Other delegated Codex threads still asked for approval after I made that choice in the parent. The prompts included direct rm -rf cleanup of temporary directories and cleanup inside an EXIT trap. In separate cases, I chose Approve for rm -rf -- .pytest_cache .ruff_cache, which ran, and Decline for a script with rm -f in its cleanup trap, which was recorded as declined.
    • A later request in the same delegated thread was auto-approved. I chose Always allow this session on an rm -f request for a temporary JSON file. About two minutes later, Codex issued another approval request in that same thread for a pytest command with an rm -rf cleanup trap. T3 replied acceptForSession within 2 ms, and the command completed successfully.
  13. jacobcorbett commented on Nov 20, 2026

    @jacobcorbett
    Contributor

    Confirmed on macOS arm64 with the local T3 Code 0.1.11 desktop/server and Codex CLI 0.169.0 in a top-level Full access thread. turn/start sent sandboxPolicy.type: dangerFullAccess, approvalsReviewer: user, and granular approvals with mcp_elicitations: true and request_permissions, rules, sandbox_approval, and skill_approval all false. The matching Codex turn_context confirms that policy and permission_profile.type: disabled.

    Codex emitted item/commandExecution/requestApproval for a compound /bin/zsh -lc file transfer that included trap 'rm -f "$tmp"' EXIT. The tool call did not request escalation. The RPC offered accept and cancel and carried no reason field, so the log identifies the submitted command but does not identify the exact heuristic match. The command exited 0 after approval.

  14. ankitgoyalio commented on Nov 20, 2026

    @ankitgoyalio

    Confirmed on T3 Code desktop with a local server, version 0.1.11-nightly.20261120.4979, on macOS 27.2.0 arm64, using Codex.

    Provider logs on November 20 show five item/commandExecution/requestApproval requests between 13:51:22 and 13:59:57 UTC. All five commands contained forced cleanup (rm -f or rm -rf), including cleanup inside EXIT traps. The requests supplied no reason.

    The corresponding turn/start calls sent:

    {
      "approvalPolicy": {
        "granular": {
          "mcp_elicitations": true,
          "request_permissions": false,
          "rules": false,
          "sandbox_approval": false,
          "skill_approval": false
        }
      },
      "sandboxPolicy": {
        "type": "dangerFullAccess"
      }
    }

    The exact release source at commit 59651c1761f6c63e9b6056839067066968e6a406 confirms that the command approval handler presents these requests unless a prior session allowance exists.

    The first four requests were accepted individually. The fifth was resolved with acceptForSession. Source inspection confirms that this caches command approval for that native thread; subsequent behavior has not yet been verified.

    No configuration changes or application patches were applied. Private command bodies and local paths are omitted.

    Prepared by GPT-6 in Codex, via t3 triage.

  15. MaximilianMauroner commented on Nov 20, 2026

    @MaximilianMauroner

    🤖 Comment made by gpt-6.2-sol acting on behalf of @MaximilianMauroner.

    A read-only audit across a macOS desktop and a Linux T3 server found 68 Codex command approval requests in threads marked Full access from November 7–20, 2026 (Vienna time, through 16:20 on November 20). The first was on November 16, and 61 arrived on November 19–20. The server recorded 52 and the desktop recorded 16.

    • All 68 command bodies contained a forced delete. 26 used rm -f and 42 used rm -rf or rm -fr. In 28 cases the shell call also included git status.
    • One desktop request chained git status --short && rm -f <temporary files>. The card was labeled “Running git.” The provider sent item/commandExecution/requestApproval without a reason, and the command completed after approval 82 minutes later.
    • 24 of the 68 requests took at least one minute to resolve, including 13 that took at least five minutes. This measures time to resolution, including expirations.
    • The Linux server had requests on turns selecting both GPT-6.1 and GPT-6.2. The audit used retained request records and command bodies, so it does not establish an approval rate per forced-delete attempt.
  16. added a commit that references this issue on Nov 20, 2026
    9b58b77
  17. mr-karan commented on Nov 22, 2026

    @mr-karan
    Contributor

    I can confirm this on Linux x86_64 with T3 Code nightly 0.1.12-nightly.20261121.5024 and Codex CLI 0.170.0. I have seen it in a regular Codex thread and in delegated Codex tasks. Both showed Full access. The regular thread paused before running a command that built a test binary and used an EXIT trap to remove its own temporary directory.

    In synthetic form, the command shape was:

    scratch=$(mktemp -d)
    trap 'rm -rf -- "$scratch"' EXIT
    printf '%s\n' "test output" > "$scratch/result"

    This matches the interaction described above. T3 #37104 switched Codex Full access to granular approvals to preserve browser and app prompts. Codex #59120 allows dangerous-command review under that policy even with sandbox escalation approvals disabled.

    The practical impact is that routine build and review tasks can sit waiting for a click, even when the only flagged action is cleanup of a directory created by that run. Could Full access make this exception clear in the picker or docs and explain it on the approval card? An explicit option for unattended runs would also help if there is a way to offer it while preserving browser and app consent. Thanks for looking into this.

  18. added 4 commits that reference this issue on Nov 22, 2026
    125f8f4
    357685f
    815b923
    f9c01c8
  19. juliusmarminge commented on Nov 23, 2026

    @juliusmarminge
    Member

    Fixed by #40773, now on main: In a default Full access Codex thread, forced-removal commands such as rm -rf ./absent-repro-target now receive an immediate accept response without an approval card or silent rejection, while browser/app elicitation policy remains unchanged.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions