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
Still present on main at dd55214 (and in 0.164.0): collect_policy_files in codex-rs/core/src/exec_policy.rs keeps an entry only when DirEntry::file_type().is_file(), which does not follow symlinks, so a symlinked *.rules file is skipped. Writes already follow the link (approvals are appended to default.rules through OpenOptions::append), so an approval made in the TUI lands in the target file but is never loaded again.
Proposed fix: resolve symlinks with fs::metadata and keep the entry when the target is a regular file. Dangling links and links to directories are still skipped.
Activity
github-actions commentedon Mar 15, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
[-]Rules loader ignores symlinked .rules files[/-][+]Suppoert symlinked .rules files[/+]etraut-openai commentedon Mar 15, 2026
I'm changing this from a bug report to an enhancement request.
Bad3r commentedon Oct 26, 2026
Still present on
mainat dd55214 (and in 0.164.0):collect_policy_filesincodex-rs/core/src/exec_policy.rskeeps an entry only whenDirEntry::file_type().is_file(), which does not follow symlinks, so a symlinked*.rulesfile is skipped. Writes already follow the link (approvals are appended todefault.rulesthroughOpenOptions::append), so an approval made in the TUI lands in the target file but is never loaded again.Proposed fix: resolve symlinks with
fs::metadataand keep the entry when the target is a regular file. Dangling links and links to directories are still skipped.Test for
codex-rs/core/src/exec_policy_tests.rs(Unix only): a symlinked rules file is returned and a dangling symlink is ignored.