CLI TUI /approvals override not persisted across thread switch (reverts to Default after returning from sub-agent)
What version of Codex CLI is running?
codex-cli 0.106.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.3-codex
What platform is your computer?
Linux 6.8.0-1048-gcp x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
Bash
What issue are you seeing?
In Codex CLI TUI (0.106.0), using --yolo or selecting Full Access via /approvals does not persist across agent/thread switching.
If a sub-agent is spawned and the user switches into it and then back to the main agent, the main agent’s approval policy reverts to Default, and approval prompts resume.
This is not just a UI display issue — enforcement behavior changes as well.
What steps can reproduce the bug?
- Start Codex:
codex --yolo
OR start normally and run:
/approvals → select Full Access
- Ask Codex to spawn a sub-agent for a task.
- Switch to the sub-agent while it is running.
- Switch back to the main agent using
/agents.
- Ask the main agent to perform an action that normally requires approval (e.g., modify
~/.bashrc).
What is the expected behavior?
If the session was started with --yolo or /approvals was set to Full Access, switching between agents should not revert the approval policy.
Approval mode should persist across thread switches within the same session.
Additional information
Root cause (analysis)
/approvals and --yolo appear to apply a runtime turn-context override, not a persistent thread config change.
When switching threads, the TUI rehydrates the thread from its stored config snapshot.
That snapshot does not include the runtime approval override, so the approval policy reverts to Default.
In short:
Approval overrides are session-scoped, but thread switching reloads from thread config snapshots that do not include those overrides.
Temporary workaround
Persist the approval policy in config instead of using /approvals:
Add to ~/.codex/config.toml (or project .codex/config.toml):
approval_policy = "never"sandbox_mode = "danger-full-access"
With this configuration, switching to a sub-agent and back does not reset the approval policy.
Additional context
This may be related to how thread state is reconstructed from config_snapshot() during thread reattachment. The issue is reproducible consistently and affects multi-agent workflows.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗