AGENTS.md is not resolved per repository in multi-root workspaces
What version of the Codex App are you using (From “About Codex” dialog)?
26.803.10989.0
What subscription do you have?
ChatGPT subscription with Codex access (behavior appears tier-independent)
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
In a Codex Desktop workspace containing multiple Git repositories, only the AGENTS.md instructions for the initial working directory are loaded. Codex can still edit files in other attached repositories without first loading their own AGENTS.md files.
This is silent: the secondary repository is visible and writable, but neither the user nor the agent is warned that its repository-specific instructions are missing.
What steps can reproduce the bug?
- Add two Git repositories, each with a different AGENTS.md, to one Codex workspace.
- Start a task with repository A as the working directory.
- Ask Codex to make related changes in repositories A and B.
- Observe that Codex can change repository B without automatically loading or following repo-b/AGENTS.md.
The same problem can occur with nested repositories, but nesting is not required.
What is the expected behavior?
Before Codex works on a path, it should discover and apply the AGENTS.md chain governing that path's repository. When work crosses into another repository, Codex should update the active instructions before reading, modifying, testing, committing, deploying, or delegating work there.
If discovery fails, Codex should block the operation or warn clearly. Instructions may be loaded lazily; they do not all need to occupy the prompt at once.
Additional information
- Related: https://github.com/openai/codex/issues/26338
- Related: https://github.com/openai/codex/issues/27943
- Nested-repository case: https://github.com/openai/codex/issues/30789
- Reproduction is sanitized; no proprietary repository details are included.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action