Two Codex Features You Probably Didn't Know About! 🫵 1/ developer_instructions (string) Supplement the Codex system prompt with your own custom instructions. These are higher level instructions than your AGENTS file. You could use this for global instructions to your agents such as: - providing your name - negative prompts (em dashes, common phrases, etc) - personalization / personality 2/ compact_prompt (string) Did you know you can customize the pre compaction prompt for custom instructions? If you are have some custom workflows that would benefit from explicit steering, you can prompt the compaction model directly. You can also do this via a separate markdown file with experimental_compact_prompt_file (string - path). Both of these features are configured in your config.toml file, and work for both CLI and Codex App. I will cover more quirky hidden features in future posts 📫
Customize Codex agent behavior globally and steer the compaction model using two lesser-known config.toml fields.
Example(yaml)
# config.toml
developer_instructions = """
Your name is Alex.
Do not use em dashes.
Avoid filler phrases like 'certainly' or 'of course'.
Be concise and direct.
"""
compact_prompt = """
When compacting, prioritize preserving:
- Open tasks and TODOs
- File paths and function names referenced in the conversation
- Any explicit user preferences stated during the session
"""
# Or use a file instead:
# experimental_compact_prompt_file = "prompts/compact.md"Why it works
When to use
- •You want to enforce a consistent writing style or persona (no em dashes, specific tone) across all Codex sessions
- •Your sessions regularly hit context limits and important task state keeps getting lost during compaction
- •You have multi-agent or complex workflows where the compaction model needs explicit guidance on what to retain
Report an Issue
Found something wrong with this article? Let us know and we'll look into it.