codex - 💡(How to fix) Fix Automations/heartbeats appear to use different filesystem permissions than normal chats [1 comments, 2 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#21320Fetched 2026-05-07 03:42:00
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

A command that succeeds in a normal Codex chat can fail when run from an automation/heartbeat because the automation appears to use a narrower filesystem sandbox or different writable roots than the parent chat. In the same thread, the normal chat could create/chmod user-level application and log directories, while the heartbeat could not.

This makes automation-based monitoring unreliable for workflows that depend on local helpers maintaining auth/proxy/log state under the user's home directory.

Root Cause

A command that succeeds in a normal Codex chat can fail when run from an automation/heartbeat because the automation appears to use a narrower filesystem sandbox or different writable roots than the parent chat. In the same thread, the normal chat could create/chmod user-level application and log directories, while the heartbeat could not.

Code Example

python3 - <<'PY'
from pathlib import Path

paths = [
    Path.home() / "Library/Application Support/CodexPermissionRepro",
    Path.home() / "Library/Logs/CodexPermissionRepro",
]

for p in paths:
    p.mkdir(parents=True, exist_ok=True)
    p.chmod(0o700)
    print("ok", p)
PY
RAW_BUFFERClick to expand / collapse

Summary

A command that succeeds in a normal Codex chat can fail when run from an automation/heartbeat because the automation appears to use a narrower filesystem sandbox or different writable roots than the parent chat. In the same thread, the normal chat could create/chmod user-level application and log directories, while the heartbeat could not.

This makes automation-based monitoring unreliable for workflows that depend on local helpers maintaining auth/proxy/log state under the user's home directory.

Minimal reproduction

In a normal Codex chat, run:

python3 - <<'PY'
from pathlib import Path

paths = [
    Path.home() / "Library/Application Support/CodexPermissionRepro",
    Path.home() / "Library/Logs/CodexPermissionRepro",
]

for p in paths:
    p.mkdir(parents=True, exist_ok=True)
    p.chmod(0o700)
    print("ok", p)
PY

Observed in normal chat: both mkdir and chmod succeed.

Then create a heartbeat/automation attached to the same thread whose prompt asks Codex to run the same snippet and report stdout%2

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