## 事象 [[Codex CLI]]で `.agents/skills/another-quick-switcher-release/SKILL.md` の編集を行う際に許可を求められてしまう。現在のワークスペースでは許可なくファイルを編集してほしい。 ### 環境 | 対象 | バージョン | | ------------- | ------- | | [[Codex CLI]] | 0.104.0 | ## 原因 `.agents` 配下はデフォルトでは読み取り専用となっているため。 > ### Protected paths in writable roots > > In the default `workspace-write` sandbox policy, writable roots still include protected paths: > > - `<writable_root>/.git` is protected as read-only whether it appears as a directory or file. > - If `<writable_root>/.git` is a pointer file (`gitdir: ...`), the resolved Git directory path is also protected as read-only. > - `<writable_root>/.agents` is protected as read-only when it exists as a directory. > - `<writable_root>/.codex` is protected as read-only when it exists as a directory. > - Protection is recursive, so everything under those paths is read-only. > > *[Security](https://developers.openai.com/codex/security#protected-paths-in-writable-roots)* ## 解決方法 ### 承認確認をせずdenyしたい場合 `--ask-for-approval never` を指定する。 ### 承認確認せずacceptしたい場合 > [!danger] > 何が起こるか分からないので、**すべてのデータが全世界に公開されたり、マシンが完全に乗っ取られてもいい環境以外では使用しない方がいい。** `--dangerously-bypass-approvals-and-sandbox` を指定する。