You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Managed daemon auto-update restart kills in-flight turns without a terminal event and reloads threads with default permissions instead of Full access (0.160.0 → 0.160.1, macOS) #51201
appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingsandboxIssues related to permissions or sandboxing
macOS (arm64), managed app-server daemon with its own CODEX_HOME, several long-running desktop-app threads set to Full access (permission_profile type disabled, approval never).
The daemon's update loop installed 0.160.1 over 0.160.0, and a minute later restarted the app-server.
Four threads had turns in progress. Each of those turns simply stops in its rollout: no task_complete, no turn_aborted, no error event. Nothing tells the thread (or the user) the turn was killed.
The restarted app-server emitted thread_settings_applied for each thread with permission_profile type managed and a restricted filesystem (workspace and tmp writable, no network), instead of the disabled profile the threads had before the restart.
The next turn on such a thread (started with codex queue --thread …) ran under that sandbox: no network, .git not writable. The agent could not reach anything outside the machine, including to ask for help. Nothing in the thread showed that its permissions had changed.
Expected
A daemon update does not restart the app-server under running turns (drain or hand off first), or at minimum records a terminal event with a reason on each interrupted turn.
A thread's permission settings survive an app-server restart; a reloaded thread keeps the permissions it had.
Workaround
Over the daemon's control socket, turn/start with sandboxPolicy: {type: "dangerFullAccess"} and approvalPolicy: "never" restores the previous behavior for that turn and subsequent turns.
Versions
codex-cli 0.160.1, app-server 0.160.1 (updated from 0.160.0 by the managed daemon), macOS 26.6.2 arm64.
Related
#45665 (turn lost when the app-server is replaced), #51098 (--yolo ignored on the managed daemon), #48195 (self-updating daemon as the default).
Additional observed case on Linux during an active CLI realtime voice conversation.
Environment:
Debian 13, x86_64, kernel 6.12.111+deb13-amd64.
Running TUI: npm Codex CLI 0.160.1, launched with codex --yolo (confirmed from the still-running process arguments).
Replacement managed app-server reports 0.161.0. The rollout's original CLI version is 0.160.1.
Sanitized timeline (UTC, 2026-10-07):
22:43:53 through 22:48:42: saved turn contexts have approval_policy=never, sandbox_policy.type=danger-full-access, and permission_profile.type=disabled.
22:47:32: realtime voice starts; the first two voice turns retain full access.
22:48:55: app-server logs a thread/resume request from codex-tui client 0.160.1. The same resume/session initialization logs use server version 0.161.0.
22:49:51: the next voice turn's saved context switches to approval_policy=never, sandbox_policy.type=workspace-write, network_access=false, and a managed restricted permission profile. Workspace/temp remain writable.
pactl commands which had succeeded earlier now fail with pa_write() ... Operation not permitted and pa_context_connect() ... Connection refused.
22:51:50: choosing /permissions Full access produces a logged ThreadSettings override with approval_policy=Never, permission_profile=Disabled, and active_permission_profile.id=:danger-full-access.
22:52:33: after stopping voice and sending a typed message, the next saved turn returns to never + danger-full-access + disabled; pactl succeeds again. A restarted voice session also retains working audio access.
This confirms an effective permission downgrade in the existing --yolo CLI thread following a managed-server resume. It does not establish that voice caused the downgrade: voice initially worked, and the version-changing resume is the stronger diagnostic lead. Likewise, the permission change taking effect on the next typed turn may simply reflect the still-running voice backend turn rather than a separate voice bug.
Expected: an existing thread's explicit full-access settings survive daemon replacement/reconnect. No daemon restart or configuration change was performed as part of this investigation. Raw logs, audio, task contents, usernames, local paths, and session IDs are omitted.
Further investigation of the reconnect trigger:
The local daemon updater started at 22:43:40 UTC.
The newly installed 0.161.0 daemon executable has filesystem change time 22:48:52.849 UTC.
Its replacement app-server process started at 22:48:53 UTC, followed by the TUI's thread/resume at 22:48:55.
The retained updater diagnostic at 22:53:54 reports a successful installer fetch/run and package_selected with trigger=scheduled and release 0.161.0. That retained diagnostic is from the later check, not direct proof of the preceding install trigger.
No WARN/ERROR entries were found in the local Codex log database between 22:43:00 and 22:49:00 UTC.
Together these observations strongly point to an automatic local daemon upgrade from 0.160.1 to 0.161.0 as the reconnect trigger. No evidence of an internet outage was found in that window. The permission loss occurs after reload/resume; the evidence does not implicate voice as the cause.
Thanks for the detailed report. There are two separate issues here:
Turns interrupted during an update: This is expected behavior. The daemon first gives active turns time to drain, then forces the restart after 60 seconds by default. A forced shutdown can cut off turns before they record a terminal event. You can increase the wait by setting shutdownGraceSeconds in the daemon’s CODEX_HOME/app-server-daemon/settings.json; it accepts values up to 300 seconds. Canceled turns are restarted automatically after the server update.
Permissions reverting after restart: This is a bug. Threads should retain their explicit Full access settings when reloaded. A fix is already in place and will ship in an upcoming release, likely 0.163.0 or 0.164.0. The exact release isn’t confirmed yet.
Sorry for the disruption, and thanks for helping identify the permissions issue.
appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingsandboxIssues related to permissions or sandboxing
Activity
github-actions commentedon Oct 5, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
junaga commentedon Oct 7, 2026
Additional observed case on Linux during an active CLI realtime voice conversation.
Environment:
codex --yolo(confirmed from the still-running process arguments).Sanitized timeline (UTC, 2026-10-07):
approval_policy=never,sandbox_policy.type=danger-full-access, andpermission_profile.type=disabled.thread/resumerequest fromcodex-tuiclient 0.160.1. The same resume/session initialization logs use server version 0.161.0.approval_policy=never,sandbox_policy.type=workspace-write,network_access=false, and a managed restricted permission profile. Workspace/temp remain writable.pactlcommands which had succeeded earlier now fail withpa_write() ... Operation not permittedandpa_context_connect() ... Connection refused./permissionsFull access produces a loggedThreadSettingsoverride withapproval_policy=Never,permission_profile=Disabled, andactive_permission_profile.id=:danger-full-access.never + danger-full-access + disabled;pactlsucceeds again. A restarted voice session also retains working audio access.This confirms an effective permission downgrade in the existing
--yoloCLI thread following a managed-server resume. It does not establish that voice caused the downgrade: voice initially worked, and the version-changing resume is the stronger diagnostic lead. Likewise, the permission change taking effect on the next typed turn may simply reflect the still-running voice backend turn rather than a separate voice bug.Expected: an existing thread's explicit full-access settings survive daemon replacement/reconnect. No daemon restart or configuration change was performed as part of this investigation. Raw logs, audio, task contents, usernames, local paths, and session IDs are omitted.
Further investigation of the reconnect trigger:
thread/resumeat 22:48:55.package_selectedwithtrigger=scheduledand release 0.161.0. That retained diagnostic is from the later check, not direct proof of the preceding install trigger.Together these observations strongly point to an automatic local daemon upgrade from 0.160.1 to 0.161.0 as the reconnect trigger. No evidence of an internet outage was found in that window. The permission loss occurs after reload/resume; the evidence does not implicate voice as the cause.
etraut-openai commentedon Oct 11, 2026
Thanks for the detailed report. There are two separate issues here:
Turns interrupted during an update: This is expected behavior. The daemon first gives active turns time to drain, then forces the restart after 60 seconds by default. A forced shutdown can cut off turns before they record a terminal event. You can increase the wait by setting
shutdownGraceSecondsin the daemon’sCODEX_HOME/app-server-daemon/settings.json; it accepts values up to 300 seconds. Canceled turns are restarted automatically after the server update.Permissions reverting after restart: This is a bug. Threads should retain their explicit Full access settings when reloaded. A fix is already in place and will ship in an upcoming release, likely 0.163.0 or 0.164.0. The exact release isn’t confirmed yet.
Sorry for the disruption, and thanks for helping identify the permissions issue.
adilwali commentedon Oct 11, 2026
Thanks for getting this fixed so quickly!