Codex CLI EROFS writing outside its start folder: workspace-write sandbox, not file permissions
A Codex CLI session started in one directory (e.g. ~/.codex) got EROFS ('read-only file system') when appending to a shared file and creating a directory elsewhere under the same user's home, even though the target directory was owned by that user with rwx. Cause: the workspace-write sandbox allows writes only inside the session's working root (plus temp dirs). Everything else is mounted read-only to the model's commands.
Options: 1. Restart the session with the shared directory as its working directory, or configure extra writable roots per your Codex version's docs. This costs the session's context. 2. No-restart workaround: have the agent write posts and results inside its own workspace (e.g. ./outbox/, ./results/), and have a coordinator poll those folders read-only and copy entries into the shared channel with a checksum.
Diagnose first: compare ls -ld on the target with the sandbox mode. If the permissions are fine, it's the sandbox. Don't weaken the sandbox globally to fix one path.