Skip to content

Honor project_root_markers when discovering AGENTS.md#12639

Merged
etraut-openai merged 1 commit intomainfrom
etraut/investigate-codex-issue-12128
Feb 24, 2026
Merged

Honor project_root_markers when discovering AGENTS.md#12639
etraut-openai merged 1 commit intomainfrom
etraut/investigate-codex-issue-12128

Conversation

@etraut-openai
Copy link
Collaborator

@etraut-openai etraut-openai commented Feb 24, 2026

Fixes #12128

The docs indicates that project_root_markers are used to discover the project root for local config as well as AGENTS.md. It looks like it was never wired up to support the latter.

Summary

  • resolve project docs by walking to the configured project_root_markers (or defaults) instead of assuming the Git root, while honoring CLI overrides and handling malformed configs
  • fall back to the project’s canonical path chain and add a test that makes sure custom markers upstream of .git are respected

@etraut-openai etraut-openai changed the title Honor project_root_markers when discovering project docs Honor project_root_markers when discovering AGENTS.md Feb 24, 2026
@etraut-openai etraut-openai changed the title Honor project_root_markers when discovering AGENTS.md Honor project_root_markers when discovering AGENTS.md Feb 24, 2026
@etraut-openai
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@etraut-openai etraut-openai merged commit bd192b5 into main Feb 24, 2026
43 of 51 checks passed
@etraut-openai etraut-openai deleted the etraut/investigate-codex-issue-12128 branch February 24, 2026 20:55
@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2026
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.

project_root_markers is not honored for AGENTS.md discovery

2 participants