codex - 💡(How to fix) Fix workspace-write cannot edit .agents/skills/** inside trusted workspace, but danger-full-access can [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17535Fetched 2026-04-13 05:38:51
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
0
Timeline (top)
labeled ×4commented ×3closed ×1unlabeled ×1

Error Message

Error: EPERM: operation not permitted, open '.agents/skills/skill-creator/SKILL.md'

Root Cause

This is a workflow blocker because repo-local skills are living documents that need to be updated during normal work.

Fix Action

Fix / Workaround

  1. Open a trusted local workspace repo.
  2. Ensure Codex is running in workspace-write mode.
  3. Ask Codex to edit a skill file inside the workspace, for example: .agents/skills/skill-creator/SKILL.md
  4. Codex attempts either:
    • apply_patch, or
    • a direct file write using Node
  5. The write fails.

apply_patch failure: patch rejected: writing outside of the project; rejected by user approval settings

RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.409.20454 (1462)

What subscription do you have?

100$

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

In workspace-write mode, Codex can read files under .agents/skills/** but cannot write them, even though they are inside a trusted workspace. The same edit succeeds immediately in danger-full-access, and other workspace files remain writable in workspace-write. This makes repo-local skills unusable as living documents during normal development.

What steps can reproduce the bug?

  1. Open a trusted local workspace repo.
  2. Ensure Codex is running in workspace-write mode.
  3. Ask Codex to edit a skill file inside the workspace, for example: .agents/skills/skill-creator/SKILL.md
  4. Codex attempts either:
    • apply_patch, or
    • a direct file write using Node
  5. The write fails.

I reproduced both failure modes.

apply_patch failure: patch rejected: writing outside of the project; rejected by user approval settings

Direct write failure: Error: EPERM: operation not permitted, open '.agents/skills/skill-creator/SKILL.md'

What is the expected behavior?

Expected

Files under .agents/skills/** are inside the trusted workspace root and should be writable in workspace-write, just like other files in the repo.

Actual

Codex can read files under .agents/skills/**, but cannot write them in workspace-write.

The same write succeeds immediately if I switch the session to danger-full-access.

Additional information

I verified all of the following locally:

  • Writing to repo-root files succeeds in workspace-write
  • Writing to /tmp succeeds
  • Writing to another hidden directory in the same repo succeeds
  • Writing specifically under .agents/** fails in workspace-write
  • The exact same skill-file write succeeds in danger-full-access

So this appears to be a path-specific sandbox issue for .agents/**, not a general filesystem permission problem.

My Codex config includes:

model = "gpt-5.4"
profile = "backend_auto"
sandbox_mode = "workspace-write"
approval_policy = "on-request"

[sandbox_workspace_write]
network_access = true

[profiles.backend_auto]
sandbox_mode = "workspace-write"
approval_policy = "never"

[projects."/path/to/repo"]
trust_level = "trusted"

OpenAI’s docs say repo-local skills live under .agents/skills, so this path appears intended to be part of normal editable workspace content: https://developers.openai.com/codex/skills

This is a workflow blocker because repo-local skills are living documents that need to be updated during normal work.

extent analysis

TL;DR

  • The issue can be worked around by adjusting the sandbox_mode or approval_policy settings to allow writes to the .agents/skills/** directory.

Guidance

  • Verify that the .agents/skills/** directory is indeed within the trusted workspace root and that the trust_level is set to "trusted" for the project.
  • Check the approval_policy settings to ensure that writes to this directory are allowed in workspace-write mode.
  • Consider temporarily switching to danger-full-access mode to confirm that the issue is specific to the workspace-write mode.
  • Review the OpenAI documentation to ensure that the .agents/skills/** directory is correctly configured for repo-local skills.

Example

  • No code snippet is provided as the issue appears to be related to configuration settings rather than code.

Notes

  • The issue seems to be specific to the .agents/skills/** directory and not a general filesystem permission problem.
  • The fact that writes succeed in danger-full-access mode suggests that the issue is related to the sandbox_mode or approval_policy settings.

Recommendation

  • Apply workaround: Adjust the sandbox_mode or approval_policy settings to allow writes to the .agents/skills/** directory, as this appears to be the most likely cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING