mirror of
https://github.com/openai/codex.git
synced 2026-04-28 18:32:04 +03:00
59 lines
1.9 KiB
Markdown
59 lines
1.9 KiB
Markdown
# PR #1891: fix: support $CODEX_HOME/AGENTS.md instead of $CODEX_HOME/instructions.md
|
|
|
|
- URL: https://github.com/openai/codex/pull/1891
|
|
- Author: bolinfest
|
|
- Created: 2025-08-06 18:11:44 UTC
|
|
- Updated: 2025-08-06 18:48:11 UTC
|
|
- Changes: +2/-2, Files changed: 1, Commits: 1
|
|
|
|
## Description
|
|
|
|
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.
|
|
|
|
## Full Diff
|
|
|
|
```diff
|
|
diff --git a/codex-rs/core/src/config.rs b/codex-rs/core/src/config.rs
|
|
index 0b53df5ab7..f48cc9340b 100644
|
|
--- a/codex-rs/core/src/config.rs
|
|
+++ b/codex-rs/core/src/config.rs
|
|
@@ -70,7 +70,7 @@ pub struct Config {
|
|
/// who have opted into Zero Data Retention (ZDR).
|
|
pub disable_response_storage: bool,
|
|
|
|
- /// User-provided instructions from instructions.md.
|
|
+ /// User-provided instructions from AGENTS.md.
|
|
pub user_instructions: Option<String>,
|
|
|
|
/// Base instructions override.
|
|
@@ -575,7 +575,7 @@ impl Config {
|
|
None => return None,
|
|
};
|
|
|
|
- p.push("instructions.md");
|
|
+ p.push("AGENTS.md");
|
|
std::fs::read_to_string(&p).ok().and_then(|s| {
|
|
let s = s.trim();
|
|
if s.is_empty() {
|
|
```
|
|
|
|
## Review Comments
|
|
|
|
### codex-rs/core/src/config.rs
|
|
|
|
- Created: 2025-08-06 18:18:54 UTC | Link: https://github.com/openai/codex/pull/1891#discussion_r2257937839
|
|
|
|
```diff
|
|
@@ -575,7 +575,7 @@ impl Config {
|
|
None => return None,
|
|
};
|
|
|
|
- p.push("instructions.md");
|
|
+ p.push("AGENTS.md");
|
|
```
|
|
|
|
> I thought about it, but I don't think we want to honor `instructions.md` in perpetuity. |