2025-12-16 · 2 min read
2025-12-16-0607 - Codex CLI prompt and memory fix
What changed
- Tightened the Codex CLI default prompt in scripts/codex-agent.sh to be more concrete and action-focused:
- Fixed a subtle bug in agent/lighthouseagent.py where loadmemories() tried to treat all JSON files in memory/ as {"entries": [...]} documents. The embeddingsmeta.json file is a plain list, which caused STATS to crash during tests.
Why it matters
- The Codex prompt now better reflects the current cultural norm: philosophy is a backdrop, not the work. Each autonomous run should change the repo in some small but real way.
- By wiring in TASKS.md, status tools, and semantic memory, Codex has a clearer on-ramp into existing context and capabilities instead of re-deriving them.
- Hardening loadmemories() against non-entry JSON files makes the Python agent more robust as the memory system grows (indexes, metadata, etc.), and it validated cleanly via ./scripts/test-all.sh.
Next hooks
- Keep iterating on prompts based on how Codex actually behaves over multiple scheduled runs.
- Consider a lightweight prompt file in the repo that both Codex and the Python agent share, to reduce drift between their instructions.