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
[Windows / ChatGPT Work] Repeated “approval request is no longer active” errors interrupt file-writing operations #57345
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
What version of the Codex App are you using (From “About Codex” dialog)?
Powered by Codex & OWL Ver. 26.1021.31345
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows NT 10.0.26300.0 x64
What issue are you seeing?
My ChatGPT Work task repeatedly stops with this message:
“That approval request is no longer active. Please retry the action if you still want ChatGPT to continue with it.”
The task is to edit an uploaded poster using a second uploaded image as a reference. Both uploaded files were successfully located in Library.
During troubleshooting, local read-only commands and skill-resource reads succeeded. However, an apply_patch call intended to write helper files inside the permitted workspace was interrupted after approximately 1.1 seconds. The tool result said “aborted by user”, and the interface then displayed the approval error above.
The cancellation label alone does not establish what triggered the cancellation. The underlying cause is unknown.
Repeated requests to continue have not completed the task. The image-editing tool had not yet been invoked at the point of these failures.
Authorized operations inside the permitted workspace should complete. If fresh approval is required, the app should present a valid approval request that can be acted on.
If a request expires or is cancelled, the app should identify the affected operation and offer a working recovery path, while preserving the conversation and task progress.
Additional information
Date observed: October 27, 2026.
Time zone: UTC+8.
The failure was narrowed down to a file-writing tool invocation; read-only operations succeeded during the same troubleshooting session.
Please correlate the submitted performance trace with the approval-request lifecycle and cancellation events, especially around apply_patch.
A successful recovery after restarting the app or starting a fresh conversation has not yet been verified.
File write: successfully created a temporary file.
Read-back verification: the file contents matched exactly.
Cleanup: the temporary test file was deleted successfully.
Execution path: the test completed using the approval-based execution path.
Remaining failure: ordinary execution continues to encounter a permission-path error.
This narrows the issue from general I: drive accessibility to a difference between ordinary execution and approval-based execution.
Please investigate why ordinary execution encounters a permission-path error while the approval-based path can access and write to the same drive. Please also investigate the previously reported That approval request is no longer active error and repeated approval prompts.
Please clarify whether the two execution paths use different permission policies, process identities, working directories, or execution environments, and provide a fix or diagnostic procedure that does not require repeatedly granting the same permissions.
Issue 1 — Config fails to load; error message does not identify the real problem
Error shown:
failed to load workspace requirements: invalid configuration at C:\Users\86133\.codex\config.toml:244:38
Root cause: the same key is first assigned a string value and later re-opened as a table:
[permissions.i-drive-full.filesystem]
'I:\' = "write"# line 215 — this is a VALUE
[permissions.i-drive-full.filesystem.'I:\'] # line 244 — same key, now a TABLE'.' = "write"
TOML forbids overwriting a value with a table. tomllib reports Cannot overwrite a value (at line 244, column 43), while Codex reported column 38
(the first character of the key), which points at the wrong spot.
Fix: remove the second block. The error text would be much more actionable if it said
"duplicate key: already defined as a value at line 215" and reported the line of the
original definition.
Issue 2 — Write permission for a whole drive is silently dropped, so approvals keep firing
What I configured (intent: allow writes anywhere on the I: drive):
What actually reached the sandbox. The resolved policy stored per thread in ~/.codex/state_5.sqlite (threads.sandbox_policy) for a session using this profile was:
The drive root was not in the list. 25 subdirectory entries were resolved, but the 'I:\' = "write" entry itself was dropped, with no warning anywhere: codex doctor
reported no config/permission problem, ~/.codex/log contains only a login log, and sandbox.*.log shows only ACL audits. So "I granted write access
to the whole drive" was silently reduced to "write access to 25 named folders", and any
write to I:\<any other folder> fell outside the sandbox boundary and triggered an
approval prompt every time.
Second contributing factor. Most of my sessions start with the workspace root on C:\Users\86133\Documents\..., while the profile only grants :root = "read". That makes
the workspace itself read-only, so even creating a scratch file inside the workspace
requires approval. This is surprising: the workspace root is expected to be writable.
What fixed it:
# 1) keep the current workspace writable regardless of which drive it lives on
[permissions.i-drive-full.filesystem.":workspace_roots"]
"." = "write"# 2) network was fully closed, so every network-touching command prompted as well
[features]
network_proxy = true
[permissions.i-drive-full.network]
enabled = true
[permissions.i-drive-full.network.domains]
"*" = "allow"
After these changes writes inside the workspace and network access no longer prompt.
Questions for the team
Is a drive root a valid filesystem rule key? Should 'I:\' = "write" (literal string,
trailing separator) grant write access to the entire volume? If that form is unsupported,
it should fail loudly at config load instead of being silently discarded at policy
resolution — this cost me a lot of time debugging approval prompts.
Do globs work for absolute-path keys? The docs show globs only under filesystem.":workspace_roots" (e.g. "**/*.env" = "deny"). Is 'I:\**' = "write" at
the top level of filesystem supposed to work? If not, is there any supported way to
grant a whole volume without listing every top-level directory?
Why did some sessions resolve permission_profile to {"type":"disabled"} while others
resolved to {"type":"managed"} with 27 entries? Both were created by the same desktop
build with the same config.toml. My guess is that the per-thread approval/sandbox
selector in the desktop UI passes --sandbox, which per the docs makes Codex ignore default_permissions and fall back to the legacy sandbox settings. If that is the
intended behavior, it should be documented — otherwise it looks like the config file is
being ignored at random.
Should a read-only :root really make the workspace root read-only? If so, the
default profile should include an implicit write rule for the workspace, since otherwise
every new session starts by prompting for permission to write into its own workspace.
Workaround I'm using meanwhile
A small script (~/.codex/tools/check_codex_perm.py) diffs the top-level directories on a
drive against the filesystem allowlist and appends the missing ones, with a backup and a tomllib re-parse before/after writing. It works, but users should not have to maintain a
hand-written allowlist of 30 directories to express "this drive is writable".
Follow-up: isolated drive-root failure and unrelated cached-directory grant (October 29)
Windows 11 build 26300; bundled CLI 0.165.0-alpha.1.2. Further testing separates two failures that the previous report did not isolate.
1. Elevated setup failed on a pre-existing directory grant.
The sandbox log gives the concrete cause behind "helper_unknown_error: setup refresh had errors":
write ACE grant failed on I:\QQMusicCache: open ACL target for update (READ_CONTROL | WRITE_DAC): Access denied. (os error 5)
Removing that explicit directory grant eliminated this setup-refresh failure. I did not knowingly grant QQMusicCache separate write access. A local session's resolved permission record already contained it on October 21 at 08:13 (UTC+8), and a saved config snapshot from October 25 contains it; an October 19 snapshot does not. These are observations of saved state, NOT proof of when or how it was inserted, and not proof that the app inserted it. The writer and operation remain unknown. Please provide a way to audit the provenance of individual grants, especially if a whole-drive selection is expanded to child directories.
2. A minimal drive-root write rule reproducibly prevents sandbox execution.
windows sandbox failed: permission path cannot be represented losslessly
Replacing I:\ with I:/, I:., or the extended path \?\I:\ gives the same error. Replacing the drive-root rule with I:\Obsidian succeeds. The built-in :read-only profile also executes successfully. The installed standalone CLI 0.156.0 reproduces the root-rule failure too.
Explicit MXC selection also fails with "failed to prepare MXC sandbox: permission path cannot be represented losslessly".
Trying to express the same volume as a profile workspace root gives a more specific diagnostic:
Error: invalid Windows sandbox workspace roots
Caused by: 'file:///I:' is invalid on 'windows'
The file:///I: diagnostic suggests a Windows drive-root/path-URL conversion problem. This is an inference; the exact internal cause has not been established by source inspection.
Verified workaround and its limit: removing the whole-drive root rule and retaining explicit child-directory rules allows the named i-drive-full profile to run. Under that explicitly selected profile, a unique temporary file in I:\ChatGPT was written, read back, and removed successfully. A write outside the granted roots on C: was denied. No probe files remain. This proves that the restricted profile can execute and enforce a boundary; it does NOT fix whole-volume access, writing directly at the drive root, or automatic coverage of future top-level directories. Existing desktop chats set to full access are also separate from this explicit named-profile test.
Please investigate the root-path conversion and confirm the supported syntax for granting an entire Windows volume, including future child directories. Also, please surface the exact failing ACL path in the user-facing setup error rather than only "setup refresh had errors".
Following up on the isolated drive-root reproduction above: public source contains the exact diagnostic in raw_path_from_uri in codex-rs/protocol/src/permissions.rs. It converts a PathUri to a legacy native path string, parses it back, compares the result with the original URI, and returns permission path cannot be represented losslessly if the round trip differs or fails.
Together with the locally reproduced file:///I: invalid-on-Windows error, this points toward inconsistent drive-root URI/native-path normalization. However, the exact conversion step and correspondence between current public main and the installed bundled 0.165.0-alpha.1.2 binary have NOT been established. Please treat the trailing-separator explanation as a hypothesis, not a confirmed code-level root cause.
Current status: explicit child-directory grants under the named profile have passed write/read-back/cleanup and out-of-scope denial tests. Whole-volume root access and automatic coverage of future top-level directories remain unresolved. Changing slash forms, using an extended root path, using a profile-defined drive-root workspace, or putting file:///I:/ directly into the filesystem rule did not provide a working solution; the last form is rejected by configuration validation as not an accepted absolute filesystem path.
Please identify and fix the inconsistent conversion, or provide a supported whole-volume configuration. We have a verified narrower workaround, not a complete fix.
Request for maintainer triage and a recovery procedure
Could a maintainer please acknowledge and prioritize triage of this issue, and provide the next diagnostic step or a supported recovery procedure? It continues to interrupt normal work despite repeated troubleshooting.
Important clarification: selecting Full access in the desktop app has NOT resolved the failures for me. The saved permission record for the affected troubleshooting chat showed :danger-full-access / dangerFullAccess with approval policy never, but this alone does not establish what policy each browser, Computer Use, or other helper process actually received. Please investigate the effective permissions and path conversion at the failing helper boundary rather than treating the UI selection as proof that all tool paths are unrestricted.
The explicit named-profile child-directory tests described above restore only a limited file-execution workflow. They are not evidence that the original approval lifecycle error, Full access behavior, or all browser/Computer Use operations have been fixed. Whole-drive root authorization also remains unresolved.
Related public reports include #54695 (drive-root URI rejected on Windows), #56924, and #48443 (the same lossless-path diagnostic in other contexts). These may help triage, but identical messages do not prove an identical root cause.
Please let me know whether the submitted trace and minimal reproductions are sufficient, who should handle the issue, and whether a fix or safe workaround is planned. I would appreciate a response as soon as possible.
appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Oct 27, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Forestmorning commentedon Oct 27, 2026
Forestmorning commentedon Oct 27, 2026
Forestmorning commentedon Oct 28, 2026
每次都问我能否使用电脑,我点击同意了又显示任务无法完成。到底怎么回事?
Forestmorning commentedon Oct 29, 2026
Additional diagnostic evidence — October 29, 2026
The I: drive read/write test has passed.
This narrows the issue from general I: drive accessibility to a difference between ordinary execution and approval-based execution.
Please investigate why ordinary execution encounters a permission-path error while the approval-based path can access and write to the same drive. Please also investigate the previously reported
That approval request is no longer activeerror and repeated approval prompts.Please clarify whether the two execution paths use different permission policies, process identities, working directories, or execution environments, and provide a fix or diagnostic procedure that does not require repeatedly granting the same permissions.
No original files were modified during this test.
Forestmorning commentedon Oct 29, 2026
Codex Desktop: permission-profile issues on Windows (CLI 0.165.0-alpha.1.2)
Environment
0.165.0-alpha.1.2, originatorcodex_work_desktop26300(doctor reportsWindows 10.0.26300 (Windows 11 CoreCountrySpecific), zh-CN)[windows] sandbox = "elevated", beta permission profiles enabled viadefault_permissions = "i-drive-full"Issue 1 — Config fails to load; error message does not identify the real problem
Error shown:
Root cause: the same key is first assigned a string value and later re-opened as a table:
TOML forbids overwriting a value with a table.
tomllibreportsCannot overwrite a value (at line 244, column 43), while Codex reported column 38(the first character of the key), which points at the wrong spot.
Fix: remove the second block. The error text would be much more actionable if it said
"duplicate key: already defined as a value at line 215" and reported the line of the
original definition.
Issue 2 — Write permission for a whole drive is silently dropped, so approvals keep firing
What I configured (intent: allow writes anywhere on the
I:drive):What actually reached the sandbox. The resolved policy stored per thread in
~/.codex/state_5.sqlite(threads.sandbox_policy) for a session using this profile was:{"type":"managed", "file_system":{"type":"restricted","entries":[ {"path":{"type":"special","value":{"kind":"minimal"}},"access":"read"}, {"path":{"type":"special","value":{"kind":"root"}},"access":"read"}, {"path":{"type":"path","path":"I:\\15周年纪念刊"},"access":"write"}, ... 25 explicit I: subdirectories ... ]}, "network":"restricted"}The drive root was not in the list. 25 subdirectory entries were resolved, but the
'I:\' = "write"entry itself was dropped, with no warning anywhere:codex doctorreported no config/permission problem,
~/.codex/logcontains only a login log, andsandbox.*.logshows only ACL audits. So "I granted write accessto the whole drive" was silently reduced to "write access to 25 named folders", and any
write to
I:\<any other folder>fell outside the sandbox boundary and triggered anapproval prompt every time.
Second contributing factor. Most of my sessions start with the workspace root on
C:\Users\86133\Documents\..., while the profile only grants:root = "read". That makesthe workspace itself read-only, so even creating a scratch file inside the workspace
requires approval. This is surprising: the workspace root is expected to be writable.
What fixed it:
After these changes writes inside the workspace and network access no longer prompt.
Questions for the team
'I:\' = "write"(literal string,trailing separator) grant write access to the entire volume? If that form is unsupported,
it should fail loudly at config load instead of being silently discarded at policy
resolution — this cost me a lot of time debugging approval prompts.
filesystem.":workspace_roots"(e.g."**/*.env" = "deny"). Is'I:\**' = "write"atthe top level of
filesystemsupposed to work? If not, is there any supported way togrant a whole volume without listing every top-level directory?
permission_profileto{"type":"disabled"}while othersresolved to
{"type":"managed"}with 27 entries? Both were created by the same desktopbuild with the same
config.toml. My guess is that the per-thread approval/sandboxselector in the desktop UI passes
--sandbox, which per the docs makes Codex ignoredefault_permissionsand fall back to the legacy sandbox settings. If that is theintended behavior, it should be documented — otherwise it looks like the config file is
being ignored at random.
:rootreally make the workspace root read-only? If so, thedefault profile should include an implicit write rule for the workspace, since otherwise
every new session starts by prompting for permission to write into its own workspace.
Workaround I'm using meanwhile
A small script (
~/.codex/tools/check_codex_perm.py) diffs the top-level directories on adrive against the
filesystemallowlist and appends the missing ones, with a backup and atomllibre-parse before/after writing. It works, but users should not have to maintain ahand-written allowlist of 30 directories to express "this drive is writable".
Forestmorning commentedon Oct 29, 2026
Follow-up: isolated drive-root failure and unrelated cached-directory grant (October 29)
Windows 11 build 26300; bundled CLI 0.165.0-alpha.1.2. Further testing separates two failures that the previous report did not isolate.
1. Elevated setup failed on a pre-existing directory grant.
The sandbox log gives the concrete cause behind "helper_unknown_error: setup refresh had errors":
Removing that explicit directory grant eliminated this setup-refresh failure. I did not knowingly grant QQMusicCache separate write access. A local session's resolved permission record already contained it on October 21 at 08:13 (UTC+8), and a saved config snapshot from October 25 contains it; an October 19 snapshot does not. These are observations of saved state, NOT proof of when or how it was inserted, and not proof that the app inserted it. The writer and operation remain unknown. Please provide a way to audit the provenance of individual grants, especially if a whole-drive selection is expanded to child directories.
2. A minimal drive-root write rule reproducibly prevents sandbox execution.
Minimal profile:
Run:
Result (before the command executes):
Replacing I:\ with I:/, I:., or the extended path \?\I:\ gives the same error. Replacing the drive-root rule with I:\Obsidian succeeds. The built-in :read-only profile also executes successfully. The installed standalone CLI 0.156.0 reproduces the root-rule failure too.
Explicit MXC selection also fails with "failed to prepare MXC sandbox: permission path cannot be represented losslessly".
Trying to express the same volume as a profile workspace root gives a more specific diagnostic:
The file:///I: diagnostic suggests a Windows drive-root/path-URL conversion problem. This is an inference; the exact internal cause has not been established by source inspection.
Verified workaround and its limit: removing the whole-drive root rule and retaining explicit child-directory rules allows the named i-drive-full profile to run. Under that explicitly selected profile, a unique temporary file in I:\ChatGPT was written, read back, and removed successfully. A write outside the granted roots on C: was denied. No probe files remain. This proves that the restricted profile can execute and enforce a boundary; it does NOT fix whole-volume access, writing directly at the drive root, or automatic coverage of future top-level directories. Existing desktop chats set to full access are also separate from this explicit named-profile test.
Please investigate the root-path conversion and confirm the supported syntax for granting an entire Windows volume, including future child directories. Also, please surface the exact failing ACL path in the user-facing setup error rather than only "setup refresh had errors".
Forestmorning commentedon Oct 29, 2026
Source pointer and current unresolved status
Following up on the isolated drive-root reproduction above: public source contains the exact diagnostic in
raw_path_from_uriin codex-rs/protocol/src/permissions.rs. It converts a PathUri to a legacy native path string, parses it back, compares the result with the original URI, and returnspermission path cannot be represented losslesslyif the round trip differs or fails.Together with the locally reproduced
file:///I:invalid-on-Windows error, this points toward inconsistent drive-root URI/native-path normalization. However, the exact conversion step and correspondence between current public main and the installed bundled 0.165.0-alpha.1.2 binary have NOT been established. Please treat the trailing-separator explanation as a hypothesis, not a confirmed code-level root cause.Current status: explicit child-directory grants under the named profile have passed write/read-back/cleanup and out-of-scope denial tests. Whole-volume root access and automatic coverage of future top-level directories remain unresolved. Changing slash forms, using an extended root path, using a profile-defined drive-root workspace, or putting
file:///I:/directly into the filesystem rule did not provide a working solution; the last form is rejected by configuration validation as not an accepted absolute filesystem path.Please identify and fix the inconsistent conversion, or provide a supported whole-volume configuration. We have a verified narrower workaround, not a complete fix.
Forestmorning commentedon Oct 29, 2026
Request for maintainer triage and a recovery procedure
Could a maintainer please acknowledge and prioritize triage of this issue, and provide the next diagnostic step or a supported recovery procedure? It continues to interrupt normal work despite repeated troubleshooting.
Important clarification: selecting Full access in the desktop app has NOT resolved the failures for me. The saved permission record for the affected troubleshooting chat showed
:danger-full-access/dangerFullAccesswith approval policynever, but this alone does not establish what policy each browser, Computer Use, or other helper process actually received. Please investigate the effective permissions and path conversion at the failing helper boundary rather than treating the UI selection as proof that all tool paths are unrestricted.The explicit named-profile child-directory tests described above restore only a limited file-execution workflow. They are not evidence that the original approval lifecycle error, Full access behavior, or all browser/Computer Use operations have been fixed. Whole-drive root authorization also remains unresolved.
Related public reports include #54695 (drive-root URI rejected on Windows), #56924, and #48443 (the same lossless-path diagnostic in other contexts). These may help triage, but identical messages do not prove an identical root cause.
Please let me know whether the submitted trace and minimal reproductions are sufficient, who should handle the issue, and whether a fix or safe workaround is planned. I would appreciate a response as soon as possible.