Codex Full access prompts for forced-rm commands under granular approvals #37298
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#
- Use Codex 0.169.0 with an authenticated account and gpt-6.1-sol access.
- Run the reproduce.py below with Python 3.11 or later: python reproduce.py.
- 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.
- 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: https://github.com/pingdotgg/t3code/blob/7379f1969b0f4b579327cf81299ef8cc3ddf8e9c/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts#L768-L785 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 https://github.com/openai/codex/pull/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
}
}
]
}
]
tanstack-source added labelsbug
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 -finstead ofrm -rf. #37306 would cover it: the request went through theitem/commandExecution/requestApprovalhandler inCodexAdapterV2.ts, which has no full-access shortcut atv0.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:22turn/start:sandboxPolicy: {"type":"dangerFullAccess"},approvalsReviewer: "user",approvalPolicy: {"granular":{"mcp_elicitations":true,"request_permissions":false,"rules":false,"sandbox_approval":false,"skill_approval":false}}08:44:58item/commandExecution/requestApprovalwithkind: "command", noreason,availableDecisions: ["accept","cancel"]- The command was a
python3heredoc that edited project files, thencp .env.sample .env,npm run build, andrm -f .env. The forcedrmis 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
neverto granular approvals in #37104.Triage by Claude Opus 5.5 in Claude Code, via
t3 triage.- T3 Code desktop app, local server
bump, having the same issue
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?
I reproduced an approval prompt on Windows with T3 Code nightly
0.1.11-nightly.20261118.4877andcodex-cli 0.170.0. The child task inherited Full access (danger-full-access). A PowerShell here-string was piped toSet-Contentto write Markdown containing aStart-Processexample and an HTTPS reference. The command was intended only to write a local file.commandExecution/requestApprovaloffered Accept and Cancel without giving a reason. Related to #37306.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: granularinturn/start, Codex confirmed it, and Codex later emitteditem/commandExecution/requestApprovalwithout a reason.One additional detail may help narrow down the trigger. Neither command used
rm -rf. Both created an isolated Git index and registered anEXITtrap that ranrm -fon the temporary index and lock file, thenrmdiron the temporary directory. One used a directory undernode_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:contractswas in the same shell block, so the tests couldn’t even start. I’d appreciate including thisrm -fplusrmdirtrap in the regression tests, alongside therm -rfcase.Still reproduces on T3 Code
0.1.11-nightly.20261118.4864with Codex CLI0.169.0on macOS, for top-level threads anddelegate_taskchildren 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 weretrap 'rm -rf "$tmp"' EXITcleanups. No other command raised one. Rolloutturn_contextrecords showapproval_policy: neverup 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 CodexPermissionRequesthook. 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_modeis"default"for both granular and on-request, so it can't tell full access apart. The session transcript can: find theturn_contextrecord whoseturn_idequals the hook input'sturn_id(in the file attranscript_path). Allow only when that record haspermission_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_taskchild ran 23 commands, includingrm -f,rm -rf,/bin/rm -rf, trap, loop and$(…)forms, with no approval requests. Without it, a barecodex app-serverrun with T3's policy prompted on 5 of 6 such commands. Remember to trust the hook in/hooks; Codex skips untrusted hooks silently.— sebstrgg
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 CLI0.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/startcalls sentapprovalPolicy: "never"withdangerFullAccess. After it, every call sends the granular policy from #37104 (mcp_elicitations: true, everything elsefalse). - 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'sconfig.tomldoes not help, because the turn supplies its own policy.
Reproduction (delegated child, Full access)
- A command that is just
rm -rf <scratch dir>with a user ruleprefix_rule(pattern = ["rm"], decision = "allow")in~/.codex/rules/: runs, no approval request. - 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
rmprefix rule only covers a bare delete; a delete inside a script or chain (the usual agent shape) still raisesitem/commandExecution/requestApproval. Codex's dangerous-command check looks inside the wrapper (dangerous_command_match_with_depthinis_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.
- T3 Code
Same fault, seen on
delegate_taskchildren, 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.20261115through20261118(current install is0.1.11-nightly.20261119.4928; not re-checked on that one yet) - Codex CLI
0.169.0, then0.170.0 - Parent thread (Claude or Codex) and Codex child both in Full access
Minimal repro
- In a Full access thread, call
delegate_taskfor a Codex child with a task that writes a small shell script whose top level does cleanup, for exampletmp=$(mktemp -d); trap 'rm -rf -- "$tmp"' EXIT; echo ok. - Let the parent end its turn to wait for the child's completion notice, as delegation guidance tells it to.
- 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/requestApprovaland waits with no timeout. Its run staysrunning. - 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_inputquestion, but not for a command approval, so it waits indefinitely. t3_pending_requestfrom the parent says it cannot answer permission requests.task_statusdoes showpendingApproval, but only if the parent polls.- We saw several dozen of these in one day, all containing a top-level
rm -f,rm -rorrm -rf(including insidetrap '...' EXIT, acasearm, or after&&). The samerminside a function body or a nestedbash -cscript 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 lett3_pending_requestanswer it.- T3 Code desktop, macOS arm64, nightlies
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-
rmprompts 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-rmRPCs in 0 ms within the same child thread (viasessionApprovalskeyed bypayload.threadIdinCodexAdapterV2.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.
- Clicking Always allow this session (
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_version0.169.0-alpha.11.1 - Codex workers spawned natively (
spawn_agent) by a Full access Codex parent
Evidence (Codex rollout
turn_contextrecords andstatev2.sqlite)- Policy flip: every T3-launched Codex session up to 2026-11-16 05:00 UTC (bundled
0.167.0-alpha.3.2) hasapproval_policy: "never". Every session from 2026-11-16 10:00 UTC on (0.167.0-alpha.4.1, then0.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>, orrm -f "$helper". Dozens of other commands in the same workers ran without a prompt. No call asked forrequire_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.
- T3 Code desktop
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.tomlsetsapproval_policy = "never"andsandbox_mode = "danger-full-access". The provider log shows that the affected turn keptdangerFullAccessbut used thegranularapproval policy sent by T3.- Parent thread. A Bash script testing how
cphandles symlinks created a scratch directory withmktemp -dand usedrm -rfin anEXITtrap. 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 -rfcleanup of temporary directories and cleanup inside anEXITtrap. In separate cases, I chose Approve forrm -rf -- .pytest_cache .ruff_cache, which ran, and Decline for a script withrm -fin 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 -frequest for a temporary JSON file. About two minutes later, Codex issued another approval request in that same thread for a pytest command with anrm -rfcleanup trap. T3 repliedacceptForSessionwithin 2 ms, and the command completed successfully.
- Parent thread. A Bash script testing how
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/startsentsandboxPolicy.type: dangerFullAccess,approvalsReviewer: user, and granular approvals withmcp_elicitations: trueandrequest_permissions,rules,sandbox_approval, andskill_approvalallfalse. The matching Codexturn_contextconfirms that policy andpermission_profile.type: disabled.Codex emitted
item/commandExecution/requestApprovalfor a compound/bin/zsh -lcfile transfer that includedtrap 'rm -f "$tmp"' EXIT. The tool call did not request escalation. The RPC offeredacceptandcanceland carried noreasonfield, so the log identifies the submitted command but does not identify the exact heuristic match. The command exited 0 after approval.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/requestApprovalrequests between 13:51:22 and 13:59:57 UTC. All five commands contained forced cleanup (rm -forrm -rf), including cleanup insideEXITtraps. The requests supplied no reason.The corresponding
turn/startcalls 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
59651c1761f6c63e9b6056839067066968e6a406confirms 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.🤖 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 -fand 42 usedrm -rforrm -fr. In 28 cases the shell call also includedgit status. - One desktop request chained
git status --short && rm -f <temporary files>. The card was labeled “Running git.” The provider sentitem/commandExecution/requestApprovalwithout 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.
- All 68 command bodies contained a forced delete. 26 used
I can confirm this on Linux x86_64 with T3 Code nightly
0.1.12-nightly.20261121.5024and Codex CLI0.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.
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.
juliusmarminge closed this
Sign in to join this conversation.
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.4851and the installed Codex CLI at0.169.0. A Claude parent relaunched four Codex children explicitly in Full access. All four reportedruntimeMode: "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 -rfin anEXITtrap, eight had trailingrm -rf, and one hadrm -fin anEXITtrap. 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
neversetting inconfig.tomldoes not control these turns. Codex 0.169.0 explicitly allows heuristic dangerous-command review under granular policy even withsandbox_approval: false. ItsNeverbranch refuses those commands.A separate app-server run on
0.169.0in a scratch directory isolated the cleanup step. With T3’s granular policy, both trailingrm -rfandrm -rfinside anEXITtrap produced oneitem/commandExecution/requestApprovaleach. The control wrappers with plainrm -ror no removal completed without a request. Withnever, therm -rfwrapper 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.