← 記事一覧に戻る

この記事はまだ日本語版がないため、英語版を表示しています。

Why does my agent ignore CLAUDE.md/AGENTS.md?

4分で読めます著者:The Octuo team
Screenshot of Octuo for macOS showing the memory module

First separate a loading problem from an instruction problem. The file may be outside the discovery path, displaced by another file, or too large to load completely. If it did load, check for vague or conflicting rules. Diagnose one concrete missed instruction before adding more text to the file.

Did the file actually load?

In Claude Code, use /context to inspect the memory files loaded at launch and /memory to find and open instruction files. A file existing on disk is not enough evidence that it reached the session. Subdirectory CLAUDE.md files load on demand, so their absence from the startup list alone does not prove a fault.

Ask Claude Code to read another file in the relevant subdirectory to exercise that loading path. Then try one small task that requires the rule. Keep the test narrow: for example, ask for a proposed filename and check whether it follows your naming convention before authorizing a larger change.

For Codex, ask it to list the instruction sources it loaded. Its guide recommends restarting in the intended directory when guidance looks stale: the instruction chain is built once per run, usually once per launched terminal session.

Which discovery rules apply to this tool?

Claude Code concatenates discovered CLAUDE.md files into context; they do not mechanically override each other. Its memory guide warns that contradictory instructions may lead it to pick either one. Compare the actual text across relevant files instead of assuming that the nearest file wins.

For AGENTS.md, check Claude Code's documented project-instruction selection and availability conditions. A project-path CLAUDE.md or CLAUDE.local.md can prevent direct AGENTS.md loading under the default selection. The memory guide describes importing AGENTS.md or selecting both file types when both are needed.

Codex has different discovery rules. It reads global guidance, then project files from the root toward the working directory. AGENTS.override.md takes priority over AGENTS.md within a directory; at most one file per directory is included. Guidance closer to the working directory overrides earlier guidance. Empty files are skipped, and combined instructions have a default limit of 32 KiB.

If you use both tools, see using Claude Code and Codex together, then verify each tool's loaded sources separately.

How do I make a loaded rule easier to follow?

Rewrite a vague instruction as an observable requirement. Replace “keep things tidy” with a specific destination for new files. Replace “check the work” with the exact check and the evidence expected in the result. Remove outdated exceptions and contradictory copies before adding another reminder.

Claude Code recommends keeping each CLAUDE.md under 200 lines. That is a writing target, not the same limit as Codex's combined byte cap. Its troubleshooting guide also distinguishes guidance from enforcement: CLAUDE.md supplies context, while permissions and hooks serve enforcement needs. Do not treat a sentence in an instruction file as a technical access boundary.

Our guide to helping an assistant remember what you told it covers the broader habit. For this issue, keep a reproducible example of the missed rule and retest after one change.

Where Octuo fits

Give Octuo a goal. It delegates work to supported tools and agents, carries the context they need and brings the results back.

Octuo has account-level memory, and tasks carry forward across sessions with context that survives the conversation. Its built-in Canvas memory module lets you view and manage memory available to the agent; it is not a complete prompt or internal-reasoning viewer. Memory is context it can draw on, not something used in every task.

Octuo carries needed context when delegating work; that does not mean importing every vendor's native chat history. Use the discovery checks above to diagnose the coding tool's own instruction files.

FAQ

Should I repeat the rule in every file? Prefer one clear rule in the appropriate scope. Check existing copies for contradictions before adding another.

Does a longer instruction file help? Not necessarily. Claude Code recommends concise files, and Codex has a combined size cap. Keep essential instructions easy to locate and verify.

What if Codex keeps showing old instructions? Restart it in the intended directory and ask which sources loaded. Inspect overrides and file contents before rewriting the rule itself.

Sources

The product names above belong to their owners. We have no affiliation with them.