docs: add developer_instructions config option and update descriptions (#8376)

Updates the configuration documentation to clarify and improve the
description of the `developer_instructions` and `instructions` fields.

Documentation updates:

* Added a description for the `developer_instructions` field in
`docs/config.md`, clarifying that it provides additional developer
instructions.
* Updated the comments in `docs/example-config.md` to specify that
`developer_instructions` is injected before `AGENTS.md`, and clarified
that the `instructions` field is ignored and that `AGENTS.md` is
preferred.

___

ref #7973 

Thanks to @miraclebakelaser for the message. I have double-confirmed
that developer instructions are always injected before user
instructions. According to the source code
[codex_core::codex::Session::build_initial_context](https://github.com/openai/codex/blob/rust-v0.77.0-alpha.2/codex-rs/core/src/codex.rs#L1279),
we can see the specific order of these instructions.
This commit is contained in:
Robby He
2025-12-22 07:37:37 -07:00
committed by GitHub
parent 7a8407bbb6
commit 372de6d2c5
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -56,10 +56,10 @@ model_reasoning_summary_format = "none"
# Instruction Overrides
################################################################################
# Additional user instructions appended after AGENTS.md. Default: unset.
# Additional user instructions inject before AGENTS.md. Default: unset.
# developer_instructions = ""
# Optional legacy base instructions override (prefer AGENTS.md). Default: unset.
# (Ignored) Optional legacy base instructions override (prefer AGENTS.md). Default: unset.
# instructions = ""
# Inline override for the history compaction prompt. Default: unset.