Repository navigation
Conversation
Codex reads a project doc from its cwd and the directories above it, never from one below. A multi-repo run works at the workspace root, which holds each repository in a folder of its own and is no repository itself, so since such runs can start no repository's AGENTS.md reached the model. Claude runs at the same root load every repository's memory. When the cwd is not itself a repository, each repository strictly inside it now gives the doc Codex itself would pick at its root, and that doc is appended to the run's CODEX_HOME/AGENTS.md after the persona and the operating contract, under "--- project-doc (<repository>/<file>) ---". Against 0.142.2 that file reaches the model in the same instruction block as a single-repo run's project doc, and an @ path, a ~ path or a $skill in it attaches nothing. The pick and the cut mirror the pinned CLI as observed: an AGENTS.override.md wins whenever it is a file or a link, even an empty one, and a doc is cut at 32 KiB (project_doc_max_bytes), decoded lossily. A doc that resolves outside the workspace is left out, checked with the same physical-path walker as Claude's memory guard. So is one whose repository's path holds characters the separator could not carry. Files are opened no-follow, non-blocking and only if regular. What was left out or cut is said once on the run's timeline through the launch notices. A run whose cwd is a repository, single-repo or at the primary repository, writes the same AGENTS.md as before: Codex loads that doc itself. The real-CLI E2E starts Codex at a root holding three repositories and requires the first one's doc and the second one's override in the first request's instruction block after the contract, each once. The second's plain doc and the third's doc, linked to a file where a confined run could still read it, must reach no request. The single-repo arm now also requires its repository's doc exactly once. Dropping the appendix, the containment check or the override precedence fails the new arm, and appending the cwd repository's own doc fails the single-repo arm. The sandbox lane's root floor moves to 108 and requires the new arm's marker.
ppXD
force-pushed
the
fix/point-claude-runs-at-scoped-rules-and-nested-memory
branch
from
October 6, 2026 18:49
0af35b9 to
a7c0bfb
Compare
ppXD
force-pushed
the
fix/give-multi-repo-codex-every-agents-md
branch
from
October 6, 2026 18:49
0ba2b0c to
3b90677
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AGENTS.mdreached the model. Claude runs at the same root load every repository's memory.CodexRepositoryGuidesgives each repository strictly inside it the doc Codex itself would pick at its root.AGENTS.override.mdwins overAGENTS.md, whether it is a file or a link, even an empty one.project_doc_max_bytes) and decoded lossily.CodexHarnessappends each doc after the persona and the operating contract inCODEX_HOME/AGENTS.md, under--- project-doc (<repository>/<file>) ---. There it reaches the model in the same instruction block as a single-repo project doc.@path,~path or$skillin a doc attaches nothing.PhysicalPath, the walker Claude's memory guard uses. So is one whose repository path holds characters the separator cannot carry.AGENTS.mdas before.Test plan
AGENTS.mdbyte-identical;MaxProjectDocBytespinned.RealHarnessCodexMultiRepoGuidesTestswithRealHarnessWorkspaceMemoryTests, 9/9.RepositoryConfigE2ETests15/15. The workflow's repository-config gate, run against the TRX, printsAll 15 repository-config E2E cases and 15 markers ran and passed.A_multi_repo_codex_run_reads_every_repositorys_agents_mdrequires the first repository's doc and the second's override in the first request's instruction block, after the contract, each once./etc, where a confined run could still read it, so in the root lane too its absence is the containment check's doing.agents-md codex-cli multi-repo