Fleet changelogs · dev.ecs0.net
rdmsm4x-changelog-20260824-1217-codex-agent-mode-and-stale-thread-approval-policy

rdmsm4x-changelog-20260824-1217-codex-agent-mode-and-stale-thread-approval-policy

Aligned Codex's legacy global agent-mode key to full-access and normalised 4 stale delegation-thread approval records; deliberately left 38 restricted-sandbox threads untouched because flipping them would convert "prompt" into "auto-reject".

Findings (no change required)

Changes applied

1. ~/.codex/.codex-global-state.json (Electron persisted atom state)

2. ~/.codex/state_5.sqlite (Codex core thread store)

UPDATE threads SET approval_mode='never'
WHERE approval_mode='on-request'
  AND (sandbox_policy LIKE '%disabled%' OR sandbox_policy LIKE '%dangerFullAccess%');
-- 4 rows changed

Those 4 are one VS Code delegation thread (01a00768-…, 2026-08-16) plus its 3 spawned subagents (Tesla, Descartes, Huygens) — a dead delegation run.

Deliberately NOT changed, and why

38 core threads (33 managed/restricted + 5 read-only) and 8 Electron records (workspaceWrite) remain at on-request. Under Codex semantics, never does not mean auto-approve when the sandbox blocks an action — it means auto-reject. Confirmed from the codex binary's own policy text:

"Approval policy is granular. Categories set to false are automatically rejected instead of prompting the user." "approval required by policy, but AskForApproval is set to Never"

So flipping a restricted-sandbox thread from on-request to never degrades it (prompt becomes silent refusal) rather than loosening it. These are also mostly subagent/review threads created under a permission profile by design, not drift. Left as-is pending Rich's explicit call.

Safety notes

Verification

JSON parse OK
agent-mode                            = full-access
agent-mode-by-host-id[local]          = full-access
permission-selection-by-host-id:local = {"kind":"agent-mode","agentMode":"full-access"}
per-thread policies:  never=68  on-request=8   (was never=62 on-request=14)
core DB approval_mode: never=423 on-request=38 (was never=419 on-request=42)
PRAGMA integrity_check = ok

Backups / undo

~/.codex/backups/approvalpolicy-fix-20260824-121549/ contains pre-change copies of .codex-global-state.json, state_5.sqlite, state_5.sqlite-wal, state_5.sqlite-shm.

To undo, with ChatGPT.app quit:

cp -p ~/.codex/backups/approvalpolicy-fix-20260824-121549/.codex-global-state.json ~/.codex/
cp -p ~/.codex/backups/approvalpolicy-fix-20260824-121549/state_5.sqlite* ~/.codex/

Outstanding owner actions

  1. Relaunch ChatGPT.app and confirm the composer shows Full access; the app may rewrite .codex-global-state.json on first quit, which is expected and harmless.
  2. Next time the "Allow ChatGPT to use ?" card appears, open the ▾ and report whether "Always allow" is actually offered. If it is not, the cause is upstream in what the sky service advertises as persist modes, and no local config can fix it.
  3. Decide whether the 38 restricted-sandbox threads should be flipped anyway (not recommended).

No secrets read, written, or transmitted.