Skip to content

read all AGENTS.md up to git root - #2532

Merged
nornagon-openai merged 2 commits into
mainfrom
nornagon/fix-multi-agents-md
Aug 21, 2025
Merged

nornagon-openai merged 2 commits into
mainfrom
nornagon/fix-multi-agents-md

Conversation

@nornagon-openai

Copy link
Copy Markdown
Contributor

This updates our logic for AGENTS.md to match documented behavior, which is to read all AGENTS.md files from cwd up to git root.

@bolinfest

Copy link
Copy Markdown
Collaborator

I thought we discussed letting the model decide to do this (as is true today)?

@nornagon-openai

Copy link
Copy Markdown
Contributor Author

@bolinfest I don't think that's the case today?

// record the initial user instructions and environment context,
// regardless of whether we restored items.
let mut conversation_items = Vec::<ResponseItem>::with_capacity(2);
if let Some(user_instructions) = turn_context.user_instructions.as_deref() {
conversation_items.push(Prompt::format_user_instructions_message(user_instructions));
}

@nornagon-openai

Copy link
Copy Markdown
Contributor Author

Happy to refactor this further as we evolve our thinking about how the model should access the AGENTS.md, but for now I think this is an improvement over the current state.

@nornagon-openai
nornagon-openai merged commit db934e4 into main Aug 21, 2025
@nornagon-openai
nornagon-openai deleted the nornagon/fix-multi-agents-md branch August 21, 2025 15:52
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants