mirror of
https://github.com/openai/codex.git
synced 2026-11-17 22:59:25 +00:00
fix: support $CODEX_HOME/AGENTS.md instead of $CODEX_HOME/instructions.md (#1891)
The docs and code do not match. It turns out the docs are "right" in they are what we have been meaning to support, so this PR updates the code: https://github.com/openai/codex/blob/ae88b69b09f876a3017196a9cd66f83dac79d9d7/README.md#L298-L302 Support for `instructions.md` is a holdover from the TypeScript CLI, so we are just going to drop support for it altogether rather than maintain it in perpetuity.
This commit is contained in:
1 parent
ae88b69b09
commit
64f2f2eca2
1 file changed
+2
-2
@@ -70,7 +70,7 @@ pub struct Config {
|
|||||||
/// who have opted into Zero Data Retention (ZDR).
|
/// who have opted into Zero Data Retention (ZDR).
|
||||||
pub disable_response_storage: bool,
|
pub disable_response_storage: bool,
|
||||||
|
|
||||||
/// User-provided instructions from instructions.md.
|
/// User-provided instructions from AGENTS.md.
|
||||||
pub user_instructions: Option<String>,
|
pub user_instructions: Option<String>,
|
||||||
|
|
||||||
/// Base instructions override.
|
/// Base instructions override.
|
||||||
@@ -575,7 +575,7 @@ impl Config {
|
|||||||
None => return None,
|
None => return None,
|
||||||
};
|
};
|
||||||
|
|
||||||
p.push("instructions.md");
|
p.push("AGENTS.md");
|
||||||
std::fs::read_to_string(&p).ok().and_then(|s| {
|
std::fs::read_to_string(&p).ok().and_then(|s| {
|
||||||
let s = s.trim();
|
let s = s.trim();
|
||||||
if s.is_empty() {
|
if s.is_empty() {
|
||||||
|
|||||||
Reference in new issue
Block a user