Automations seem unable to access their memory

Open 💬 2 comments Opened Mar 15, 2026 by virgildotcodes
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

26.311.21342 (993)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.3.0 arm64 arm

What issue are you seeing?

I've recently begun experimenting with automations, and each automation run tries to access its memory and states it cannot.

Codex diagnosis:

Because the automation is looking in the wrong place.

In this environment:

CODEX_HOME is empty
but the memory file does exist at memory.md
So when it runs:

if [ -f "$CODEX_HOME/automations/summarize-trello-activity-on-jeweldesignai/memory.md" ]; then ...
that path becomes:

/automations/summarize-trello-activity-on-jeweldesignai/memory.md
not your real memory file. Since the if [ -f ... ] check simply fails, the command prints nothing and still exits successfully, so the agent concludes “no prior run memory.”

So the root cause is not that memory is missing. It’s that $CODEX_HOME is unset in the automation shell, and the command silently falls through.

The practical implication is:

every run that reads memory via $CODEX_HOME/... will keep thinking memory is empty
the automation needs to read the absolute path instead, or the runtime needs to export CODEX_HOME

What steps can reproduce the bug?

Create an automation, run it, see if it can access its own memory.

What is the expected behavior?

It should be able to access its memory.

Additional information

Feedback id - 019cf10f-5235-7961-a784-a64a032b0906

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14590
  • #14423
  • #14053
  • #14741

Powered by Codex Action

jakubkrcmar · 1 day ago

I reproduced this repeatedly on Codex Desktop automation runs in August 2026.

  • In one indexed window, 10 of 12 automation prompts received a literal $CODEX_HOME/automations/<id>/memory.md path.
  • In a later window, 11 of 12 did.
  • The automation shell did not define CODEX_HOME. One run therefore resolved the injected path to /automations/<id>/memory.md, failed with No such file or directory, and had to retry with the absolute path.

The runner already knows the concrete automation memory location, so the durable fix should be to inject an absolute path (or export CODEX_HOME consistently before prompt execution). The path should also be validated as readable before the turn is dispatched so an unset variable cannot silently look like empty memory.