ChatGPT/App/Desktop/Q/When does AGENTS.md load in Work and Codex projects with multiple folders?
When does AGENTS.md load in ChatGPT/Work and Codex projects with multiple folders?
- Can a project grant access to ten to fifteen repositories while loading each repository's AI/Coding/Agents.md only when work reaches that directory? Does attaching folders consume context up front, and is the trigger a directory change or a file access?
- Short answer: Attaching secondary folders does not automatically import all their instructions. Automatic loading on first use of a secondary folder is not documented. File access and instruction discovery are separate.
- Desktop projects: Answer/Official from Projects and chats and the multi-folder project release notes. The primary folder supplies new chats' working directory and automatic discovery of
AGENTS.md, skills, and config.toml. Secondary folders remain available for searching, reading, and editing; Codex does not automatically discover those project files from secondary folders. - Codex timing: Custom instructions with AGENTS.md describes instruction discovery at startup, once per run, before work begins. It loads global guidance and the instruction files along the path from the project root to the working directory. This establishes startup behavior; it does not promise that a shell
cd or an arbitrary file read in another repository triggers instruction injection. - Work timing: The installed desktop app, version
26.1007.30912, has separate primary-folder tooltips for Work and Codex. Both identify the primary folder as the source for AGENTS.md, config.toml, and skills. The strings are in app.asar, at webview/assets/app-initial-6350d04672d0.js, under projectSetup.createLocalProject.primarySourceWorkTooltip and projectSetup.createLocalProject.primarySourceCodexTooltip. This corroborates the primary-folder distinction for Work; the precise event that loads secondary-folder instructions in Work remains unverified. - Context cost: The documented discovery behavior gives no basis for expecting every attached repository's
AGENTS.md to enter the initial prompt. Loaded primary-folder guidance still uses context, as do instructions or files subsequently read. This does not establish that attaching folders has zero overhead or quantify usage charges. - A workable arrangement: Keep shared guidance in a small primary-folder
AGENTS.md, with a repository directory map and an instruction to read a target repository's AGENTS.md and applicable nested instructions before working there. Attach related repositories as secondary folders. This asks the agent to load guidance on demand; reliable automatic loading on first access remains an open product question. Starting a separate chat with the target repository as its primary folder gives that repository the documented discovery behavior. - Skills: Build skills documents progressive disclosure for both ChatGPT and Codex: skill names and descriptions are available initially, and the full
SKILL.md is read when selected. Skills therefore have a discovery cost even before their full instructions load. Skill activation is based on relevance or explicit invocation, rather than merely changing directories. - Claude comparison: How Claude remembers your project documents startup loading for ancestor
CLAUDE.md files and on-demand loading for descendant instructions when a file in that subtree is read, written, or edited. The documented trigger is file use, rather than cd alone. Additional directories supplied with --add-dir have separate memory-loading settings, so nested folders and additional repositories are distinct cases there too. - Still open as of October 15, 2026: Whether either desktop experience automatically injects a secondary repository's instructions on first access, which tools trigger that behavior, and whether instructions reload after edits. The available documentation supports the primary-folder rule but does not settle those secondary-folder events.