Feature Request: Automatic prompt reloading and project tree caching (by using filesystem watchers)
Resolved 💬 1 comment Opened Oct 21, 2025 by 0xc1f Closed Dec 23, 2025
What feature would you like to see?
Currently, the workflow for using custom prompts and the @ command can be inefficient in two ways:
- Manual reloading of prompts: after adding a new prompt or modifying an existing one in $CODEX_HOME/prompts/ or ~/.codex/prompts/, I have to restart my codex session for the changes to take effect. This interruption disrupts the development workflow.
- Slow project tree indexing: the @ command, which is used for context-aware commands, is very slow to execute in large codebases.
I propose two enhancements to address these issues:
- Implement file system event monitoring for prompts:
- codex should monitor the $CODEX_HOME/prompts/ and ~/.codex/prompts/ directories for any file system events (creation, deletion, modification).
- When a change is detected, codex should automatically rebuild its internal list of available prompts without requiring a manual CLI restart.
- Cache and incrementally update the project tree:
- On the first run in a new project, codex should build a cache of the project's file tree.
- Subsequently, codex should use file system events to update the cache in the background.
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗